Page 1 of 1
[D2009/ZParseSql] File not found: 'ZPostgreSqlToken.dcu'
Posted: 15.05.2009, 14:49
by littlebigman
Hello
I'm a Delphi newbie and am trying to install ZeosLib in Delphi2009 for the time to try to connect to a Firebird server.
I followed
gto's Zeos Quick Start Guide, ie. unzip, add the root of Zeos directory + packages\delphi11\build, and compile.
After editing src\Zeos.inc to just compile for Firebird, I can succesfully compile the first package ZCore, but the next one packages\delphi11\ZParseSql.dproj fails:
Code: Select all
[DCC Fatal Error] ZInterbaseToken.pas(61): F1026 File not found: 'ZPostgreSqlToken.dcu'
Here's how I disabled compiling other DBMS's in src\Zeos.inc:
Code: Select all
{.$DEFINE ENABLE_POSTGRESQL}
{.$DEFINE POSTGRESQL_STRICT_DLL_LOADING}
Did I do something wrong in the INC file? Are there other possibles sources for this error?
BTW, each package comes in two versions: DPK and DPROJ. Which should I choose?
Thank you for any hint.
Posted: 15.05.2009, 15:46
by littlebigman
I removed the whole directory, redownloaded the Stable version, didn't edit src\zeos.inc: ZCore and ZParseSQL compile OK, but I get errors when compiling Zplain:
Code: Select all
[DCC Error] ZPlainPostgreSqlDriver.pas(1005): E2010 Incompatible types: 'AnsiChar' and 'Char'
[DCC Error] ZPlainPostgreSqlDriver.pas(1018): E2010 Incompatible types: 'AnsiChar' and 'Char'
[DCC Error] ZPlainPostgreSqlDriver.pas(1020): E2010 Incompatible types: 'AnsiChar' and 'Char'
[DCC Error] ZPlainPostgreSqlDriver.pas(1023): E2250 There is no overloaded version of 'StrCopy' that can be called with these arguments
[DCC Fatal Error] ZPlain.dpk(100): F2063 Could not compile used unit '..\..\src\plain\ZPlainPostgreSqlDriver.pas'
Is ZeosLib 6.6.4 not compatible with Delphi2009? Or is there something more to be done than it says in the doc?
Thank you.
Posted: 15.05.2009, 17:22
by gto
littlebigman wrote:I removed the whole directory, redownloaded the Stable version, didn't edit src\zeos.inc: ZCore and ZParseSQL compile OK, but I get errors when compiling Zplain:
Code: Select all
[DCC Error] ZPlainPostgreSqlDriver.pas(1005): E2010 Incompatible types: 'AnsiChar' and 'Char'
[DCC Error] ZPlainPostgreSqlDriver.pas(1018): E2010 Incompatible types: 'AnsiChar' and 'Char'
[DCC Error] ZPlainPostgreSqlDriver.pas(1020): E2010 Incompatible types: 'AnsiChar' and 'Char'
[DCC Error] ZPlainPostgreSqlDriver.pas(1023): E2250 There is no overloaded version of 'StrCopy' that can be called with these arguments
[DCC Fatal Error] ZPlain.dpk(100): F2063 Could not compile used unit '..\..\src\plain\ZPlainPostgreSqlDriver.pas'
Is ZeosLib 6.6.4 not compatible with Delphi2009? Or is there something more to be done than it says in the doc?
Thank you.
Hello!
Currently, only the Zeos 7, which still in testing can be used with Delphi 2009. There are people using it arround without problems, but while it's testing yet, everything I can suggest is download and test for yourself.
You can download the latest version through SVN, in the branches/testing folder.
Posted: 18.05.2009, 15:39
by littlebigman
I can compile OK if I leave zeos.inc alone, but it fails if I comment out DBMS I don't need (MySQL, PostgreSQL, etc.) and only keep Firebird:
Code: Select all
ZInterbaseToken.pas(61): F1026 File not found: 'ZPostgreSqlToken.dcu'
//This line:
uses
Classes, ZTokenizer, ZGenericSqlToken, ZPostgreSqlToken;
BTW, unless I'm mistaken, although ZeosLib compiles statically into the EXE, it still requires the Firebird client DLL's. Is there a way to compile everything into the EXE so I can have users just download and run a single EXE?
Thank you.
Posted: 18.05.2009, 16:21
by gto
littlebigman wrote:I can compile OK if I leave zeos.inc alone, but it fails if I comment out DBMS I don't need (MySQL, PostgreSQL, etc.) and only keep Firebird:
Code: Select all
ZInterbaseToken.pas%u2861%u29%u3a F1026 File not found%u3a 'ZPostgreSqlToken.dcu'
//This line%u3a
uses
Classes, ZTokenizer, ZGenericSqlToken, ZPostgreSqlToken;
BTW, unless I'm mistaken, although ZeosLib compiles statically into the EXE, it still requires the Firebird client DLL's. Is there a way to compile everything into the EXE so I can have users just download and run a single EXE?
Thank you.
This problem with enable and disable protocols is solved in latest SVN, I think. If not, we can solve it easy, firebird files where inheriting from files of postgres.
About the DLL, yes, Zeos compile into DCUs and they become part of your program natively, but it requires the native library (or libraries, in cases like postgres), because Zeos in only a "bridge" for this libraries and the real low-level code is into they.
I don't know any way you can embed a DLL into an EXE and link it, but just for thinking it smells like a dirty workarround
Posted: 18.05.2009, 16:33
by littlebigman
Yup, I'll just write an installer to install the EXE and the Firebird client DLL's.
BTW, does someone have a very simple tutorial on how to get started with the DBGrid component, ZeosLib, and FireBird? I just need something that would show me how to connect to the server, send a SELECT, and watch the DBGrid update itself.
Thank you.