Connect to AS/400 with ODBC

Hello,

I want to test the connection to the AS/400 database in the datamapper.
Therefore I created an action script to extract the data.

On the PlanetPress Server (Windows 12 R2 64) is a “Client Access ODBC Driver” installed.
In the script i try to connect to the database with:

var connectionURL = "{Client Access ODBC Driver}; Uid="sDB_User+";Pwd="+sDB_Password+";";
var sqlConnection = db.connect(connectionURL);
....

In messages it show the following error:
Error running script (Wrapped java.sql.SQLException: No suitable driver found for {Client Access ODBC Driver};Uid=...;Pwd=...;(#16)(DME000019)

Username and password are stored in variables.
The connectionstring should also be correct.

What can I do to resolve this error?

Thank you for your answers

NBecker

Can you connect to your AS/400 using the ODBC connector directly in Windows and try a connection test?

Under the windows 7 host-system i have created a short script with the help of stackoverflow (Simplest Way to Test ODBC on WIndows - Stack Overflow), and there the connection works.

The used connection-string is:
Driver={iSeries Access ODBC Driver};System=****;Uid=****;Pwd=****;

When I use the same string on the PlanetPress Server, which have the same ODBC-configuration, i got the message:
Error running script (Wrapped java.sql.SQLException: No suitable driver found for {Client Access ODBC Driver};Uid=...;Pwd=...;(#16)(DME000019)

I can’t use the script from stackoverflow to check the connection, because there is no Microsoft Excel installed on the server.

After writing a powershell-sript i got access to the database and the sql statement returns all the wanted data in the powershell.
So, the connection string should be correct.
The script is from Progress Customer Community

With the same connectionstring in the DataMapper, i only get the error message.

=============================================================
I got it working :slight_smile:
there was jdbc:odbc: missing at the beginning ot the connection-string
jdbc:odbc:Driver={iSeries Access ODBC Driver};System=****;Uid=****;Pwd=****;

Thanks to all readers, and for the help

Hi Guys,

I cant open the following connection:

$connectstring = “Driver={iSeries Access ODBC Driver};DNS=dnsname; System=server;UID=userid;Pwd=pwd;”

$conn = New-Object System.Data.Odbc.OdbcConnection($connectstring)
$conn.open()

This is the message:

Exception calling “Open” with “0” argument(s):

i tried in this way too:

$connectstring = “Driver={iSeries Access ODBC Driver};System=server;UID=user;Pwd=pwd;”

$conn = New-Object System.Data.Odbc.OdbcConnection($connectstring)
$conn.open()

And any doesnot works… Do you have any idea to can open the connection?