* Patch from José Mejuto to fix handling of firebird string params in case Pascal parameter type differs (Bug ID 24080)

git-svn-id: trunk@23940 -
This commit is contained in:
michael 2013-03-20 08:07:03 +00:00
parent 483dc13f92
commit 228d03248a

View File

@ -1016,7 +1016,17 @@ begin
SetBlobParam;
SQL_VARYING, SQL_TEXT :
begin
s := AParams[ParNr].AsString;
if AParams[ParNr].DataType=ftDate then begin
s := FormatDateTime('yyyy-mm-dd',AParams[ParNr].AsDate);
end else if AParams[ParNr].DataType=ftDateTime then begin
s := FormatDateTime('yyyy-mm-dd hh:nn:ss',AParams[ParNr].AsDate);
end else if AParams[ParNr].DataType=ftTimeStamp then begin
s := FormatDateTime('yyyy-mm-dd hh:nn:ss',AParams[ParNr].AsDate);
end else if AParams[ParNr].DataType=ftTime then begin
s := FormatDateTime('hh:nn:ss',AParams[ParNr].AsDate);
end else begin
s := AParams[ParNr].AsString;
end;
w := length(s); // a word is enough, since the max-length of a string in interbase is 32k
if ((VSQLVar^.SQLType and not 1) = SQL_VARYING) then
begin