I am using ClientDataSet.Locate to find a record.
I am using ClientDataSet.Locate to find a record.
One of the two KeyFields is a "Text" field (SqlLite).
However at runtime I get
"EDatabaseError with message 'Field 'Name' is of an unsupported type'."
ItemName := cdsSLItems.FieldByName('Name').AsWideString;
try
if cdsSLItems.Locate('IsleId;Name', VarArrayOf([
cdsSLItems.FieldByName('IsleId').AsInteger,
ItemName]),[loCaseInsensitive]) then
Can someone show me the right way to do this?
#Seattle .
One of the two KeyFields is a "Text" field (SqlLite).
However at runtime I get
"EDatabaseError with message 'Field 'Name' is of an unsupported type'."
ItemName := cdsSLItems.FieldByName('Name').AsWideString;
try
if cdsSLItems.Locate('IsleId;Name', VarArrayOf([
cdsSLItems.FieldByName('IsleId').AsInteger,
ItemName]),[loCaseInsensitive]) then
Can someone show me the right way to do this?
#Seattle .
You can map that Text to WideString for example and it will work.
ReplyDeleteClientDataSet can't load directly from SQLite. Maybe you use FireDAC?
http://docwiki.embarcadero.com/RADStudio/XE7/en/Data_Type_Mapping_(FireDAC)
Also UniDAC do have data type mapping.
BTW: Using this kind of field names is dangerous. I would avoid "Name" since you run the risk that it is a "reserved word" ...
ReplyDelete#Uwe , Bummer. Finally settled on using a filter.
ReplyDelete#Klaus, Right you are. I must have done that when I wasn't looking.
Thanks...Dan'l