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
"Pieter Wijnen" wrote:
> 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
>
> "DBG" <(E-Mail Removed)> wrote in message
> news:93DE9D80-FDFC-4DC9-B2F3-(E-Mail Removed)...
> > 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
>
>
>
|