TLiteTable DetailFields = Unrecognized Token ':' Errors
Posted: Wed 02 Nov 2016 17:02
I have been unable to create a master - detail table relationship when the field names contain spaces. I used the selection dialog to create the table link using the 'Sequence ID' fields which automatically fills both the MasterFields and DetailFields properties for the linked detail table. When the linked table is activated an error is generated indicating - unrecognized token: ":" and the table can only be activated if the MasterFields or DetailFields property is cleared which breaks the one to many relationship display I need for the form grid. The debugger error indicates an exception class ESQLiteError with the same message.
I have enabled the QuoteNames property for each of the tables, is there something I'm missing about creating a master detail link?
I have enabled the QuoteNames property for each of the tables, is there something I'm missing about creating a master detail link?
Code: Select all
With SequenceLiteTable do
begin
Close;
Connection := WC6SourceLite;
Options.StrictUpdate := False;
Options.QuoteNames := True;
TableName := 'WSequence';
stKey := '"Sequence ID"';
IndexFieldNames := stKey;
SetOrderBy(stKey);
Open;
end;
With WSeqnAtchLiteTable do
begin
Close;
Connection := WC6SourceLite;
Options.StrictUpdate := False;
Options.QuoteNames := True;
TableName := 'WSeqnAtch';
stKey := '"Sequence ID"; Attachment';
IndexFieldNames := stKey;
MasterSource := SequenceDS;
// MasterFields := 'Sequence ID';
// DetailFields := 'Sequence ID';
MasterFields := '"Sequence ID"';
DetailFields := '"Sequence ID"';
Open;
end;