Getting [FireDAC][Phys][ODBC][CWBODBC.DLL] SQL_ERROR in XE8 - XE6 works OK

Hi 
I havde just installed XE8 and I am testing connection to an iSeries (AS/400) system.
I have done it successfully in XE6 but with XE8 I am getting the error message shown in the mail subject.
The set up is the same in XE6 and XE8 
Below I have copied the info tab from XE6 and XE8 (have replacded the IP address with Xs)
In XE8 it does not seem to connect to AS/400 at all - since I am entering invalid sign on info and I do not get any sign on failure messages.

The ODBCadvanced parameter string is the same in XE6 & XE8:
SYSTEM=XX.XX.XX.XX;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,2,0,512;SIGNON=1
Was, and is, very happy with the XE6 connection but struggeling with XE8...
Please - anybody got any good ideas?
Thanks in advance.

================================
Connection definition parameters  THIS IS XE6
================================
Database=LIMB602F
ODBCAdvanced=SYSTEM=XX.XX.XX.XX;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,1,0,512;SIGNON=1
ODBCDriver=iSeries Access ODBC Driver
User_Name=ROEDJE
DriverID=ODBC
================================
FireDAC info
================================
Tool = RAD Studio XE6
FireDAC = 10.0.1 (Build 69712)
Platform = Windows 32 bit
Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
================================
Client info
================================
Loading driver ODBC ...
  Loading odbc32.dll driver manager
  Creating ODBC environment handle
Driver Manager version = 03.80.7601.0000
================================
Session info
================================
Current catalog = 
Current schema = 
Driver name = CWBODBC.DLL
Driver version = 05.03.0040
Driver conformance = 2
DBMS name = DB2/400 SQL
DBMS version = 05.01.0010

******************************************************************************************************
================================
Connection definition parameters  THIS IS XE8
================================
Database=LIMB602F
User_Name=ROEDJE
ODBCDriver=iSeries Access ODBC Driver
DriverID=ODBC
ODBCAdvanced=SYSTEM=XX.XX.XX.XX;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,2,0,512;SIGNON=1
================================
FireDAC info
================================
Tool = RAD Studio XE8
FireDAC = 12.0.1 (Build 78853)
Platform = Windows 32 bit
Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
================================
Client info
================================
Loading driver ODBC ...
  Loading odbc32.dll driver manager
  Creating ODBC environment handle
================================
Session info
================================
Failed to connect to DBMS !
[FireDAC][Phys][ODBC][CWBODBC.DLL] SQL_ERROR
0
Jan
8/14/2015 2:39:09 AM
embarcadero.delphi.firedac 822 articles. 2 followers. Follow

5 Replies
1748 Views

Similar Articles

[PageSpeed] 47

> {quote:title=Jan-Erik Roed wrote:}{quote}
> Hi 
> I havde just installed XE8 and I am testing connection to an iSeries (AS/400) system.
> I have done it successfully in XE6 but with XE8 I am getting the error message shown in the mail subject.
> The set up is the same in XE6 and XE8 
> Below I have copied the info tab from XE6 and XE8 (have replacded the IP address with Xs)
> In XE8 it does not seem to connect to AS/400 at all - since I am entering invalid sign on info and I do not get any sign on failure messages.
> 
> The ODBCadvanced parameter string is the same in XE6 & XE8:
> SYSTEM=XX.XX.XX.XX;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,2,0,512;SIGNON=1
> Was, and is, very happy with the XE6 connection but struggeling with XE8...
> Please - anybody got any good ideas?
> Thanks in advance.
> 
> ================================
> Connection definition parameters  THIS IS XE6
> ================================
> Database=LIMB602F
> ODBCAdvanced=SYSTEM=XX.XX.XX.XX;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,1,0,512;SIGNON=1
> ODBCDriver=iSeries Access ODBC Driver
> User_Name=ROEDJE
> DriverID=ODBC
> ================================
> FireDAC info
> ================================
> Tool = RAD Studio XE6
> FireDAC = 10.0.1 (Build 69712)
> Platform = Windows 32 bit
> Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
> ================================
> Client info
> ================================
> Loading driver ODBC ...
>   Loading odbc32.dll driver manager
>   Creating ODBC environment handle
> Driver Manager version = 03.80.7601.0000
> ================================
> Session info
> ================================
> Current catalog = 
> Current schema = 
> Driver name = CWBODBC.DLL
> Driver version = 05.03.0040
> Driver conformance = 2
> DBMS name = DB2/400 SQL
> DBMS version = 05.01.0010
> 
> ******************************************************************************************************
> ================================
> Connection definition parameters  THIS IS XE8
> ================================
> Database=LIMB602F
> User_Name=ROEDJE
> ODBCDriver=iSeries Access ODBC Driver
> DriverID=ODBC
> ODBCAdvanced=SYSTEM=XX.XX.XX.XX;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,2,0,512;SIGNON=1
> ================================
> FireDAC info
> ================================
> Tool = RAD Studio XE8
> FireDAC = 12.0.1 (Build 78853)
> Platform = Windows 32 bit
> Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
> ================================
> Client info
> ================================
> Loading driver ODBC ...
>   Loading odbc32.dll driver manager
>   Creating ODBC environment handle
> ================================
> Session info
> ================================
> Failed to connect to DBMS !
> [FireDAC][Phys][ODBC][CWBODBC.DLL] SQL_ERROR

Some more information:
I was wrong about not getting login failure when submitting wrong password. I do get the correct response - incorrect password.
Having searched the net it might seem that the driver does not get a correct windowhandle/ODBC environment handle?
0
Jan
8/15/2015 2:06:52 AM
> {quote:title=Jan-Erik Roed wrote:}{quote}
> Hi 
> I havde just installed XE8 and I am testing connection to an iSeries (AS/400) system.
> I have done it successfully in XE6 but with XE8 I am getting the error message shown in the mail subject.
> The set up is the same in XE6 and XE8 
> Below I have copied the info tab from XE6 and XE8 (have replacded the IP address with Xs)
> In XE8 it does not seem to connect to AS/400 at all - since I am entering invalid sign on info and I do not get any sign on failure messages.
> 
> The ODBCadvanced parameter string is the same in XE6 & XE8:
> SYSTEM=XX.XX.XX.XX;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,2,0,512;SIGNON=1
> Was, and is, very happy with the XE6 connection but struggeling with XE8...
> Please - anybody got any good ideas?
> Thanks in advance.
> 
> ================================
> Connection definition parameters  THIS IS XE6
> ================================
> Database=LIMB602F
> ODBCAdvanced=SYSTEM=XX.XX.XX.XX;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,1,0,512;SIGNON=1
> ODBCDriver=iSeries Access ODBC Driver
> User_Name=ROEDJE
> DriverID=ODBC
> ================================
> FireDAC info
> ================================
> Tool = RAD Studio XE6
> FireDAC = 10.0.1 (Build 69712)
> Platform = Windows 32 bit
> Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
> ================================
> Client info
> ================================
> Loading driver ODBC ...
>   Loading odbc32.dll driver manager
>   Creating ODBC environment handle
> Driver Manager version = 03.80.7601.0000
> ================================
> Session info
> ================================
> Current catalog = 
> Current schema = 
> Driver name = CWBODBC.DLL
> Driver version = 05.03.0040
> Driver conformance = 2
> DBMS name = DB2/400 SQL
> DBMS version = 05.01.0010
> 
> ******************************************************************************************************
> ================================
> Connection definition parameters  THIS IS XE8
> ================================
> Database=LIMB602F
> User_Name=ROEDJE
> ODBCDriver=iSeries Access ODBC Driver
> DriverID=ODBC
> ODBCAdvanced=SYSTEM=XX.XX.XX.XX;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,2,0,512;SIGNON=1
> ================================
> FireDAC info
> ================================
> Tool = RAD Studio XE8
> FireDAC = 12.0.1 (Build 78853)
> Platform = Windows 32 bit
> Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
> ================================
> Client info
> ================================
> Loading driver ODBC ...
>   Loading odbc32.dll driver manager
>   Creating ODBC environment handle
> ================================
> Session info
> ================================
> Failed to connect to DBMS !
> [FireDAC][Phys][ODBC][CWBODBC.DLL] SQL_ERROR

Some more information:
I was wrong about not getting login failure when submitting wrong password. I do get the correct response - incorrect password.
Having searched the net it might seem that the driver does not get a correct windowhandle/ODBC environment handle?
0
Jan
8/15/2015 2:07:21 AM
If you have FireDAC sources, then try the following fix:
- open FireDAC.Phys.ODBCWrapper.pas
- locate there TODBCConnection.AfterConnect method
- find there code:
{code}
  else if Match('DB2CLI') or Match('LIBDB2') or Match('IVDB2') or Match('PBDB2') or
          // IBM DB2 ODBC driver has a bug and returns ODBC_VER instead of DRIVER_NAME
          (Copy(sDbms, 1, 3) = 'DB2') then
    FDriverKind := dkDB2
{code}
- replace it with the code:
{code}
  else if Match('DB2CLI') or Match('LIBDB2') or Match('IVDB2') or Match('PBDB2') or
          // IBM DB2 ODBC driver has a bug and returns ODBC_VER instead of DRIVER_NAME
          (Copy(sDbms, 1, 3) = 'DB2') or
          // AS400/DB2
          Match('CWBODBC') then
    FDriverKind := dkDB2
{code}
- save unit
- add path to FireDAC source folder to your IDE Library Path
- recompile app

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect
0
Dmitry
8/18/2015 6:21:35 AM
> {quote:title=Dmitry Arefiev wrote:}{quote}
> If you have FireDAC sources, then try the following fix:
> - open FireDAC.Phys.ODBCWrapper.pas
> - locate there TODBCConnection.AfterConnect method
> - find there code:
> {code}
>   else if Match('DB2CLI') or Match('LIBDB2') or Match('IVDB2') or Match('PBDB2') or
>           // IBM DB2 ODBC driver has a bug and returns ODBC_VER instead of DRIVER_NAME
>           (Copy(sDbms, 1, 3) = 'DB2') then
>     FDriverKind := dkDB2
> {code}
> - replace it with the code:
> {code}
>   else if Match('DB2CLI') or Match('LIBDB2') or Match('IVDB2') or Match('PBDB2') or
>           // IBM DB2 ODBC driver has a bug and returns ODBC_VER instead of DRIVER_NAME
>           (Copy(sDbms, 1, 3) = 'DB2') or
>           // AS400/DB2
>           Match('CWBODBC') then
>     FDriverKind := dkDB2
> {code}
> - save unit
> - add path to FireDAC source folder to your IDE Library Path
> - recompile app
> 
> -- 
> With best regards,
> Dmitry Arefiev / FireDAC Architect

Hi Dmitry.
Still get the SQL error I am afraid.
I have debugged and it has done the assignment FDriverKind := dkDB2

Here's the Info:
================================
Connection definition parameters
================================
Database=QGPL
User_Name=PROEDJE
ODBCDriver=iSeries Access ODBC Driver
ODBCAdvanced=SYSTEM=xx.xx.xx.xx;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,1,0,512;SIGNON=1
DriverID=ODBC
================================
FireDAC info
================================
Tool = RAD Studio XE8
FireDAC = 12.0.1 (Build 78853)
Platform = Windows 32 bit
Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
================================
Client info
================================
Loading driver ODBC ...
  Loading odbc32.dll driver manager
  Creating ODBC environment handle
  Variable [ODBCDriver]: [iSeries Access ODBC Driver]
================================
Session info
================================
Failed to connect to DBMS !
[FireDAC][Phys][ODBC][CWBODBC.DLL] SQL_ERROR

================================================================

This is the code from  the ODBC Wrapper:
................
  else if Match('IVSS') or Match('IVMSSS') or Match('PBSS') or
          ((Copy(sDrv, 1, 3) = 'NTL') and (sDrv[5] = 'M')) then
    FDriverKind := dkSQLSrvOther

// Replaced code below on advice from Dmitry
  else if Match('DB2CLI') or Match('LIBDB2') or Match('IVDB2') or Match('PBDB2') or
          // IBM DB2 ODBC driver has a bug and returns ODBC_VER instead of DRIVER_NAME
          (Copy(sDbms, 1, 3) = 'DB2') or
          // AS400/DB2
          Match('CWBODBC') then
    FDriverKind := dkDB2
//  Old code
{
  else if Match('DB2CLI') or Match('LIBDB2') or Match('IVDB2') or Match('PBDB2') or
          // IBM DB2 ODBC driver has a bug and returns ODBC_VER instead of DRIVER_NAME
          (Copy(sDbms, 1, 3) = 'DB2') then
    FDriverKind := dkDB2
}
  else if Match('MYODBC') then
..........
0
Jan
8/18/2015 9:25:04 AM
Ok. Then please:
1) Run application, try to connect, get the exception, stop in debugger and provide a call stack for the exception.
2) Provide XE6 environment report.
3) Will be great to have ODBC trace file for step (1).

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect
0
Dmitry
8/18/2015 5:46:59 PM
Reply:

Similar Artilces:

FireDAC.Phys.ODBC component gives compiler error in XE8 not in XE7
After upgrading to XE8, I got the following compiler error when using TFDPhysODBCDriverLink class component: dcc32 Fatal Error F2613 Unit 'FireDAC.Phys.TDataMeta not found. This worked before in XE7 and I was able to access ODBC files (Mdb & Xls) using FDConnection, FDTable, FDPhysODBCDriverLink1, and FDGUIxWaitCursor1. I just installed Hotfix Update 1 and it did not help this error. Do I need to add to the Library list a folder path? Thanks for any help. Bob Carson wrote: > After upgrading to XE8, I got the following compiler error when using TFDPhysODBCDriverLink class comp...

FireDAC and Delphi Pro XE4... firedac tab not visible?
I am moving from a very old Borland product (2006) to Delphi XE4 Professional with FireDAC addon. I purchased both from Embarcadero, and have downloaded both. The documentation says the FireDAC components should automagically appear in the tabset for Delphi. They do not. I don't want to fool around too much as my environment is strictly controlled by IT, and they are very slow to do anything. Is there something that I should have done, but did not do? I installed XE4 first, registered it, then used the link in my email from Embarcadero to download the FireDAC components. Then I ra...

FastScript in Delphi XE8
I am converting from Delphi 2006 to Delphi XE8, and am now nearing the finish line, but have one remaining major roadblock: FastScript I use Fastscript very heavily as a way to allow our users to write scripts that can extend our software as much as they like, including creating forms and adding buttons. This is not working. A specific problem that I have, is that code that works great in Delphi 2006 does not work in Delphi XE8. Specifically, if my script contains a reference to a "TForm", or "TBitBtn" (as well as many other components), then FastScript will return ...

FastScript in Delphi XE8
*Edit: This is now solved, but I leave the original message below for reference. The solution was essentially to delete all traces of FastReports (That's "Reports", not "Script") from the computer, as it was interfering with FastScript. This was actually fairly involved to do, and we did it under the supervision of someone from FastScript tech support, who was extremely helpful. If you run into the problem described below, be sure to contact their technical support and see if maybe you are experiencin g the same issue, and how to resolve it. I hope this is helpfu...

Does anybody know where to get unit FireDAC.Phys.Oracle for XE5?
I'm trying to build a simple XE5 VCL app to connect to an Oracle database using FireDAC. I added the FireDAC connection and table components to the form but I get an error requesting I add the Oracle "link" component when I try to connect to the database. However there is no entry like "TFDPhysOracleDriverLink" in the tools palette and I cannot locate a DCU for that item. Is there a separate FireDAC installer that contains this component? The only similar component I find in the /lib/win32/release folder is "FireDAC.Phys.OracleMeta.dcu". I also tried re...

FireDac
Hello, I am using Delphi XE4 and facing a problem with FireDac (8.0.5) and MySQL. I'm trying to get the last 100 records from a large table (20 million rows). When I run the following SQL: {code}select * from largetable order by FId limit 100{code} in MySQL Workbench it returns in 0.2 seconds. When I run the above SQL in Delphi through an ADQuery it never returns (Delphi freezes). Any Ideas ? Thank you ...

Delphi XE7 FireDac ODBC connecting to Quickbooks 2015 using QODBC Driver
I have a Windows 32 Application using Delphi XE7 FireDac ODBC connecting to Quickbooks 2015 version using the QODBC driver from Inuit. However, I can connect using Delphi XE6 version with FireDac ODBC driver component. When I try to connect get this error message: Read of Address in module KERNELBASE.dll Access Violation at address . I have try several things even compiling under 32bit and 64bit same error, but compiled in Delphi XE6 it works fine! Has anyone else seen this? Thanks Garnet Hello If you like, you can send test database file to Dmitry dot Arefiev at embarcadero dot co...

Is dll developed in Delphi 6 works on Delphi 2?
I have a one dll, whose work is to creates a form with some normal vcl controls, print selected tables and email some reports. It was developed in Delphi 6. Can any other application which was developed in Delphi 2 use that dll.? If not, please let me know in which areas i need change. The dll work is only to print and email. With regards, Srikanth Varma Srikanth varma wrote: > I have a one dll, whose work is to creates a form with some normal > vcl controls, print selected tables and email some reports. It was > developed in Delphi 6. Can any other application which was d...

dll fails when compiled with delphi 2010, but works with delphi 7
I may be doing good if someone can just point me to the right forum I have not created a dll for some time and have not written one with 2010 before. The dll I am creating will be called as a cfx function by either a ColdFusion or BlueDragon webserver. I have written cfx DLLs in the past. The function declaration is below, it is the standard declaration from ColdFusion or Bluegradon documention on creating a CFX. procedure ProcessTagRequest(Request: TCFXRequest); export; cdecl; Since this was the first time using 2010 I wrote a very basic function to build off that was not much mor...

Trying to call a .DLL from Delphi XE (used to work with Delphi 6 :-) )
Hi everyone, I have a problem where perhaps some one could help point me in the right direction. In Delphi 6 I used a stand alone package to train a neural netowrk,. The trained neural network was stored as a .DEF file. The standalone software provided a .DLL and Delphi code to call the network and get the prediced values from your sw. (The .DLL was created in 2002 and apparently is 32 bit.) I have'nt used it for years but am now coming back to it.... I now use Delphi XE on Windows 7 (32 bit) The old .exe's I had compiled from that time work fine. However in Delphi XE ...

FireDAC?
I'm starting a new development initiative and want to pick the tech that will last the longest and have the most complete feature set. Elsewhere someone noted that DBExpress has been deprecated in favour of FireDAC. I seem to have missed the announcement of FireDAC. So I'm looking for any info on what FireDAC is and why I should use it. Any links? I just discovered the FireDAC newsgroup and the first message there is an announcement with links to the product info and documentation. So my basic question (What is it?) is answered. Still don't know the future of DBExpr...

Getting ODBC to Work
Can someone shed some light on using ODBC between two different OS's? I have an application in which the database server lives in the QNX (Unix) environment. I am using Sybase SQL for QNX version 5.03. For the clients I want to use a windows program developed in Power++. This app will connect to the QNX Sybase database using ODBC. A while ago I did have a simple proof of theory connectivity app running. Now I can't remember how I did it !! On the QNX side I start the database with the -x tcpip option and use the -n testdb to give it a name. The database starts up and eve...

FireDac Delphi Xe2
Hello, I have FireDac components installed to Delphi Xe2, My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param. It doesn't work. Maybe someone know what I have to change in FiredAc source ro remove this issue. I suggest to the FireDAC newgroup. You'll probably get a better response there. Sebastian Kumor wrote: > Hello, > I have FireDac components installed to Delphi Xe2, > My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param. > It doesn't work. Mayb...

FireDac Delphi Xe2
Hello, I have FireDac components installed to Delphi Xe2, My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param. It doesn't work. Maybe someone know what I have to change in FiredAc source ro remove this issue. I suggest to the FireDAC newgroup. You'll probably get a better response there. Sebastian Kumor wrote: > Hello, > I have FireDac components installed to Delphi Xe2, > My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param. > It doesn't work. Mayb...

It is FireDAC after all
Marco announces FireDAC: http://blog.marcocantu.com/blog/firedac_announced.html -- Nick The Buy Now button almost work ;-) > {quote:title=Nick Hodges wrote:}{quote} > Marco announces FireDAC: > > http://blog.marcocantu.com/blog/firedac_announced.html > That was fast :) delete this message > What's the price for XE3 Pro licensees? Introductory price is $399 -- With best regards, Dmitry Arefiev / FireDAC Architect http://www.embarcadero.com/products/rad-studio/firedac > All the links I found just go to a page that lets you purchase Delp...