--- parser3/src/sql/odbc/Attic/parser3odbc.C 2001/07/23 13:59:52 1.1 +++ parser3/src/sql/odbc/Attic/parser3odbc.C 2001/08/24 07:04:25 1.3 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) */ -static const char *RCSId="$Id: parser3odbc.C,v 1.1 2001/07/23 13:59:52 parser Exp $"; +static const char *RCSId="$Id: parser3odbc.C,v 1.3 2001/08/24 07:04:25 parser Exp $"; #ifndef _MSC_VER # error compile ISAPI module with MSVC [no urge for now to make it autoconf-ed (PAF)] @@ -74,12 +74,12 @@ public: *(CDatabase **)connection=db; } - void disconnect(SQL_Driver_services& services, void *connection) { + void disconnect(void *connection) { CDatabase *db=static_cast(connection); TRY delete db; CATCH_ALL (e) { - _throw(services, e); + // nothing } END_CATCH_ALL } @@ -118,8 +118,14 @@ public: it's already UNTAINT_TIMES_BIGGER */ - memcpy(to, from, length);//todo: ' -> '' - return length; + // ' -> '' + unsigned int result=length; + while(length--) { + if(*from=='\'') + *to++='\''; + *to++=*from++; + } + return result; } void query( SQL_Driver_services& services, void *connection, @@ -175,13 +181,12 @@ public: handlers.add_row_cell(ptr, size); } } - rs.MoveNext(); - row++; + rs.MoveNext(); row++; } rs.Close(); } else { - // empty result + db->ExecuteSQL(statement); } } CATCH_ALL (e) {