Board index » delphi » Cannot connect

Cannot connect


2004-11-12 08:34:25 AM
delphi270
I am using MS SQL Server 2000, have added user to Northwind database, then I
used TADOConnection to build connection string, use specific name and
password, and test connection is OK.
At runtime, I got the exception login failed, why ?
 
 

Re:Cannot connect

at run time the password is not being passed to the connection.
either set the connection LoginPrompt to true and enter the password
manually or
put some code in the connection OnWillConnect event to set the userID and
Password parameters.
Andy
"Alan" <XXXX@XXXXX.COM>writes
Quote
I am using MS SQL Server 2000, have added user to Northwind database, then
I
used TADOConnection to build connection string, use specific name and
password, and test connection is OK.

At runtime, I got the exception login failed, why ?


 

Re:Cannot connect

When I build the connection string, I set the username and password then
press test connection button.
And I also set the login prompt to false, when run the program I set the
TADOConnection to open when form is created.
"Brian Bushay TeamB" <XXXX@XXXXX.COM>writes
Quote

>I am using MS SQL Server 2000, have added user to Northwind database,
then I
>used TADOConnection to build connection string, use specific name and
>password, and test connection is OK.
>
>At runtime, I got the exception login failed, why ?
How are you opening the TadoConnection in your code?
Are you getting a prompt for Username and Password?
--
Brian Bushay (TeamB)
XXXX@XXXXX.COM