ZConnection1.Connect; // if your ZConnection is not connected yet ZQuery1.Open; // if your ZQuery with the select isn't open yet // this will get the value from field 'your_desired_field' from the first record Label1.Caption := ZQuery1.FieldByName('your_desired_field').asString; // if you have multiple records ZQuery1.Next; // this will get the value from field 'your_desired_field' from the second record Label1.Caption := ZQuery1.FieldByName('your_desired_field').asString;
If your Zconnection and Zquery are set correctly you can do something like this:Code: [Select] ZConnection1.Connect; // if your ZConnection is not connected yet ZQuery1.Open; // if your ZQuery with the select isn't open yet // this will get the value from field 'your_desired_field' from the first record Label1.Caption := ZQuery1.FieldByName('your_desired_field').asString; // if you have multiple records ZQuery1.Next; // this will get the value from field 'your_desired_field' from the second record Label1.Caption := ZQuery1.FieldByName('your_desired_field').asString;This wiki is for SqlDB but it's almost the same for Zeos (especially for reading from a dataset):http://wiki.freepascal.org/SqlDBHowto#How_to_read_data_from_a_table.3F