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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC Without DSN To AS400 Library

Status
Not open for further replies.

Skittle

ISP
Sep 10, 2002
1,528
US
I want to access a file in an AS400 library via ODBC.
I can do this by creating a DSN connection or via a hard coded DSN less connection. How can I include the library I am interested in within a DSN less connection?

DSN Connection - with library in DSN File
---------------

objRecordSet01.CursorLocation = adUseClient
strConn01 = "FILEDSN=C:\Program Files\Common
"Files\ODBC\Data Sources\MyAS400Library.dsn"
objRecordSet01.Open "MYFILE", strConn01,adOpenKeyset,& _
adLockOptimistic, adCmdTable


DSN Less Connection - no library specified
-------------------

objRecordSet01.CursorLocation = adUseClient
objConn01.Open "Provider=IBMDA400;Data" & _
"Source=99.99.99.99;", "username", & _
"password"
objRecordSet01.Open "MYFILE", strConn01, adOpenKeyset, & _
adLockOptimistic, adCmdTable




Thanks


Dazed and confused
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top