Please, I need help. I have a SQLite3 database with one table, named TABLE1. TABLE1 has 5 fields of which the first is named NAME and is designated as the primary key. I also have a form on which are the following components: SQLite3Connection1, SQLTransaction1, DataSource1, SQLQuery1, 4 TDBEdit components, 1 TDBLookupComboBox, and a TDBNavigator. The 4 TDBEdit components are each connected to one of the non-key data fields of TABLE1 and TDBComboBox is connected to the NAME field as both the data field and list field.
With SQLQuery and SQLTransaction both set to Active=true via the ObjectInspector, when I run the project, I can step through the table using the navigation keys in the TDBNavigator. I think this indicates that most things are setup correctly.
Can anyone provide some code example that will allow me to select the NAME record by selecting the NAME from the drop down list of TDBLookupComboBox?
The following OnSelect handler of TDBLookupComboBox does not work:
var
s: String;
begin
s:='SELECT * from TABLE1 where TABLE1.NAME = :' + DBLookupComboBox1.Text;
SQLite3Connection1.ExecuteDirect(s);
end;
Any suggestions greatly appreciated.