Problem compiling with XE

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
tyler.smith
Posts: 9
Joined: Wed 22 Jun 2011 12:00
Location: United States

Problem compiling with XE

Post by tyler.smith » Wed 22 Jun 2011 12:05

Code: Select all

C:\Program Files\Embarcadero\RAD Studio\8.0\bin>DCC32.EXE "C:\Program Files\Deva
rt\Dbx\InterBase\Source\Delphi15\dclcrdbx150.dpk"
Embarcadero Delphi for Win32 compiler version 22.0
Copyright (c) 1983,2010 Embarcadero Technologies, Inc.
C:\Program Files\Devart\Dbx\InterBase\Source\Delphi15\dclcrdbx150.dpk(41) Fatal:
 F1026 File not found: 'CRSQLConnection.dcu'
I am using windows XP with cbuilder XE trying to compile the delphi15 dclcrdbx150.dpk. I followed the instructions provided and got the error above. Thanks in advance for the help.

Tyler Smith

AndreyZ

Post by AndreyZ » Wed 22 Jun 2011 12:40

Hello,

The TCRSQLConnection component is needed to overcome restrictions of dbExpress on Delphi versions earlier than RAD Studio 2007. As you are using C++Builder XE, you don't have to compile anything. You can use our dbExpress driver for InterBase & Firebird in the same way as the standard dbExpress drivers supplied by Borland. For additional information, please refer to the description of the TSQLConnection component in the help. To setup SQLConnection in order to use dbExpress driver for InterBase & Firebird, you should set the TSQLConnection.ConnectionName property to "Devart InterBase" in design-time.

tyler.smith
Posts: 9
Joined: Wed 22 Jun 2011 12:00
Location: United States

Post by tyler.smith » Wed 22 Jun 2011 13:21

Thanks, now I understand. I loaded up the driver like this...

Code: Select all

		dbObj->Params->Clear();
		dbObj->Params->Add("Database="+database);
		dbObj->Params->Add("User_Name="+username);
		dbObj->Params->Add("Password="+password);
		dbObj->LibraryName = "dbexpida40.dll";
		dbObj->GetDriverFunc = "getSQLDriverInterBase";
		dbObj->Open() ;
but I am still getting the same errors i was getting with regular dbexpress which is ...
Project [project name.exe] raised exception class TDBXError with message 'DBX Error: Driver could not be properly initialized. Client Library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path.
I do have the driver in the folder with my exe and I am using cBuilder XE with interbase 6.
This did originally work with interbase XE but not interbase 6 but now it doesnt work with either. Any ideas?[/code]

tyler.smith
Posts: 9
Joined: Wed 22 Jun 2011 12:00
Location: United States

Post by tyler.smith » Wed 22 Jun 2011 13:48

I managed to get it to work now. Had to restart XE to refresh the INI for dbexpress and add the include path.

Now I am getting
Project [projectname.exe] raused exception class EIBCError with message ' I/O error for file "c:\proj\debug\win32\DATABASE NAME" Error while trying to open file the system cannot find file specified '.
[/quote]

AndreyZ

Post by AndreyZ » Wed 22 Jun 2011 14:51

This error means the following: the database you have set in the TSQLConnection.Params.DataBase parameter does not exist. Please check that you are using the correct path to your database.

tyler.smith
Posts: 9
Joined: Wed 22 Jun 2011 12:00
Location: United States

Post by tyler.smith » Wed 22 Jun 2011 15:02

Do i need to specify the db name any differently than the regular TSQLConnection param?

dbObj->Params->Add("Database="+database);

This works with the regular DBX drive but once i move back to the devart one i start getting that error.

tyler.smith
Posts: 9
Joined: Wed 22 Jun 2011 12:00
Location: United States

Post by tyler.smith » Wed 22 Jun 2011 15:02

in this example the variable database is a full path to the gdb file.

tyler.smith
Posts: 9
Joined: Wed 22 Jun 2011 12:00
Location: United States

Post by tyler.smith » Wed 22 Jun 2011 15:29

btw i also tried
dbObj->Params->Add("Database=Server:"+database);

database = C:\Documents and Settings\tyler.smith\Desktop\Copy of XE China VATWIN32.GDB

AndreyZ

Post by AndreyZ » Thu 23 Jun 2011 13:14

You should use the following code:

Code: Select all

dbObj->Params->Values["Database"] = database;

Post Reply