D7 Firebird ZeosLib connection
Moderators: gto, cipto_kh, EgonHugeist
D7 Firebird ZeosLib connection
According to the docs the Database is a path to the working directory for the embedded project. In reality I haven't been able to make a ZConnection1.Connect. When it is tried, I get an AV:
---------------------------
Debugger Exception Notification
---------------------------
Project DBTest1.exe raised exception class EZSQLException with message 'SQL Error: I/O error for file "C:\Program Files\Borland\Delphi7\Projects D7\Testing\Firebird ZeosDBO Embedded\" Error while trying to open file The system cannot find the path specified. . Error Code: -902. Unsuccessful execution caused by a system error that precludes
successful execution of subsequent statements'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
The Database property in the Object Inspector of D7 looks like it is looking for a filename. How can a .fdb file be established unless a table is created which requires a connection to the fdb first? In aliases.conf it shows a dummy.fdb?
---------------------------
Debugger Exception Notification
---------------------------
Project DBTest1.exe raised exception class EZSQLException with message 'SQL Error: I/O error for file "C:\Program Files\Borland\Delphi7\Projects D7\Testing\Firebird ZeosDBO Embedded\" Error while trying to open file The system cannot find the path specified. . Error Code: -902. Unsuccessful execution caused by a system error that precludes
successful execution of subsequent statements'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
The Database property in the Object Inspector of D7 looks like it is looking for a filename. How can a .fdb file be established unless a table is created which requires a connection to the fdb first? In aliases.conf it shows a dummy.fdb?
Hi, in order to connect to an embedded firebird database you have to specify, on the Database property, a valid .fdb file or an alias saved on the alias.conf file, otherwise firebird embedded shows that message.
You need to create an .fdb file (also with no tables) and specify that file to the Database property.
You need to create an .fdb file (also with no tables) and specify that file to the Database property.
D7 Firebird ZeosLib connection
I must really be dense. I can't find anything that shows how to make a .fdb file. I could with notepad or some text program, but it wouldn't seem right.
If you need create a .fdb download flamerobin and create a new db with it or create it with Zeos by this way
fdb := TZConnection.Create(nil);
qlstr := Format('CreateNewDatabase=CREATE DATABASE ''%s'' USER ''SYSDBA'' PASSWORD ''masterkey'' PAGE_SIZE 16384 DEFAULT CHARACTER SET NONE', [dbfullname]);
fdb.Properties.Clear;
fdb.Properties.Add(sqlstr);
fdb.Properties.Add('Dialect=3');
fdb.Properties.Add('hard_commit=yes');
fdb.Database := dbfullname;
fdb.Protocol := 'firebirdd-2.0';
fdb.TransactIsolationLevel := tiReadCommitted;
fdb.Open;
fdb := TZConnection.Create(nil);
qlstr := Format('CreateNewDatabase=CREATE DATABASE ''%s'' USER ''SYSDBA'' PASSWORD ''masterkey'' PAGE_SIZE 16384 DEFAULT CHARACTER SET NONE', [dbfullname]);
fdb.Properties.Clear;
fdb.Properties.Add(sqlstr);
fdb.Properties.Add('Dialect=3');
fdb.Properties.Add('hard_commit=yes');
fdb.Database := dbfullname;
fdb.Protocol := 'firebirdd-2.0';
fdb.TransactIsolationLevel := tiReadCommitted;
fdb.Open;
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
It means the dll can not be found OR some necessary files for running the embedded server are not found.
The fbclientd.dll file isn't the only necessary dll or file.
In one of my test app's I have these fb related files:
The fbclientd.dll file isn't the only necessary dll or file.
In one of my test app's I have these fb related files:
- intl (dir+content)
- udf (dir+content)
- aliases.conf
- fbclientd.dll
- firebird.conf
- ib_util.dll
- icudt30.dll
- icuin30.dll
- icuuc30.dll
- msvcp71.dll
- msvcr71.dll
- firebird.msg