hi dear
i read this tutorial and have a basic question about writing query.
http://wiki.freepascal.org/Zeos_tutorialDrop a ZConnection.
Set your User, Password, Host, Port and Protocol (and any other params if needed).
Set Connected to True.
Drop a ZQuery (do not mistake with ZReadOnlyQuery).
Set the Connection to your active ZConnection.
Set the Sql property to something like SELECT * FROM MyTable
Set Active to True.
Drop a DataSource from the [Data Access] tab.
Set the DataSet to your active ZQuery.
Drop a DBGrid from the [Data Controls] tab.
Set the Datasource to your DataSource.
If all is ok you should now be able to see the records from your table
(
notice: I used ZConnection1,ZQuery1,Datasource1,DBGrid1 and can make connection to database )
and i added this code to FormCreate (onCreate event) to show data in DBgrid.
ZQuery1.SQL.Clear;
ZQuery1.SQL.Add('select * from tlb');
ZQuery1.ExecSQL;
my problem occurs when goning to ENABLE ZQuery but facing with this error:
SQL Query is empty
I would like to get data from database with write query (not change SQL property of ZQuery1).
is there need other object such as ZUpdateSQL1?
thanks a lot.