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
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