Hi all,
Well, it seems every time I try something new I have to ask first to get it to work!
Maybe one day I'll figure something out myself. Latest clumps of hair being torn out have been caused by DBGrid and DBEdit refusing to populate. I have lots of database functions in my program that work perfectly, so I know the basics of hooking up the various components. I have a connection, transaction, datasource and query all connected to each other. The DBGrid and DBEdit have the relevant datasource set. I have a procedure which I copied from the only datagrid tutorial I could find online, which follows:
UserFileConnection.Open;
UserFileTransaction.Active:= True;
Userdatasource.Enabled :=true;
UserFileLoad.SQL.Text:=('SELECT * FROM IssueTable');
Userdatasource.DataSet:= UserFileLoad;
PPDatagrid.DataSource :=Userdatasource;
PPDatagrid.Autofillcolumns :=true;
DBEdit1.Datafield :='IssueName';
UserFileTransaction.Commit;
UserFileLoad.Open;
Have tried putting the DB commands in different orders and so on. Have tried filtering the select statement by a single rowid. The above code at least makes it load one lot of blank data, but nothing else. I get one row of blanks in the datagrid, and the DBEDIT populates with the text '(MEMO)'. If I insert columns into the datagrid matching the fields of the table then I can get '(MEMO)' to appear there too. Any ideas?