Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connecting to DB2 AS400 using ADO / OLEDB 1

Status
Not open for further replies.

ddiamond

Programmer
Apr 22, 2005
918
US
When I connect to DB2 on the AS400 using an ODBC DSN, I am able to specify the library list in the DSN. I'd like to connect using an OLEDB provider instead of ODBC, but I can't figure out how to specify the library list. Is there a way to specify the library when using an OLEDB provider?
 
IBMDA400 is an OLE DB Provider. Here's how I use it and change the library list in my client VB scripts.

Code:
  Dim MySystem As New ADODB.Connection
  MySystem.Open "Provider=IBMDA400;Data Source=nnn.nnn.nnn.nnn;USER ID=xxxx; PASSWORD=xxxxxx;"
  MySystem.Execute "{{CHGLIBL LIBL(MYLIB1 MYLIB2 ... QGPL)}}", Rcds, adCmdText
hth
 
Thanks Mercury2. That is what I was looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top