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

Trouble connecting to database

Status
Not open for further replies.

bhadsock

IS-IT--Management
Apr 19, 2002
3
0
0
US
I am trying to connect to a MySQL database using code written in VBA in Excel. I am trying to use the LogOnServer method, but keep getting an "Automation Error"

The syntax I am using is as follows:
crxApplication.LogOnServer "MYODBC.DLL", "ServerName", "DatabaseName", "UserID", "Password"

I could not find any examples on using VBA and the LogOnServer method at the Crystal Decisions web site. I also have tried using the P2SODBC.DLL driver.

Has anyone ever tried this or have some code examples of connecting to a SQL database in VBA.

Thank you for your assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top