Reported By: Rolf Frei Reported On: 4/25/2002 For: Version 3.10 Build 1
# 1116Setting a Query Parameter to an Empty String Does Not Result in a NULL Parameter I have the following code. If aVarType1 and aVar1 was a empty string it didn't find the expected records. So I use now the Clear call for the VT1 and V1 Params. This way the expected records are found.
TempQuery.SQL.Text := 'SELECT [Pos] FROM Orders ' +
'WHERE OrderID = :SESSID AND PartNo = :PARTNO AND ' +
'VarType1 = :VT1 AND Variant1 = :V1';
TempQuery.Params[0].AsString := FSessionID;
TempQuery.Params[1].AsString := aPartNr;
TempQuery.Params[2].AsString := aVarType1;
TempQuery.Params[3].AsString := aVar1;
ResolutionFixed Problem on 4/26/2002 in version 3.11 build 1