I am getting to know the dbexpress firebird driver from Chau Chee-Yang (http://sites.google.com/site/dbxfirebird/)
I find it hard to install because there is very little information, I
succeded making a connection, but several questions arise: When using
the data explorer and I want to connect to the database sends me the
following error:
--------------------------- Database Explorer
--------------------------- The located assembly's manifest
definition does not match the
assembly reference. (Exception from
HRESULT: 0x80131040)
---------------------------
When I want to generate the query in the command text of the sqldataset
delphi sends me the following error:
Cannot load metadata for
FIREBIRDCONNECTION. Add driver unit
to your uses (DbxInterBase or DbxDb2
or DbxMsSql or DBXMySQL or DbxOracle
or DbxSybaseASA or DbxSybaseASE).
I dont really know If I did something wrong installing the
driver, maybe I have to give the sql instructions like SelectSql.add
('select *.... in real time. Instead of the sqldataset I put a SQLTable
and I can see the data. I think something is wrong in not being able
to write sql instrcciones directly from the CommandText of the
sqldataset Any help well be appreciated
Thanks and regards
I haven't used this driver, but if you're using the Enterprise or Architect editions, they ship with their own dbExpress driver for Firebird. It may work better in the data explorer.
I also get that error in the data explorer. There were some notes about this in the support forum. It seemed like he had a fix, but it hasn't made it in yet. Here's the link:
http://groups.google.com/group/dbxfirebird/browse_thread/thread/a99e9f7946abd67c
Related
I am in the process of migrating some legacy software that uses Delphi (XE3 or Tokyo) and the BDE against Paradox.
We will be going with UniDAC, and have the software running, using ODBC (MS Paradox Driver). Unfortunately, the MS Drivers are incomplete, we frequently get messages stating that some particular optional function is not available. Things like post should not be optional. :)
We own Corel Paradox 9.0. I just installed that hoping to find the official Corel ODBC Drivers would appear in my ODBCAdmin, but they did not. I went further and installed the Paradox 9 SDK, and then the Paradox 9 RunTime. Still the Corel ODBC Driver is not appearing in my ODBC Admin. Is there some extra step?
Based on what I have been told by other devs, the ODBC Drivers should have automatically populated after installing Paradox itself. The documentation is of no help and articles are few and far between.
Can someone tell me how to access the ODBC Paradox Driver from Corel? Alternatively, is there another way to hookup Delphi to Paradox, without ODBC (or the BDE)? I have searched, but not found any other way. FYI, eventually we will be going to SQLite, but we do still need paradox.
Thank you!
EDIT
Another approach... if anyone has this installed already, but doesn't know where it came from, Eg, some runtime library, one could open the ODBC Admin and the driver will point to the underlying dll. Just getting me the name of the dll would be very helpful.
Thank you, again.
I want to install a Firebird database driver, and to have it available within the Delphi XE IDE. I want the database driver to be usable on the same basis as other, supplied database drivers (eg Interbase, SQL - from within the Data Explorer in the IDE). I have obtained an appropriate driver.
The driver consists of a Delphi project, which compiles to a DLL; and modifications to two .ini configuration files (dbxconnections.ini and dbxdrivers.ini). I assume that the DLL is the actual driver, and I have compiled the project without problem.
I have got this far, and this is where I realised that I do not know what is involved in installing a new database driver; what is involved in installing a new database driver into an IDE; nor where the elements of the installation need to reside.
So my question is:
What steps are needed to install a dbExpress database driver into the Borland XE Delphi Professional IDE?
Some of the specific points I don't know about include -
Does the driver need to be registered with all of Firebase, Delphi and Windows?
Do I need to employ a specific registration procedure to accomplish registration?
Are there any elements I am missing to accomplish my aim?
Where should the installed components be located?
All four vendors, Embarcadero, Borland, UniOpen, and Firebird provide documentation (most of which is very comprehensive) but I have been unable to extract from them what I need to do and where to do it.
I have searched multiple questions on SO, but all of seem to start from the basis that the OP knows what is involved in driver installation.
All the products (except the driver project) generate multiple files in multiple locations, and it is not clear what components belong where. For example, I have multiple versions of the two configuration files residing in:
C:\Users\User\AppData....
C:\Users\Public\Public Documents...
C:\Program Files\Vendor....
....
In addition these products install files into:
the registry (multiple keys);
C:\Program Files....;
C:\Program Files (x86)....;
C:\Windows\System....;
C:\Windows\System 32.....
and probably more.
Environment:
Machine: Lenovo Thinkpad W510
OS: Windows 7 Ultimate
Delphi: Embarcadero® RAD Studio XE Version 15.0.3953.35171
Database: W1-V2.5.0.26074 Firebird 2.5
Database Driver: UniOpen Native DBX Driver
Also Installed:
Embarcado Borland® Developer Studio 2006 Enterprise Version 10.0.2288.42451 Update 2 (XP Version)
Borland Delphi Version 7 (XP Version)
In summary:
What steps and locations are needed to install a dbExpress database driver into the Borland XE Delphi Professional IDE?
You missed a file. :)
DataExplorer, from the best I can tell, uses dbxdrivers.ini. My installation of XE has a single copy of that particular file, located (Win7 64) in C:\Users\Public\Documents\RAD Studio\8.0. The connection types listed in DataExplorer come from the list of installed drivers at the beginning of that file, and each driver has one or more configuration sections which follow that list.
The driver files listed in the configuration section have to exist in a location findable (like any other Windows DLL) by LoadLibrary. The documentation in the link explains the way the API function searches for DLLs; basically though, the IDE has to find it somewhere on the PATH.
The vendor or author of your particular driver should be able to provide the info that needs to go in the dbxdrivers.ini file. (I'm not familiar with UniOpen personally, and don't have FireBird on this particular machine.) The IDE only reads that file during startup, so you'll need to (re)start the IDE after making the additions.
This post at the Embarcadero Delphi Database->DBExpress forum may help with defining aliases for your Firebird databases, and describes connecting via the TSQLConnection component. (Look for a post by Ralph Horbury-Smith.) If you don't have a Developer's Network ID, you'll need to register with the Embarcadero site; the link I provided uses HTTPS for some reason. You can also get to their forums via NNTP; I'm not using a newsreader, so I'm not sure what the address would be. There's a link to connection info on this page at Embarcadero.
There's also some information available on the Delphi XE documentation Wiki pages that might help as well.
EDIT: Found one more link at the DBExpress forums that might interest you. It has a link for another FB DBExpress driver and specific information for the dbxdrivers.ini file for that driver. It's the post by Phillip Flores (about the 3rd one down on the page).
I am accepting #Ken's answer. His response provided links to various resources. I am summarising the answers to the specific points I had that I have obtained from the references.
There is no need to amend dbxconnections.ini - the IDE will do that for me.
I need to amend dbxdrivers.ini appropriately and place it in the IDE directories.
The actual driver needs to be somewhere on the path - typically System32.
There is no need to register the driver with Windows.
Apart from the items listed above, there is no special procedure needed to register such drivers.
The list here appears complete.
EDIT:
My conclusions in this summary were premature and I have asked a further question to try and obtain further information. The strikeout in the list above marks the incorrect elements.
The background to this query was this question.
I have installed this driver for Firebird and placed it within the path (system32) used by the IDE. The XE Data Explorer recognises the driver, and it is possible to create a connection using the Data Explorer. Trying to view tables or any other database element through this connection results in the error described in this question. As far as I can see #Alejandro Jourdan has not obtained a solution to this problem, and I can find no solution on any of the support sites for Firebird or for Delphi XE.
The second problem comes when I create a TSQLConnection using this connection. The connection works to the extent that it generates the login prompt to the database, but when it tries to open the connection I get the error message: 'file is not a valid database' This error message is (sort of) reproducible from within the Data Explorer which gives the following error:
I/O error during "CreateFile(open)" operation for file [database path] Error while trying to open file. Access is denied..
The database is valid and can be opened from the Firebird command line utility, and from a Data Base browser.
Environment:
Machine: Lenovo Thinkpad W510
OS: Windows 7 Ultimate 64bit
Delphi: Embarcadero® RAD Studio XE Professional Version 15.0.3953.35171
Database: W1-V2.5.0.26074 Firebird 2.5 (64 bit)
Also Installed:
Embarcado Borland® Developer Studio 2006 Enterprise Version 10.0.2288.42451 Update 2 (XP Version)
Borland Delphi Version 7 (XP Version)
EDIT:
See my own answer below. This edit has removed extensive detail that proves to be unnecessary in the light of that answer, while retaining the core of the question, and the links contained within it.
The first thing that sticks out to me is that you're using the 64-bit version of Firebird, and that you mentioned it comes with both a 32- and 64-bit driver. Are the DLLs named the same? If so, I suspect that the IDE/OS are trying to load the 64-bit version of the DLL in a 32-bit application, which isn't possible (32-bit apps can't load 64-bit drivers, and vice versa).
Try one of two things:
First, if the DLLs have the same name, rename the 64-bit version temporarily, and restart the IDE. Then try again.
Try installing the 32-bit version of Firebird, even though you're running a 64-bit OS.
The basic question I had (in part I) was:
I want to install a Firebird database
driver, and to have it available
within the Delphi XE IDE. I want the
database driver to be usable on the
same basis as other, supplied database
drivers (eg Interbase, SQL - from
within the Data Explorer in the IDE).
I have obtained an appropriate driver.
After considerable investigation I have found that it is not possible to achieve the integration into the Delphi IDE that I was trying to achieve. This is because the Data Explorer is a .NET application and the available DBExpress drivers (here and here) are just not compatible with .NET. I understand that I can use the drivers by setting up the parameters appropriately, in both the IDE and by programming in the application I am developing.
I have drafted this answer to assist others to avoid this particular blind alley. I am also editing the part II question in order to remove a lot of the detail, that proves to be unnecessary in the light of this answer.
Connecting to ADO is hard from installation in Delphi, so I decided to use VBscript, which I have never used before. VBscript has little support in Delphi, so how do I run a Windows script editor to get support and carry it over to Delphi? I do not understand the statements in VB script very well yet
My Delphi TTable is connecting to
the ADO
I need to connect to a
Microsoft DB file in c:\program
files\common\my folder\my file
I need to disconnect the ADO to
relocate this file and place a new
copy in its place periodically.
I looked up the MSN web site and it's not that helpful.
I see scripts that could be useful for many things if I can get them working.
Can anyone help please?
Lex Dean
The best way is to use the native (and easy) ADO components in Delphi.
You will found a example of 'how to do', with source, here :
http://sourceforge.net/projects/axbase/
You do not connect to ADO. You connect to a DB through ADO. ADO is a technology to connect to different databases using a common API - the database native API is taken care of by ADO drivers.
You say you need to connect to a "Microsoft DB" file but do not specify what kind. ADO can connect directly to Access files, but if you use SQL Server you never connect to a file, you connect to the database server.
Delphi has a different set of components to connect through ADO. They are the TADOxxxx component. TTable is built upon the BDE, and can't use ADO. Use TADODataset or TADOTable.
Using VBScript from Delphi is possible, but would not solve your problem easily - you will have to pass ADO objects to and from Delphi and VBScript, and it requires a good knowledge of Delphi, Windows, COM and so on. If you need to use ADO, take the straight path.
I'm strugling with error message "Incorrect values within SQLDA structure" when I'm trying to update blob field within Firebird 2.1 database from Delphi 2009 DBX application.
However I get the error message when I'm trying to execute TSQLQuery with following SQL: "update MYTABLE set FIELD1= :data where id = :id"
The relevant delphi code is:
MyQuery.ParamByName('id').AsInteger := id;
MyQuery.ParamByName('data').LoadFromFile(filename, ftBlob);
MyQuery.ExecSQL();
Where should I be looking? This has been working in earlier Delphi versions.
This is the kind of crypt error that Delphi's Interbase driver is used to show.
I've seen this problem when you have different numbers of parameters in your SQL statement and the ones defined in your query component.
Double check your driver - it is for Firebird or you just use the Interbase driver for this?. It is known that the Firebird team changed the SQLDA structure for Blobs in 2.1 and, hence, the Interbase driver cannot be used anymore.
You have some options here:
(recommended, imho) Upgrade to Delphi 2010 - besides of a DBX Firebird driver you will get much more things to play with (see here for more)
Buy a 3rd party driver for Firebird which works in Delphi 2009
'Downgrade' your Firebird (use it as a last resort, of course)
Change your connectivity library. Yes, it might imply code rewrite.
maybe you need to use the free dbx driver for firebird
http://sites.google.com/site/dbxfirebird/
The first thing that comes to mind is to make sure that the the client dll (gds32.dll or fb32.dll or fbclient.dll, the name depends on which version of Firebird you are using) exactly matches the server version you are using.
--jeroen
FWIW, I got this error in a perl program by executing a statement without bind variables, when it needed them.