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!

Tables relinking and ODBC

Status
Not open for further replies.

plauriz

Programmer
Oct 1, 2007
2
Hi everyone,

I'm having a hard time relinking tables in Access.
I have a code which:
1. checks the registry for ODBC username/password/server to be used
2. if currently linked tables have different info then the one in registry - table relinking is triggered.

Now, if I relink one of table links to link to another database, my code detects that, relinks it and everything is fine.
BUT if I change registry info to use another database/username/password and try to run my app, I get a "Oracle ODBC Driver Connect" popup with username and password fields having correct values, but not the "Service Name" field - it has previously used value.

The connection string I use when creating links:
"ODBC;DSN=AccessTools;DBQ=A.world;Server=A.world;UID=foo;PWD=bar;"

Now, since the popap window has correct Username / Password values, why doesn't "Service Name" ? I expect it to be "A", but it is "B", which was the previous value.
Is my connection string wrong or smth? Do I have to flush old info somehow? If anybody have a clue - please share it.

Thanks
 
And for more background, plauriz is using:

Office Access 2003 versus an Oracle 10gR2 database. All the tables relinked are in Oracle.
 
I have never encountered your problem but I tend to use dsnless odbc connections. That way you don't have to worry about DSN changes. They are right there in your code.

It may or may not help.

Mike
 
> That way you don't have to worry about DSN changes. They are right there in your code.

Well, that's what I'm trying to avoid - edit app code every time server ip/username/password is changed. Updating ODBC registry info is more flexible solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top