KB53 - How do I connect to SQL Server, Oracle, DB2or some other database?

Use ADO.

Simply modify this line in a sample script:

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbFile

(This line currently shows an OLEDB connection to an Access database)

to whatever connection string you require. See:

http://www.able-consulting.com/ADO_Conn.htm

In general you should use OLE DB connections wherever possible.

Copyright © 1999-2006 Optimized Software. All Rights Reserved.
Microsoft® Excel is a registered trademark of Microsoft Corporation.