* widestring fields for odbc. Patch from Mantis #19773

git-svn-id: trunk@18023 -
This commit is contained in:
marco 2011-07-26 16:39:53 +00:00
parent e7375bf76f
commit 134f941937

View File

@ -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;