mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 23:38:06 +02:00
sqldb: odbc: send SQL to ODBC as WideString to support FPC 3.0.x character conversion
git-svn-id: trunk@43699 -
This commit is contained in:
parent
a66442ea47
commit
f27787b269
@ -735,6 +735,7 @@ end;
|
||||
procedure TODBCConnection.PrepareStatement(cursor: TSQLCursor; ATransaction: TSQLTransaction; buf: string; AParams: TParams);
|
||||
var
|
||||
ODBCCursor:TODBCCursor;
|
||||
wbuf: widestring;
|
||||
begin
|
||||
ODBCCursor:=cursor as TODBCCursor;
|
||||
|
||||
@ -761,8 +762,9 @@ begin
|
||||
ODBCCursor.FQuery:=Buf;
|
||||
if not (ODBCCursor.FSchemaType in [stTables, stSysTables, stColumns, stProcedures, stIndexes]) then
|
||||
begin
|
||||
wbuf := buf;
|
||||
ODBCCheckResult(
|
||||
SQLPrepare(ODBCCursor.FSTMTHandle, PChar(buf), Length(buf)),
|
||||
SQLPrepareW(ODBCCursor.FSTMTHandle, PWideChar(wbuf), Length(wbuf)),
|
||||
SQL_HANDLE_STMT, ODBCCursor.FSTMTHandle, 'Could not prepare statement.'
|
||||
);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user