--- sql/odbc/parser3odbc.C 2004/05/25 07:07:28 1.22 +++ sql/odbc/parser3odbc.C 2004/09/13 14:47:43 1.26 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char *RCSId="$Id: parser3odbc.C,v 1.22 2004/05/25 07:07:28 paf Exp $"; +static const char *RCSId="$Id: parser3odbc.C,v 1.26 2004/09/13 14:47:43 paf Exp $"; #ifndef _MSC_VER # error compile ISAPI module with MSVC [no urge for now to make it autoconf-ed (PAF)] @@ -169,13 +169,18 @@ public: return result; } void query(void *aconnection, - const char *statement, unsigned long offset, unsigned long limit, + const char *statement, + size_t placeholders_count, Placeholder* placeholders, + unsigned long offset, unsigned long limit, SQL_Driver_query_event_handlers& handlers) { Connection& connection=*static_cast(aconnection); CDatabase *db=connection.db; SQL_Driver_services& services=*connection.services; + if(placeholders_count>0) + services._throw("bind variables not supported (yet)"); + // transcode from $request:charset to connect-string?client_charset if(const char* cstrClientCharset=connection.cstrClientCharset) { size_t transcoded_statement_size; @@ -185,7 +190,7 @@ public: cstrClientCharset); } - while(isspace(*statement)) + while(isspace((unsigned char)*statement)) statement++; TRY { @@ -204,7 +209,8 @@ public: CRecordset rs(db); TRY { rs.Open( - CRecordset::forwardOnly, + CRecordset::forwardOnly + ||CRecordset::readOnly, statement, CRecordset::executeDirect ); @@ -357,7 +363,7 @@ public: v.m_pdate->hour, v.m_pdate->minute, v.m_pdate->second, - v.m_pdate->fraction); + v.m_pdate->fraction/1000000); // lexical parser of INCOMING literal choked on times like hh:mm:ss.123000000 str=(char*)services.malloc_atomic(length+1); memcpy(str, local_buf, length+1); break; @@ -396,4 +402,4 @@ public: extern "C" SQL_Driver *SQL_DRIVER_CREATE() { return new ODBC_Driver(); -} \ No newline at end of file +}