[Delphi] Simple example to connect to FB server?

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
littlebigman
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 15.05.2009, 14:33

[Delphi] Simple example to connect to FB server?

Post by littlebigman »

Hello

I'm not a Delphi expert, and am having a bit of difficulty going through even the simplest of the samples "examples\simple\ZSimpleMain.pas", as it uses things like ZSQLMonitor and ZSequence that I haven't seen before, uses uses Properties instead of accessing data directly, etc.

By any chance, would someone have a working example with just a Connection, Query/UpdateSQL, and a DBGrid so that I could see how they work with Firebird?

Thank you.
littlebigman
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 15.05.2009, 14:33

Post by littlebigman »

I just got a little further, but I'm getting two errors (Firebird 2.1.2, ZeosLib 6.6.4):

1. The Firebird installer provides FBCLIENT.DLL, but ZeosLib expects either FBCLIENT20.DLL or FBCLIENTD.DLL.

I copied FBCLIENT.DLL as FBCLIENTD.DLL, and ZeosLib seemed happy, but...

2. ... when I reran the program: "Project Project1.exe raised exception class EZSQLException with message 'SQL Error: I/O error for file "C:\test.firebird" Error while trying to open file The system cannot find the file specified."

=> How do I connect to a Firebird server and create a brand new database + tables?

Here's my very basic source file with ZConnection:

http://pastebin.ca/1427321

The next step is obviously adding a DBGrid to connect to a DataSource, which will itself connect to a ZQuery and ZUpdateSQL for updates.

Thank you for any hint.
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post by seawolf »

Take a loook here
littlebigman
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 15.05.2009, 14:33

Post by littlebigman »

Thanks :)
Post Reply