Hello,
I need to do something like console of mysql (TRichEdit in Builder C++). How can i get all messages from mysql console and insert them into richedit (without TDBGrid)? For example, "select * from name_table" and i get strings in mysql console which will be inserted into richedit; "use name_database" - "database changed"; and so on.
Thanks
My own console
You always need TMyquery to get a dataset and / or Tmycommand to write to the database.
example (not tested):
example (not tested):
Code: Select all
myquery.sql.text := 'select * from tablename';
myquery.active := true;
while not myquery.eof do
begin
for t := 0 to myquery.fieldcount - 1 do
strrecord := strrecord + ':' + myquery.field[t].asstring;
richedit.items.add(strrecord);
myquery.next;
end;
myquery.active := false;