Answer by user6695319 for How do I explicitly insert nulls into a parametized...
Have some property on TConnection Options named HandlingStringType/Convert empty strings to null. Keep it true and assume Query.ParamByName('ThisValue').AsString:='';You can access it...
View ArticleAnswer by Sam for How do I explicitly insert nulls into a parametized query?
Sertac's answer is most correct, but I also found the choice of driver makes a difference.For the benefit of others, here's an improved test program that demonstrates how you could insert nulls with a...
View ArticleAnswer by Sertac Akyuz for How do I explicitly insert nulls into a...
The reason of the error is 'dbx' does not know the data type of the parameter. Since it is never assigned a value, it's data type is ftUnknown in execute time, hence the error. Same for 'ParamType',...
View ArticleAnswer by Despatcher for How do I explicitly insert nulls into a parametized...
Are you sure the params have been created by just setting the text of the SQL?try if Query.Params.count <> 0 then// set params..Anyway why not make the SQL text: 'INSERT INTO crs_edocument...
View ArticleAnswer by awmross for How do I explicitly insert nulls into a parametized query?
Use TParam.ClearQuery.ParamByName('ThisValue').Clear;"Use Clear to assign a NULL value to a parameter." (from the Docs)
View ArticleHow do I explicitly insert nulls into a parametized query?
I'm using Delphi 7 and Firebird 1.5.I have a query that I create at runtime where some of the values might be null. I can't work out how to get Firebird to accept explicit nulls for values that I need...
View Article