Page 1 of 1

Need Some Bcb6 Dbexpress-mysql Help

Posted: Thu 26 May 2005 12:19
by Gabi
well, the thing is i just can't figure out how to get a record from the mysql table into a string variable. this is what i'm doing:

Code: Select all

  
void __fastcall TForm1::Button1Click(TObject *Sender)
{
       SQLDataSet1->Prepared=true;
       char buffer;
       SQLDataSet1->GetCurrentRecord(&buffer);  
       Label1->Caption=buffer;
}

the text of the current record should be 'cacat' but the label just goes blank. i really can't figure this out. i tried Text,DisplayText on fields and many others but... nothing. any help is greatly apreciated.

Posted: Fri 27 May 2005 09:55
by Ikar
Use Fields property to get field values. You can see description with examples in CBuilder help and demos.

SQLDataSet1->Prepared makes no sense in this case.