mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 14:19:31 +02:00
* widestring fields for odbc. Patch from Mantis #19773
git-svn-id: trunk@18023 -
This commit is contained in:
parent
e7375bf76f
commit
134f941937
@ -307,6 +307,7 @@ var
|
||||
IntVal: clong;
|
||||
LargeVal: clonglong;
|
||||
StrVal: string;
|
||||
WideStrVal: widestring;
|
||||
FloatVal: cdouble;
|
||||
DateVal: SQL_DATE_STRUCT;
|
||||
TimeVal: SQL_TIME_STRUCT;
|
||||
@ -383,6 +384,25 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
ftWideString, ftFixedWideChar, ftWideMemo:
|
||||
begin
|
||||
WideStrVal:=AParams[ParamIndex].AsWideString;
|
||||
StrLenOrInd:=Length(WideStrVal)*sizeof(widechar);
|
||||
if WideStrVal='' then //HY104
|
||||
begin
|
||||
WideStrVal:=#0;
|
||||
StrLenOrInd:=SQL_NTS;
|
||||
end;
|
||||
PVal:=@WideStrVal[1];
|
||||
Size:=Length(WideStrVal)*sizeof(widechar);
|
||||
ColumnSize:=Size; //The defined or maximum column size in characters of the column or parameter
|
||||
BufferLength:=Size;
|
||||
CType:=SQL_C_WCHAR;
|
||||
case AParams[ParamIndex].DataType of
|
||||
ftWideMemo: SqlType:=SQL_WLONGVARCHAR;
|
||||
else SqlType:=SQL_WVARCHAR;
|
||||
end;
|
||||
end;
|
||||
ftFloat:
|
||||
begin
|
||||
FloatVal:=AParams[ParamIndex].AsFloat;
|
||||
|
Loading…
Reference in New Issue
Block a user