I have been able to extract a single column with help here
but now I want to get two, but the same process does not seem to work.

Procedure Tform1.showroom;
begin
adoquery1.close;
adoquery1.SQL.Clear;
ADOQuery1.SQL.Add('Select roomname,description from Rooms');
adoquery1.Open;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
ADOConnection1.KeepConnection := false;
datasource1.DataSet := adoquery1;
dbmemo1.DataSource := datasource1;
adoquery1.connection := adoconnection1;
DbMemo1.DataField := 'description';
DbEdit1.DataField := 'roomname';
CurrentRoom := 0;
if fileexists('d:\test.mdb') then ShowRoom;
end;

The description is showing in the dbmemo, but the dbedit does not show the roomname and remains blank.

i am trying to put the needed relationships between the ado components within the formcreate, so that I can understand what is needed without setting them in the ide

any and all help appreciated.

putting

dbtext1.datasource := datasource1;

allowed this to work properly, but I am confused as to why I needed this
as dbmemo1 was not set the same, nor in the ide

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.