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

Error 3151 - ODBC connection to 'dbname' failed

Status
Not open for further replies.

GBall

Programmer
May 23, 2001
193
GB
I can add a link to an Oracle database and see the data, no problem.
I have some code attached to a form that relinks to the database (deletes and re-adds the tabledef using the existing settings) and refreshes the tabledefs collection.
If I open this form immediately after adding the link, it relinks OK.
However, if I close and re-open Access (2K), then open the form, I get the above error.
The connection string is derived from the existing table connection, but I have also tried using the most basic connection string possible, with no luck.
I've pinged the connection OK, I've connected using the connection string via SQL*plus.
Anyone got an idea ?

thanks,
Regards,
Graham
 
Hello Graham

I have the same problem.
Do you have e resolution in the meantime ?

Please give me an answer ? to
r.weber@ch.georgutz.com

Thanks
 
Hy I had the same problem.
You can't use the same connections string from ACCESS 97

Here the right string:

DoCmd.TransferDatabase acLink, "ODBC-Datenbank", _
"ODBC;DSN=pr401;UID=pr401;PWD=xyz", acTable, "pr401.pkvk", "pkvk"

Let me know if it was the resolution for you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top