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

How to solve ODBC connection problem?

Status
Not open for further replies.

sallyGals

Programmer
Feb 1, 2006
35
DE
i had modify my connection string to ODBC DSN. But error ocur when i run it, it shows that "object doesn't support this property ot method." When i debug, it points to the .provider = "MSDASQL"

Below is what i had change in the module:

change:
Set cnConn = Application.CurrentProject.Connection

become:
Set cnConn = New ADODB.Connection
With cnConn
.Provider = "MSDASQL"
.ConnectionString = "DSN=sally;"
.Open
End With
 
Use ADODC (ADO Datacontrol) to generate the connection string.

< M!ke >
 
If you want to setup an OLEDB connection string separate from the App, then there is no need to use ODBC that is just extra overhead. Instead setup an UDL link.

See this site on how to do.

He explains how to create the link on your desktop by saving an empty text file and then changing the extention to .udl, which when you double click brings up the UDL wizard to create and test the connection string.
 
The problem now is it can work in my computer, but it can not run in another three computers. I could not found the problem.
 
Do the PC's all have the same MDAC versions? Which PC's have the latest version.

Are all the PC's on the same LAN?
Did you put the UDL on the LAN?

Can you show the code you are using.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top