Delphi 2010 connection to AS/400 iSeries using dbexpress

I have tried several times to use the dbexpress drivers for connection to an iSeries V5/R4. I have downloaded the files from www.sawatzki.de and tried to run the test programs, but every time I run up my application I get an unknown driver CA400 error. I try changing the driver name and connections in the dbconnections.ini and dbxdrivers.ini so that it uses AS400 but this puts a unit into my project which I don't have.
I gave up on this project due to lack of time and did the whole thing using dbGo and ADOConnections etc which got my project running in about 5 mins using a odbc connection. The problem is that I need to distribute an applicaition and would much prefer to use the DBExpress drivers. Can anyone help? The peter sawatzki web site is about 2 years old and although he mentions that this is suitable for Delphi 2010 there is nothing in the download that works.
0
Steve
5/20/2010 2:52:12 PM
embarcadero.delphi.dbexpress 764 articles. 0 followers. Follow

5 Replies
1268 Views

Similar Articles

[PageSpeed] 29

Am 20.05.2010 16:52, Steve Hughes wrote:
> I have tried several times to use the dbexpress drivers for connection to an iSeries V5/R4. I have downloaded the files from www.sawatzki.de and tried to run the test programs, but every time I run up my application I get an unknown driver CA400 error. I try changing the driver name and connections in the dbconnections.ini and dbxdrivers.ini so that it uses AS400 but this puts a unit into my project which I don't have.

I had the same problem when I migrated from Delphi 7 to Delphi 2009 and 
created a new application with this AS/400 dbExpress driver.

The solution was:

* configure a connection for a different supported database (like 
InterBase) first
* check that the needed dbExpress units are added automatically to the unit
* change the connection to use the AS/400 drivers

One of the units which are added automatically does some necessary 
initialization of the AS/400 driver. I have not investigated further and 
I am not an expert for dbExpress so I am not sure if this is a bug.

Greetings,
-- 
Michael Justin
SCJP, SCJA
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com - http://www.betabeans.de
0
Michael
5/21/2010 4:32:16 PM
Steve Hughes wrote:

> I have tried several times to use the dbexpress drivers for
> connection to an iSeries V5/R4. I have downloaded the files from
> www.sawatzki.de and tried to run the test programs, but every time I
> run up my application I get an unknown driver CA400 error. I try
> changing the driver name and connections in the dbconnections.ini and
> dbxdrivers.ini so that it uses AS400 but this puts a unit into my
> project which I don't have.  I gave up on this project due to lack of
> time and did the whole thing using dbGo and ADOConnections etc which
> got my project running in about 5 mins using a odbc connection. The
> problem is that I need to distribute an applicaition and would much
> prefer to use the DBExpress drivers. Can anyone help? The peter
> sawatzki web site is about 2 years old and although he mentions that
> this is suitable for Delphi 2010 there is nothing in the download
> that works.

The driver delivered with Delphi 2010 is recent and the driver on my
website too (although the message on the start page may be not updated).

That you are using "CA400" as noted in you message indicates that you
did not follow the instructions in readme as I use "AS400" instead of
CA400 in the latest drivers.

The readme however is missing the info below and this should already
solve your problems:

you have to modify your dbxdrivers.ini file (and sorry, the doc in my
readme is wrong for Delphi 2010).

Modify the [AS400] entry to look like this:

Put this into your dbxdrivers.ini and recreate the connection:

[AS400]
DriverUnit=DbxDynalink
;DriverPackageLoader=TDBXDynalinkDriverLoader,DBXCommonDriver120.bpl
;MetaDataPackageLoader=TDBXAS400MetaDataCommandFactory,DbxAS400Driver120
..bpl
;DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data
..DbxCommonDriver,Version=12.0.0.0,Culture=neutral,PublicKeyToken=91d62eb
b5b0d1b1b
;MetaDataAssemblyLoader=PS.Data.TDBXAS400MetaDataCommandFactory,PS.Data.
DbxAS400Driver,Version=12.0.0.0,Culture=neutral,PublicKeyToken=df047b757
d3f379a

Notice the “;” before the lines to disable them (or remove the lines
entirely.

Notice the “DbxDynalink” instead of dbxexpca400 !

Also make sure to close Delphi 2010 before making the modifications.

Remove “uses dbxexpca400” from your uses clause if it was already added.

Regards

Peter Sawatzki
0
Peter
5/22/2010 7:54:50 AM
Michael Justin wrote:

> Am 20.05.2010 16:52, Steve Hughes wrote:
> > I have tried several times to use the dbexpress drivers for
> > connection to an iSeries V5/R4. I have downloaded the files from
> > www.sawatzki.de and tried to run the test programs, but every time
> > I run up my application I get an unknown driver CA400 error. I try
> > changing the driver name and connections in the dbconnections.ini
> > and dbxdrivers.ini so that it uses AS400 but this puts a unit into
> > my project which I don't have.
> 
> I had the same problem when I migrated from Delphi 7 to Delphi 2009
> and created a new application with this AS/400 dbExpress driver.
> 
> The solution was:
> 
> * configure a connection for a different supported database (like 
> InterBase) first
> * check that the needed dbExpress units are added automatically to
> the unit * change the connection to use the AS/400 drivers
> 
> One of the units which are added automatically does some necessary 
> initialization of the AS/400 driver. I have not investigated further
> and I am not an expert for dbExpress so I am not sure if this is a
> bug.
> 
> Greetings,

Michael,

the dbxdynalink entry needs to be made in dbxdrivers.ini to make Delphi
add this autmatically to your project.

Modify the [AS400] entry in dbxdrivers.ini to look like this:

Put this into your dbxdrivers.ini and recreate the connection:

[AS400]
DriverUnit=DbxDynalink

Notice the “DbxDynalink” instead of dbxexpca400 !

Also make sure to close Delphi 2010 before making the modifications.

Remove “uses dbxexpca400” from your uses clause if it was already added.

Peter
0
Peter
5/22/2010 7:59:19 AM
Steve,

I updated the readme with the latest info and this is now also
reflected on the web page - get it while it's "hot" and let me know if
there are any further problems that prevent you from working with the
driver.

Peter

Steve Hughes wrote:

> I have tried several times to use the dbexpress drivers for
> connection to an iSeries V5/R4. I have downloaded the files from
> www.sawatzki.de and tried to run the test programs, but every time I
> run up my application I get an unknown driver CA400 error. I try
> changing the driver name and connections in the dbconnections.ini and
> dbxdrivers.ini so that it uses AS400 but this puts a unit into my
> project which I don't have.  I gave up on this project due to lack of
> time and did the whole thing using dbGo and ADOConnections etc which
> got my project running in about 5 mins using a odbc connection. The
> problem is that I need to distribute an applicaition and would much
> prefer to use the DBExpress drivers. Can anyone help? The peter
> sawatzki web site is about 2 years old and although he mentions that
> this is suitable for Delphi 2010 there is nothing in the download
> that works.
0
Peter
5/22/2010 8:09:16 AM
> Peter Sawatzki
Peter this did indeed help with the connection, unfortunately I am still having problems with using two queries on the same form. When I did this project using ADO I was able to connect to the database on form create, run the main query - a basic select query and then have a TDataPicker on the form which automatically populated another grid with a Crosstab query based on the date selected. I now get some very strange errors with the connection stating that it has a cursor that is not open as shown below
---------------------------
Weightscrosstab
---------------------------
cwbDB_Fetch returned error code 6036.

Server error class 1 code -501

Message id: SQL0501
Cursor DBXCRS20-1 not open.
Cause . . . . . :   The cursor DBXCRS20-1 was specified in a FETCH or CLOSE statement, but the cursor is not open. Cursor DBXCRS20-1 has one of the following conditions: -- Cursor DBXCRS20-1 was never opened. -- The cursor DBXCRS20-1 was opened in another program or another call of this program and the program was created with CLOSQLCSR(*ENDPGM). -- The cursor DBXCRS20-1 was opened in another module or another call of this module and the module was created with CLOSQLCSR(*ENDMOD). -- The cursor DBXCRS20-1
 was opened in another call of this program and programs which have run SQL statements have ended and the program was created with CLOSQLCSR(*ENDSQL). -- The cursor DBXCRS20-1 was opened in another call of this module and the activation group ended between calls. The module was created with CLOSQLCSR(*ENDACTGRP). -- The cursor was closed by a CLOSE, COMMIT, or ROLLBACK statement. -- The cursor DBXCRS20-1 was opened under a transaction which is different than the current transaction. Recovery  . . . :   Do
 one of the following and precompile again: -- Make certain that cursor DBXCRS20-1 is opened in the same program or module call prior to using the cursor in an FETCH or CLOSE statement. -- Specify either CLOSQLCSR(*ENDSQL), CLOSQLCSR(*ENDJOB), or CLOSQLCSR(*ENDACTGRP) when precompiling the application. -- If the cursor was closed by a COMMIT or ROLLBACK, specify HOLD on the COMMIT or ROLLBACK statement to preserve any open cursors, prepared statements, and locks on tables.
---------------------------
OK   
---------------------------
Do you have any ideas why this is occuring?
Thanks for the help previously.

regards
steve
0
Steve
5/24/2010 11:12:11 AM
Reply:

Similar Artilces:

Problem Deploying Delphi 2010 Application using dbExpress and SQL2000
Dear All, I am deploying an application written in Delphi 2010 using dbExpress to connect to my SQL2000 server. Somehow I keep getting DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, or of the wrong version. The program works on a machine which I have previously installed and then uninstalled a trial version of Delphi 2010, but failed to work on a machine that never installed Delphi on. Both machine has "SQL Native Client installed". I have purposely renamed the connection name in my dbxconnections.ini file an...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

Delphi 2010: dbExpress + MSSQL2000
Hello! I would like to migrate my Delphi2006 application that uses dbExpress to Delphi2010, but I can't connect to MS SQL 2000 (WinXP). the TSQLConnection component has the following properties: object SQLConnection1: TSQLConnection ConnectionName = 'MSSQLCONNECTION' DriverName = 'MSSQL' LoadParamsOnConnect = True end the dbxdrivers.ini module has in the section [MSSQL] LibraryName=dbxmss.dll VendorLib=oledb When I'm trying to connect there is an error: "DBX Error: Driver could not be properly initialized. Client library may be missing, not inst...

Delphi 2010 dbExpress MSSQL Driver
Hi All Is there any way to use the old dbxmss30.dll driver that comes with D2007? Just setting the SQLConnection parameters do the old driver doesnt work - which is a bit strange considering that the old driver was also version 4 and should be compatible. The reason I want this is because the old driver didnt need any client install and the new one does. This is a deployment nightmare and stopping us from moving to D2010. I wish Embaracadero will release a patch / fix for this ASAP Thanks Guy ...

Delphi 2010 - dbexpress
Hi I use the dbx driver for firebird named dbxfb.dll and in my application i do a select every seconds. the memory of the process increase every 30 minutes but when i use Fastmm to check the memory leaks : no memory leak. I have noticed that if i do not do the open and close primitive, no more memory leak !! Here is my source LQuery := TSQLQuery.Create(Self); LQuery.SQLConnection := SQLConnection; LQuery.CommandText := 'SELECT * FROM '+ TableName + ' where EventId = :EventId'; try LQuery.ParamByName('EventId').AsInteger := EventId; LQuery.Open; LResult...

DBExpress terrible performance when migrating from Delphi 7 to Delphi 2007
Hi, When I'm migrating my project from Delphi 7 to Delphi 2007, I found that the speed slow down 3-4 times. I've started to investigate what is the reason of that and I've found that the problem is in the TSQLDataset component. So I make a simple example of an application that run one of my problem queries that fetches about 30000 rows and the result was amazing d7: 1500ms, d2007: 13500ms 8 times slower !!!! Here are some perameters of the TSQLConnection Delphi 7: object SQLConn: TSQLConnection ConnectionName = 'OracleConnection' DriverName = '...

Bug in DBExpress/Datasnap for Delphi 2010?
My code works fine using DBExpress in D2009 and using DdbGo in D2009/2010. However it does not work in DBExpress 2010. I create a query based around a TClientDataset (with a TSQLDataset and TDatasetProvider). The query is a Datasnap query. The query has more than one field in it which is of type 'blob'. If the blob field is the *first* field in the query then I can go: SELECT SearchIcon, SectionIcon FROM Env ORDER BY ID FieldStream := TestQuery.CreateBlobStream(TestQuery.FieldByName('SearchIcon'), bmRead); and FieldStream.Size will not be 0 However if...

Delphi 2010 and ASA 11 with dbExpress?
Hi, Just upgraded from D5Pro to D2010Ent and am fumbling around. How do I connect to an ASA11 database (is it possible - I notice now that dbExpress shows support to ASA9?). Even if it is possible does dbExpress connect natively? The VendorLib property says dbodbc9.dll when I pick ASA for the driver. Thanks, Mike Looks like the answer is no dbExpress connection to SQL Anywhere 11. I can connect easily through the ADO stuff so I guess I'll start testing that way. Thanks, Mike > {quote:title=Michael Mount wrote:}{quote} > Hi, > > Just upgraded from D5P...

Delphi 2010 DBExpress data types
Delphi 2006, 2007 and 2009 - DBExpress driver for Oracle, MSSQL and Interbase = recognize numeric(10,0) as TFMBCDField however Delphi 2010 - DBExpress driver for Oracle, MSSQL and Firebird = recognize numeric(10,0) as TLargeIntField So if someone try to migrate from versions before 2010 need to remove all the fields from clientDataSet and add again to "migrate" to the new type (TLargeIntField) is this the only way ? Toni Wickert wrote: > So if someone try to migrate from versions before 2010 need to remove > all the fields from clientDataSet and add again to "mig...

Delphi 2010 & Firebird
In D2007 I was using IBObjects. I was excited to hear that Delphi was including Firebird support and upgraded to D2010 Enterprise. I should have spent more time evaluating the db connectivity before settling on Enterprise as I may still prefer IBObjects. I still want D2010 for other reasons but I may have been fine with the much more inexpensive pro version. So my questions are regarding DBExpress versus IBObjects: Will I be able to use IBEvents with DBExpress? What about deployment? I need to distribute DLLs with DBExpress? With IBObjects everything is compiled into my EXE...it ...

delphi 2010 dbExpress data explorer broken
I installed rad studio 2010 on a computer where I have rad studio 2007 & 2009 and while the dbexpress data explorer works in 2007 & 2009, it is broken in 2010. I get the dreaded error: Unable to cast object of type 'Borland.Data.TDBXDynalinkDriverLoader' to type 'Borland.Data.TDBXDriverLoader' How can I solve this? I tried to uninstall 2010 and then I re-installed it, I tried to modify/repair etc. Nothing works. To add insult to injury, it works fine on my laptop where I also have rad 2009. Thanks > {quote:title=costa basil wrote:}{quote} > I inst...

Delphi XE / Delphi 2010
Hello! I noticed that Embarcadero® Delphi® 2010 Version is not on the list of products on Embarcadero page. Or is it still possible to buy it? Will RAD Studio XE compile programs written in Delphi 2010 without problems.? Thanks. Am 13.09.2010 09:04, schrieb Petra Nemec: > Will RAD Studio XE compile programs written in Delphi 2010 without problems.? As always you will probably have to recreate the projects as the import is still a bit -- special. Christian Hello! Does anybody know if it is still possible to get a Delphi2010 trial version (if yes where)? ...

from delphi 6 to delphi 2010
Hi. It is possible, with component RX, dxforumlibrary, InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. Thank by comments. excequiel arostica wrote: >Hi. > It is possible, with component RX, dxforumlibrary, >InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. > >Thank by comments. Rx is dead and sources are taken over by jcl/jvcl. I dont know about the rest of the components and i have no experiences with bde over the last 9 years. excequiel arostica wrote: > Hi. > It is possible, with component RX, dxforumlibrary,...

delphi 2010 dbExpress data explorer broken [Edit]
I installed rad studio 2010 on a computer where I have rad studio 2007 & 2009 and while the dbexpress data explorer works in 2007 & 2009, it is broken in 2010. I get the dreaded error: Unable to cast object of type 'Borland.Data.TDBXDynalinkDriverLoader' to type 'Borland.Data.TDBXDriverLoader' How can I solve this? I tried to uninstall 2010 and then I re-installed it, I tried to modify/repair etc. Nothing works. I cannot believe someone in the team didn't try it. Thanks > {quote:title=costa basil wrote:}{quote} > I installed rad studio 2010 on a c...

Web resources about - Delphi 2010 connection to AS/400 iSeries using dbexpress - embarcadero.delphi.dbexpress

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Kings Cross identities arrested in connection with murder
Two Kings Cross identities have been arrested in connection with the murder of a man at Sydney hotel.

Faith: Spirits lift in connection with home
We need to more adequately understand the spirituality of our unique place on earth.

Governor declares state of emergency in connection with California methane leak
... of Emergency Services) On Wednesday evening, California Governor Jerry Brown declared a state of emergency in Los Angeles County in connection ...

Tons Of Methane Are Spewing Out Of California, And There’s A Connection To The Governor
The out of control leak has forced thousands of residents to flee their homes. Gov. Brown's sister is a paid board member at the company that ...

Report: Man arrested in connection with Ashley Olsen's murder
Italian media agency reports that a non-EU male has been arrested in the murder of the 35-year-old American

Toyota and Kymeta rely on satellites to power this Mirai's data connection
They're hoping to achieve gigabit wireless speeds within the next few years.

Resources last updated: 1/16/2016 9:28:17 PM