Custom SQL Server Login Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.

-David
 
Simply try yo open a connection using DAO/ADO with the supplied credentials
If it fails return to your code...

Pieter

PS there is a parameter that will instruct the .dll how to react, the
default (as per normal) is to prompt

HTH

Pieter
 
When then tableDef.connect fails, I think its the ODBC connector which is
passing the error message. Then when I ok that message I get the standard
ODBC username and password prompt.

So I'm not sure I can trap the error. Any idea where info about the .dll is?

-David
 

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

Back
Top