Zeos has recently been ported to Lazarus and there are no releases yet that officially support it but you can easily get it from CVS if you follow these steps:
- Set the system path to include your cvs client (if necessary) depending on what client you chose or configure your GUI client to use this CVSROOT -d:pserver:email@example.com:/cvsroot/zeoslib, if you have configured your system path open a terminal/console/dosbox and go to the directory where you store your cvs and type cvs -d:pserver:firstname.lastname@example.org:/cvsroot/zeoslib checkout zeoslib_rework you should see some progress, after all files have been downloaded go to the zeosdbo_rework directory and have a look at what it contains.
Installing the components
This is a tricky part so you should have a little patience and read this part carefully.
Start one instance of Lazarus.
- Use Components/Open Package File(.lpk) from the main menu.
- Go to zeosdbo_rework\packages\lazarus\ and open ZCore.lpk
- Press [Compile] (and wait ...)
- Press [Install]
- A message will appear informing you that this is a runtime package wich cannot be installed.
- Press [Ignore]
- You are asked if you want to recompile Lazarus.
- Answer [No]
- Close the instalation form.
Repeat steps 1 to 9 for the folowing packages (Open them instead of Zcore.lpk): - ZParseSql.lpk - ZPlain.lpk - ZDbc.lpk
Now repeat steps 1 to 6 for the package ZComponent.lpk You are asked to recompile Lazarus. Answer [Yes] this time. Wait until compilation ends, Lazarus should restart itself after that. If all is ok you should now be able to see the [Zeos Access] tab in the Component Palette.
Make your first Zeos application
- Drop 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.
More information about working with Zeos
Please complete me :)