Hello and thank you for your responses.
The code isn't very exciting I'm afraid
[nobbc][code]
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, sqlite3conn, sqldb, db, FileUtil, Forms, Controls,
Graphics, Dialogs, DbCtrls, DBGrids, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
dsMembers: TDataSource;
Edit1: TEdit;
gridMembers: TDBGrid;
DBNavigator1: TDBNavigator;
SQLite3Connection1: TSQLite3Connection;
queryMembers: TSQLQuery;
SQLTransaction1: TSQLTransaction;
procedure Button1Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
SQLite3Connection1.Open;
{Comment out
querymembers.SQL.text:= 'SELECT * from Members where Lastname = :Lastname';
querymembers.Params.ParamByName ('Lastname').AsString := Edit1.text;
Comment out end }
SQLTransaction1.Active := True;
queryMembers.Open;
end;
End.
[/nobbc]
The above is a modified code from festra.com with the data being loaded when clicking a button rather than opening the form. But it proves the link to the database works.
I have the TDBlistbox set with a data source to the TDataSource, and as that same TDataSource is what "powered" the TDBGrid, I know it must work from that point backwards.
I'm guessing it is not too far from being right and I was surprised this didn't work. As I'm sure you will appreciate, however, that knowing how to articulate the problem is just as hard as the problem being solved.
Many thanks for your kind replies.
Derek