DBX error in Delphi XE3, when connecting to a SQL Server database - delphi

When I try to connect to a MS SQL Server database using DBX an error pops up saying that the driver is not properly installed, or missing. I tried with ADO driver and it worked like charm, but the thing is that I need DBX driver to work because I want to modify an app that has been developed with DBX technology.
I reinstalled Delphi XE3, and also asked a friend of mine to test it and the error is the same. Does somebody has any ideea on how to solve it ?
The exactly message was this:
Borland.Data.TDBXError: 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 must mention that I tried it on a local instance of MSSQL Server 2012 and on a remote MSSQL Server 2008 instance. My OS win8 x64;
Best regards,

This is most likely caused by the wrong version of the SQL Native Client installed on your system. DBX will only work with V10, while you probably have V11 installed. Try to install the V10 version of the client.

Related

RAISERROR doesn't return correct error message using DB Express on Windows 10

I am running my application which is developed in Delphi 10.1 berlin Update 2 on windows 10 and it is accessing the Database through network (I am using SQL Server 2016 and it is installed on different machine), when stored procedure raises error using
`raiseerror(msg,16,1)`
application gets following message:
`SQL State: 42000, SQL Error Code: 50000`
but the message doesn't contain error string. If I run same query on SQL Management Studio, I get below error.
SQL State: 42000, SQL Error Code: 50000
MSG
I tried to run the same on windows 7 and windows Server 2012 R2 with same configuration, this time it give desired error message containing error string.
I am using dbexpress for handling queries in the application. (NOTE If I replace the implementation from dbexpress to BDE it is working fine in windows 10).
I tried to copy following .dll files of dbexpress and also dbxdrivers.ini file at the location where .exe is present
Borland.Data.DBXMSSQLDriver.dll
dbxadapter.dll
dbxasa.dll
dbxase.dll
dbxdb2.dll
dbxfb.dll
dbxinf.dll
dbxint.dll
dbxmss.dll
dbxmss9.dll
dbxmys.dll
dbxora.dll
Midas.dll
This looks like machine specific issue. Machines having windows 10 but don't have Delphi 10.1 berlin Update 2 installed, we are using these machines as Client machine where we install the application.
Also we observed these issues on application developed using Delphi XE2. So it doesn't seems to be Delphi Issue.
NOTE: Windows 10 client machines having Delphi and SQL server installed, this issue doesn't occur even with dbExpress.
Can someone please help me with this situation? Do I need copy any specify assembly files along with the package?

DBX Error in Delphi Berlin 64bit compiler: Driver could not be properly initialized. When connecting to a Oracle 12c DB Server

I got the stopper error below in my apps. I used Delphi Berlin 64bit compiler. And also used the dbxora.dll as dbxpress driver default from embarcadero. Connected to Oracle 12c DB server using TSQLConnection component.
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.
How can I fix this?
A DB Express driver is not always sufficient on it's own to connect to some data sources. For certain data sources (most of them in fact) you also require the client drivers for that data source, usually provided by the database vendor themselves.
Oracle is one of these.
As well as the DB Express driver you also need to install the Oracle Client software provided by Oracle. You also need to ensure that you install the correct version.
i.e. in your case since you indicate you are building a 64-bit application then you will need the 64-bit Oracle client.
If you (or your intended users) already have the 32-bit Oracle client installed then you might consider building your application as a 32-bit application instead, unless you absolutely need 64-bit capabilities.

Loading SSL module failed. One or more mapped methods are not available

I have DataSnap client application (delphi XE6).
On PC where installed Delphi XE6, my application worked properly.
But on other PCs (Windows 7, no installed Delphi XE) I got this error:
"Loading SSL module failed. One or more mapped methods are not available"
Could anybody help me please.
Thanks in advance.
UPDATED
Project Options - Runtime Packages - Link with runtime packages is unchecked (win 32, release configuration) pic
If I will clear encryption filters for TDSTCPServerTransport component on the datasnap server side, the client application is working properly on any windows machine.
DSTCPServerTransport1.Filters.Clear();
Check which modules are really loaded, using ProcessExplorer from SysInternals pack. Your app can load libraries which are in %PATH% and already used by Teamviewer or VPN client or something else. So you may need to install library from OpenSSL site, install it and make its directory first in %PATH% environment variable.

How to run a win32 native application that requires sql server native client on MacOSX with winebottler?

I am experimenting with WineBottler and I would like to try to run my win32 native application written in Delphi on OSX.
The application runs, but I stop at login screen since I cannot connect to SQL Server.
Does anyonw know how to install and configure SQL Server native client on OSX so that it is usable with WineBottler?
Note: I put "wine" as tag since "winebottler" is not available.
I have a Delphi application that uses MDAC 2.8 for ADO connection to the Jet provider. I use Winetricks to install MDAC 2.8, and it works great. If you can't get SQL Server Native Client to install, perhaps your application can use the OLEDB SQL Server provider by tweaking your connection strings. Are you using any features that are only in SQL Server Native Client?
You would have a lot less trouble if you put in some middleware like kbmMW, Remote Objects, or DataSnap. All of them can use plain TCP/IP (via http or like higher level protocol), and don't require client side libs. You will need an extra server, but it is easy to create one that just forwards your SQL and data between clients and SQL server. Note that SQL server licensing remains.
On the other hand, you can try to install SQL Server native client, some older version of it - eg. for SQL Server 2005, in that "bottle" with your application. Yet, I'm not sure if that is legal thing to do. I think that MS prohibits native client installation on OS other than Windows.
There is FreeTDS native client that works with MSSQL from unices, but it is not ported to be usable from Delphi (like dbx driver).

rails ODBC data source problem?

Here's an odd situation, if I open a command prompt and start the mongrel server then everything works swimmingly. ActiveRecord talks nicely to the MSSQL server using ODBC if I have a User-DSN defined. But if remove the User-DSN and set just an identical System-DSN then odbc bombs:
[Microsoft][ODBC Driver Manager] Data
source name not found and no default
driver specified
I am running Rails on Windows 2003 Server 64bit, using DBI 0.4.1, DBD-ODBC 0.2.4, Rails 2.3.4. I've tried using ODBC manager for 32bit and double-checked that the connection is working from the ODBC Administration panel. Does anyone have any ideas?
Frustrating! As it turns out, I had to use regedit to access HKLM/Software/ODBC/ODBC.INI children key (DSN) and changed the SQLServer driver there to be c:\windows\system32\SQLSRV32.dll. Even though the ODBC Administration Panel had this specified and its tests ran fine, it wasn't working until I tweaked the registry. So odd..
Hope it helps someone else in the future.
For me the problem was that I was entering the ODBC connections into the 64 bit version of the ODBC Data Source Administrator. When I went to
C:\Windows\SysWOW64\odbcad32.exe
, and re-entered the drivers here (the others were not there!), and all worked fine after that.
blog entry where I found this

Resources