|
@@ -735,6 +735,7 @@ end;
|
|
procedure TODBCConnection.PrepareStatement(cursor: TSQLCursor; ATransaction: TSQLTransaction; buf: string; AParams: TParams);
|
|
procedure TODBCConnection.PrepareStatement(cursor: TSQLCursor; ATransaction: TSQLTransaction; buf: string; AParams: TParams);
|
|
var
|
|
var
|
|
ODBCCursor:TODBCCursor;
|
|
ODBCCursor:TODBCCursor;
|
|
|
|
+ wbuf: widestring;
|
|
begin
|
|
begin
|
|
ODBCCursor:=cursor as TODBCCursor;
|
|
ODBCCursor:=cursor as TODBCCursor;
|
|
|
|
|
|
@@ -761,8 +762,9 @@ begin
|
|
ODBCCursor.FQuery:=Buf;
|
|
ODBCCursor.FQuery:=Buf;
|
|
if not (ODBCCursor.FSchemaType in [stTables, stSysTables, stColumns, stProcedures, stIndexes]) then
|
|
if not (ODBCCursor.FSchemaType in [stTables, stSysTables, stColumns, stProcedures, stIndexes]) then
|
|
begin
|
|
begin
|
|
|
|
+ wbuf := buf;
|
|
ODBCCheckResult(
|
|
ODBCCheckResult(
|
|
- SQLPrepare(ODBCCursor.FSTMTHandle, PChar(buf), Length(buf)),
|
|
|
|
|
|
+ SQLPrepareW(ODBCCursor.FSTMTHandle, PWideChar(wbuf), Length(wbuf)),
|
|
SQL_HANDLE_STMT, ODBCCursor.FSTMTHandle, 'Could not prepare statement.'
|
|
SQL_HANDLE_STMT, ODBCCursor.FSTMTHandle, 'Could not prepare statement.'
|
|
);
|
|
);
|
|
end;
|
|
end;
|