Hi Francis,
1 ------------
Yesterday, I came up with the same analysis. I have to change the way the parser deals with quoted strings.
Here is a temporarely and quick fix up (not enough time right now)
Tips : when you want locate a KeyValue containing spaces and starting with a number, in a string field,
the KeyValue must be between brackets [] in order to be parsed as a single statement i.e.
MyDataset.Locate('StringField', '45 NEWSPAPERS', []) always returns FALSE
MyDataset.Locate('StringField', '[45 NEWSPAPERS]', []) returns TRUE
Procedure ProcessNumber;
var
CharSet: Set of Char;
begin
if Char(FNestingCharStack[FNestingLevel]) = '['
then ProcessIdentifier
else
begin
if Char(FNestingCharStack[FNestingLevel]) in ['''', '"', '#']
then begin
{ We have DateTime, Date or Time ? }
CharSet := ['0'..'9', '.', '-', '/', ':', ' '];
NewToken.TokenType := ttDateTime;
end
else begin
{ We have number ? }
CharSet := ['0'..'9', '.'];
NewToken.TokenType := ttNumber;
end;
While (Char(CurrentChar^) in CharSet) do Inc(CurrentChar);
end;
end;
Think to move the ProcessIdentifier proc above the ProcessNumber proc
2 --------------
DatasetName problem at designtime
procedure TSqlitePassDataset.SQLChanged(Sender: TObject);
begin
NotifySQLChanged(scProcess);
if (DatasetName <> '') and not (FInInternalSetDatasetType or (csLoading in ComponentState))
then DatasetName := '';
if FDatasetName = '' then
begin
FDatasetType := dtUnknown;
ProcessSQLText;
end;
if FParamCheck
then UpdateParamsList;
end;
Should be ok.
Looking forward further testing
Thanks.
Luc