Null problem with parameter.asMemo := EmpyStr
Posted: Thu 09 Feb 2012 16:43
Hi.
I having an specific problem with 5.0.2 Driver and MSSQL2005 and Delphi XE.
The driver are changing the EmptyStr value with 'NULL'.
1- Delphi Code
SQLQuery1.Close;
SQLQuery1.SQL.Text := 'Select 1 Where ''1'' = :pString';
SQLQuery1.Params.ParamByName('pString').asMemo := EmptyStr;
SQLQuery1.Open;
2-SQL Generated statement obtained by SQLServer Profiler
exec sp_executesql N'Select 1 Where ''1'' = @P1',N'@P1 varchar(1)',NULL
Does anybody has an idea?
Best Reghards
Eder
I having an specific problem with 5.0.2 Driver and MSSQL2005 and Delphi XE.
The driver are changing the EmptyStr value with 'NULL'.
1- Delphi Code
SQLQuery1.Close;
SQLQuery1.SQL.Text := 'Select 1 Where ''1'' = :pString';
SQLQuery1.Params.ParamByName('pString').asMemo := EmptyStr;
SQLQuery1.Open;
2-SQL Generated statement obtained by SQLServer Profiler
exec sp_executesql N'Select 1 Where ''1'' = @P1',N'@P1 varchar(1)',NULL
Does anybody has an idea?
Best Reghards
Eder