Migrating client app to FB 2.1 - delphi

I use Delphi 7 with DBExpress.
I want to fully migrate my app to firebird 2.1. I already know what to do at the server side but not really sure at client side.
In the TSQLConnection component I see that vendorLib property points to GDS32.dll. The driverName is Interbase and getDriverFunc is getSQLDriverINTERBASE.
I don't know what to do in order to my connection use fbclient.dll. I tried simply changing gds32.dll to fbclient.dll in vendorLib, but it caused some access violations in my app.
Any tips?

The Interbase DBX driver doesn't support Firebird 2.1 (you'll have problems with certain field types - BLOBs for example). There are rumors that D2010 (which must enter in Beta soon) will support Firebird.
So, you can expect the Weawer or buy a commercial Firebird DBX driver (see Upscene's site or, DevArt/CoreLab's ones).
Also, perhaps is better that when you install Firebird to check the 'Generate gds32.dll for compatibility with older applications' - or something similar - I don't have now in front of my eyes the FB installation kit.
HTH.

Use ZeosDB components for accessing FireBird DB.

Maybe you should rename fbclient.dll to gds32.dll and replace it. Read this - it's not exactly your case, but maybe you should try the same way.

There is also some dbx drivers for Firebird in UIB in \Misc\dbexpress
For completing this I know also dbx drivers for Delphi 2007/2009 at IBExpert
http://ibexpert.net/ibe/index.php?n=Main.News#news16
and others connectivity to access Firebird with Delphi
http://www.firebirdfaq.org/faq7/

Related

Interbase does not connect in Delphi 10.3.3 Rio

In the past, I have worked a lot with Delphi 7. I have two questions for Delphi 10.3:
Does the Interbase DB file have the extension .IB or .GDB, as in the past?
After having created a database with IBConsole, after having entered the DatabaseName property of the TIBDatabase component, I am never able to connect, I always receive the error "Unavailable Database". This also happens to me with the Delphi examples. I don't know what to think, maybe the problem is due to 32bit vs64bit of the system?
InterBase definitely works in 10.3
Regarding File Extension for InterBase.
You can name the file anything you want! InterBase use to use .gdb as the file extension, then Windows started using it for some files causing the OS to try and back those files up before use, and as you can imagine with large databases, that was a pain! So InterBase swapped to .ib as the default extension to avoid that issue.
Which version of Interbase are you using? Hopefully, the latest that comes with the product. It's unlikely to be a 32bit / 64bit issue. InterBase clients can connect to any InterBase server as it uses an over the wire protocol, separate to the OS version. You could be connecting to Linux from Windows, it really doesn't care.
The problem is likely to be InterBase isn't running, or the pathing is incorrect.
If you can connect in IBConsole, then you will be able to connect inside the IDE.
For the database name, just put in the local file path.
Depending on the settings, you might want to put in the full path including IP / server name e.g.
127.0.0.1:c:\mydatafolder\mydatabase.ib
InterBase uses server name or IP, a colon (as the separator) and then the file path on the machine indicated.
If you find you can't connect in IBConsole, restart InterBase using IB Server Manager.
If you are using an OLD version of InterBase, you can download the latest from inside RAD Studio by using Tools > Manage Platforms > Additional Options and selecting the developer edition from the list of options.

Corel Paradox ODBC Driver

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.

DBExpress Unknown error code 65535

Delphi 7. Firebird 2.1.
I am using TSQLDataSet, TSQLDataSetProvider and TClientDataSet. This architecture has worked for me for a long, long time.
Today it started to give me this error: DBExpress Unknown error code 65535, not really clarifying.
I am able to set a SQL in the TSQLDataSet and add all fields in the Fields Editor.
The error occurs when I try to add all fields in the ClientDataSet, in design time. There is no code of mine involved.
I know it os way too litle information but really I donĀ“t even know where to start digging.
Notes
I recently installed Delphi XE2 to start migrating
Probably you have Firebird / Interbase clients DLL hell. For Firebird you should use fbclient.dll, for Interbase - gds32.dll. If you does not follow to this rule, then DBMS API may return a misterious error. And dbExpress driver may have no good idea, what to do with this error. Then it returns another misterious error - 65535.
Probably (again, because no information) you had fbclient.dll renamed to gds32.dll to make Interbase Borland dbEpress driver happy. Then Delphi XE2 installed a real gds32.dll or it was installed as part of Interbase installation (do you ?). The current real Interbase gds32.dll is not compatible with your Firebird server.
You have to verify what DLL loads dbExpress driver, using SysMon or IDE Event Log. Then check what is this DLL. Then probably you will need to restore your gds32.dll.

open source component for postgreSQL

I would like to know if there are any open source components available for Delphi XE-2 that can connect to postgreSQL other than using outdated techniques like ODBC.
For now just Win32 support is needed, but if Win64 and OS-X support is also available that would be a bonus.
I googled around a bit, but the only lib that's available (ZEOS) looks like it is no longer in active development.
There does seem to be a patch for Delphi XE2 but I could not get it to compile.
As of right now: No.
You either route through ADO -> ODBC, dbExpress -> ODBC (for XE2*, see below), hope to make Zeos work, or pay for one of the various commercial components (PostgresDAC, DevArt, or AnyDAC, to name a few).
While Delphi XE2 comes with an ODBC driver for dbExpress, it's only for the Enterprise SKU and higher -- it's not available in Pro. For XE2 Pro users and users of older versions of Delphi there's Open dbExpress. I've tried using it before, but always had trouble with it. It's been updated since I've last used it though, so maybe whatever problems I had (which may have been my own fault) aren't an issue anymore.
All this said, ODBC isn't really an outdated technology. On non-Windows systems it seems to be the preferred DB-agnostic API. That said, it seems that many environments prefer to implement their own connectivity (e.g. QT, GNOME) rather than relying on ODBC exclusively. However, for the PostgreSQL project itself, their default (and best supported) connectivity API is ODBC.
Update: In fact, Microsoft is making ODBC their premier connectivity API for SQL Server starting with SQL Server 2002 (codenamed Denali). See: Microsoft Aligning with ODBC and Microsoft is Aligning with ODBC for Native Relational Data Access. This is the last release that will support OLE DB, and Microsoft is encouraging developers to use ODBC.
Turns out you can get ZEOS to work on Delphi XE2 and as far as I've tested all DB functionality works.
Here are the steps to follow:
Use SVN* to download the Delphi XE2 archive for ZEOS at:
https://zeoslib.svn.sourceforge.net/svnroot/zeoslib/branches/testing
Put the zeos folder in the appropriate place, I'm assuming c:\borland
Do not open Delphi yet, but instead open
C:\borland\zeos\packages\delphi16\ZComponent.dpk in wordpad and remove the trailing {$IFDEF} (remember to keep the ; in place).
Open c:\borland\zeos\packages\delphi16\ZeosDbo.groupproj.
Choose build all
Open c:\borland\zeos\packages\delphi16\build in explorer, copy all .bpl files and copy those to c:\borland\delphixe2\bin
Component -> install packages -> [add...] and choose
c:\borland\delphixe2\bin\ZComponentDesign.bpl
as a SVN client I've downloaded SVN-tortoise from: http://tortoisesvn.net/downloads.html
Combined with both the SVN plug-ins for Firefox

Error message "Incorrect values within SQLDA structure" with Firebird and Delphi 2009

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.

Resources