I have a TZQuery created, and I try to load the fields SEQ_CTE and SERIE_CTE according to the code below:
ZQuery1.sql.text :=
'select * from C000004 where filial = '' + frmprincipal.spanel1.caption + ''';
ZQuery1.open;
ZQuery1.execsql;
DBEdit2.text := ZQuery1.fieldbyname('SEQ_CTE').asstring;
eserie.text := ZQuery1.fieldbyname('SERIE_CTE').asstring;
showmessage(ZQuery1.fieldbyname('SERIE_CTE').asstring);
ZQuery1.close;
The answer that the system returns is an empty data, but in the database there is data. Does anyone know how I can do this?
Additional information: The SQL code is correct because I tried to generate it by delphi and then run it on firebird and returned the data correctly.