Thread View: borland.public.cppbuilder.database.ado
1 messages
1 total messages
Started by Tumurbaatar S.
Fri, 18 Mar 2005 10:24
TADOConnection LoginPrompt workaround
Author: Tumurbaatar S.
Date: Fri, 18 Mar 2005 10:24
Date: Fri, 18 Mar 2005 10:24
23 lines
1794 bytes
1794 bytes
I had a problem on bringing up a default login dialog
when TADOConnection::ConnectionString does not
contain UserID/Password. Even LoginPrompt is true
and <DBLogDlg.hpp> is included, the connection
fails with "Invalid authorization specification".
After examining BCB6's ADO and DB source files/includes,
I found that the login dialog appears if LoginDialogExProc variable
is set to a corresponding function: LoginDialogEx.
So before opening a connection I executed below code:
if (LoginDialogExProc == NULL)
ShowMessage("NULL");
if (LoginDialogExProc != LoginDialogEx)
ShowMessage("NOT SAME");
And it returns "NOT SAME" and login dialog does not appear.
Due to this, I added:
LoginDialogExProc = LoginDialogEx;
before connection open and now login dialog works well.
P.S. In my old project which uses TADOConnection with LoginPrompt=true
the login dialog works normally without an additional code. I don't know
why.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads