RwD
09-27-2001, 09:59 AM
Hi, I use the following code in my program:
// eConnected = True;
Database.DatabaseName:= Form1.Settings.DatabaseName;
Database.AliasName:= Form1.Settings.DatabaseAliasName;
Database.Connected:= eConnected;
// Queries:
Survey_questions.SQL.Text:= 'Select * From ' + Form1.Settings.DatabaseName + '.dbo.Survey_questions';
Survey_questions.Active:= eConnected;
loginprompt = false, and still I get one. I know why this is: after the databse has connected, the query's active property is set to true, and it tries to connect to the same db. And that's when, and why I get the login prompt.
but that doesn't make sense because I'm already connected, right? if I take the "' + Form1.Settings.DatabaseName + '." out of the query's text, it works without a prompt, but when I change databases (so going to another database with a different name) the query doesn't seem to get this, and it stays connected to the old db
does anybody know the solution for this?
tnx,
RwD
// eConnected = True;
Database.DatabaseName:= Form1.Settings.DatabaseName;
Database.AliasName:= Form1.Settings.DatabaseAliasName;
Database.Connected:= eConnected;
// Queries:
Survey_questions.SQL.Text:= 'Select * From ' + Form1.Settings.DatabaseName + '.dbo.Survey_questions';
Survey_questions.Active:= eConnected;
loginprompt = false, and still I get one. I know why this is: after the databse has connected, the query's active property is set to true, and it tries to connect to the same db. And that's when, and why I get the login prompt.
but that doesn't make sense because I'm already connected, right? if I take the "' + Form1.Settings.DatabaseName + '." out of the query's text, it works without a prompt, but when I change databases (so going to another database with a different name) the query doesn't seem to get this, and it stays connected to the old db
does anybody know the solution for this?
tnx,
RwD