DSNless question concerning UID

P

Phil Smith

I am hoping the Man of Steele is around and can help with this one.

I have taken his code, and tweaked it to work with Mysql. It works
great. It takes my tables and makes them DSNless, just as advertized.
Until now, that is all I needed to do. All the tables from one DB, set
up with a UID and password to a read only connection.

Now I find a couple specific uses where I need to write, and wish to set
it up so that when a user goes into a particular form, tables are
switched to the UID that has write permission, and then change them back
when I am done. This does not seem to work, and it brings up a couple
of questions:
1: How can I look at a table, (ideally without writing code) and
determine what the UID portion of the connect string is?

2: Is there any limitation in the code that prevents it from rerunning
and changing the DNS connect string of tables that are already
configures to be DSNless?

What is happening is after I run the code to make it writeable, any
attempt to write fails, with an error mesage that seems to imply that
the UID being used is the original one, not the new one. However, that
error message is the only place I can seem to see the UID. All of the
other connect string info, port, server, options, I can see documenting
the database, or hovering over a table name.

Just not the UID.

Thanx
 
D

Douglas J. Steele

1: How can I look at a table, (ideally without writing code) and determine
what the UID portion of the connect string is?

Look at the Connect property of the TableDef object:

CurrentDb().TableDefs("NameOfTable").Connect
2: Is there any limitation in the code that prevents it from rerunning and
changing the DNS connect string of tables that are already configures to
be DSNless?

No.

Are you able to write to the tables using a DSN? If not, have you defined a
primary key for each table you're trying to update?
 
P

Phil Smith

Much weirdness. Some playing around, including a couple of compact and
repairs, seems to have solved the problem.

One thing that is interesting is that the connect string that displays
does not include the UID or password.


Thanx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top