Re: Using TADOConnection with MSSQL, login failure
- From: srdaniel <daniel.raith@xxxxxxxxx>
- Date: Wed, 30 May 2007 11:19:25 -0500
Ok, I'm such a newbie. My connection string had a username but no password. When I connected at design time it prompted me for the password so I typed it in. Apparently between then and when I hit F9 I changed it to loginprompt := False; So when I tried to run all I would get is the error and no login prompt. Doh.
Thanks for they replies....
Kevin Frevert wrote:
srdaniel,.
You are connecting differently at run-time than at design time? You are using NT-Authentication and running the app on a machine (or user login) that does not have access to the target SQL server? Gremlins have taken over your servers and playing games with you?
Your setup sounds straight forward enough, so unless you have gremlins running around causing trouble (those little green guys certainly can), there has to be a simple piece of the puzzle being overlooked (ex. OnCreate event of the form/datamodule you change/clear the TADOConnection.ConnectionString property)
Good luck,
krf
"srdaniel" <daniel.raith@xxxxxxxxx> wrote in message news:465c9c64$1@xxxxxxxxxxxxxxxxxxxxxxxxxI finally got a TADOConnection object to connect to my MSSQL database at design time. I can even hook up a TADODataSet->TDataSource->TDBGrid and see data.
However if I try to run the application (Delphi7) I get an error: "Login failed for user XYZ"
Why does it work at design time but not run time? Any ideas?
srdaniel
- Follow-Ups:
- Re: Using TADOConnection with MSSQL, login failure
- From: Del Murray
- Re: Using TADOConnection with MSSQL, login failure
- References:
- Using TADOConnection with MSSQL, login failure
- From: srdaniel
- Re: Using TADOConnection with MSSQL, login failure
- From: Kevin Frevert
- Using TADOConnection with MSSQL, login failure
- Prev by Date: Re: DateTime parameters in ADOQuery
- Next by Date: Re: Using TADOConnection with MSSQL, login failure
- Previous by thread: Re: Using TADOConnection with MSSQL, login failure
- Next by thread: Re: Using TADOConnection with MSSQL, login failure
- Index(es):
Relevant Pages
|