General discussion

Locked

SQL Server Linked Server to AS/400 DB2

By shyne.michael ·
I'm setting up a SQL Server 2000 linked server to communicate with a DB2 Database on a AS/400 Server. I'm using the Microsoft OLE DB Provider for DB2. There are options for provider string and catalog that I am not sure what are valid options. Can someone give me a working example of the fields "Product Name", "Data Source", "Provider String", and "Catalog"?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

SQL Server Linked Server to AS/400 DB2

by salexru2000 In reply to SQL Server Linked Server ...

If you defined DSN to be able to access AS400, you will need to specify in the connection string only Data Source, which must name your DSN. In this case neither catalog, neither prov. string and other parms are required (all will be taken from DSN).

Hope this helps

Collapse -

SQL Server Linked Server to AS/400 DB2

by Shanghai Sam In reply to SQL Server Linked Server ...

Using DSN limits you greatly with the ability to access other tables and databases on this server.

Collapse -

SQL Server Linked Server to AS/400 DB2

by RRV In reply to SQL Server Linked Server ...

Better than using DSN use provider string. If you use Client access express driver to connect to AS/400 then the connection string in VB would be like this.

public Con400 as new ADODB.Connection
Con400.open "Provider=IBMDA400;Data Source=AS400ServerNameAsinOperationNavigator;"
and that is it. if you want to prompt for AS/400 security login screen everytime use Con400.BeginTrans property.

To get extended connection string data follow the below procedure.

1) Use the above string to connect.
2) Execute the code in step by step in VB.
3) After executing the connection string's Open statement, go to immediate window and print the connection string like this
?Con400.ConnectionString
This will give the full connection string parameters. Then you can copy that string to the actual connection string in your code and change the parameters like Timeout, Userid, Password, etc etc.

For more queries contact me at rvenkatesh@dubal.co.ae

All the best.

Collapse -

SQL Server Linked Server to AS/400 DB2

by Shanghai Sam In reply to SQL Server Linked Server ...

Poster rated this answer

Collapse -

SQL Server Linked Server to AS/400 DB2

by shyne.michael In reply to SQL Server Linked Server ...

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums