I'm controlling the connections to my SQL Server through code. I'm trying to avoid saving the username and password in code however. It's easy for me to display my own login form, accept a username and password, and use those to reconnect my linked tables. However, I'm trying to figure out how to work around the problem of when a user enters an improper username and password. The system would then bring up the standard ODBC username and password dialog. I want to trap this, not display it and return to my form.
I've been told elsewhere that it's possible to tell the ODBC dll to silently fail back to Access or some such thing.
-David
Just for the clarification: how do you use ODBC in MS Access? Do you use ADO or do you do something else?
|||Hi,you can use the SQL_DRIVER_NOPROMPT which tells the driver not to prompt for a login box. More information about that can be found here:
http://msdn2.microsoft.com/en-us/library/ms131326.aspx
HTH, jens Suessmeyer.
http://www.sqlserver2005.de
No comments:
Post a Comment