Check this out:
https://www.ibm.com/docs/en/i/7.2?topic=details-connection-string-keywords

Looks like DBQ sets the library list.

Personally I like to qualify my tables with library.file or library/file so I know exactly which tables I'm accessing from PC or server apps.

Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx

----------------------------------------------------------------------

message: 1
date: Tue, 9 Nov 2021 16:18:17 +0000
from: Stephen Landess <steve_landess@xxxxxxxxxxx>
subject: ODBC / ADO / Excel / VBA

All -

I have been experimenting with using VBA to validate information in Excel spreadsheets against the master data on our IBM i system.

I have the lastest IBM i ODBC driver installed and DSNXXX is set up using the IBM i Access ODBC driver version 13.64.25.00.

My VBA macro uses this connection string to connect to the system:

Public gADOConn As adodb.Connection
Public strConnection As String
...
strConnection = "DSN=DSNXXX;UID=SLANDESS;PWD=ABCD1234;"
gADOConn.Open strConnection

I have several different environments (library lists) that I need to use from Excel, and I have set up three different DSN's to use, but is there a way to set the library list in the connection string ? It connects to the system successfully, but I have searched far and wide but have not found definitive documentation for the connection string options for IBM i. I see options for setting the database name.

More questions later...

Regards,
Steve Landess
(512) 289-0387


------------------------------

message: 2
date: Tue, 9 Nov 2021 17:02:49 +0000
from: Rob Berendt <rob@xxxxxxxxx>
subject: RE: ODBC / ADO / Excel / VBA

Why not set them explicitly by calling a stored procedure? Or the IBM supplied QCMDEXC stored procedure?
https://www.ibm.com/docs/en/i/7.4?topic=services-qcmdexc-procedure


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.