I've created a pass through query, but I don't want the credentials saved in the connection string. So when I run it, it asks for a password. Is there a way to pass it the credentials from a custom login screen instead of the ugly Microsoft screen that comes up? I guess I could change the connection string at run-time using code, but that seems clunky. I'm hoping for a query.execute, UID="", PWD="" type option, but I can't find anything in a google search.
Pass Through Query with Custom Login Form
Collapse
X
-
Tags: None
-
Seth,
From what I understand, you "should" be able to have a user login/password form and then generate the Connection String from there. This prevents you from saving passwords and all that security stuff that MS Access isn't good at. it should look something like this:
Code:qdf.Connent = "ODBC;DRIVER={Microsoft ODBC for Oracle};UID=abcdef;PWD=12345678;SERVER=serverabc123;"
-
-
You are correct in your assumption. I too prefer AD, but in this case I'm connecting to a program that has its own user database.Comment
-
Hi Seth.
I believe that if you make a Connection to the server first, then run the query when that Connection has been established, it should use the existing credentials without re-prompting when the query is run. Close the Connection object when done of course ;-)Comment
-
Hmmm. That just might work. I have noticed that once I run the query, it doesn't ask me for a password for any of my queries for a long time. And it would be easy to build a "login" form that simply opens a connection using the provided credentials, allowing the queries to then run without the password prompt. I wonder if manually closing the connection would make the queries prompt for a password again. Definitely something to work on.
Thanks NeoPa!Comment
-
Originally posted by Seth SchrokSeth Schrok:
I wonder if manually closing the connection would make the queries prompt for a password again.Comment
Comment