Re: Using TADOConnection with MSSQL, login failure



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@xxxxxxxxxxxxxxxxxxxxxxxxx
I 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


.



Relevant Pages

  • Re: Error Connecting ADO from a Service Application
    ... "Kevin Frevert" wrote in message ... >> I can connect at design time an ADO connection from the form of a ... I set the connection to 'Use Windows NT Integrated Scurity' and did not work ... run time (but it worked design time). ...
    (borland.public.delphi.database.ado)
  • Re: how to parameterize a dts package?
    ... The global parameters can be mapped to properties of your connection tasks. ... At design time a file must exist in order to save any changes to the ... >>> simply pass information just as file paths into the package. ...
    (microsoft.public.sqlserver.dts)
  • Re: Setting the Connectionstring of sqlconnection at design time
    ... I would like to set the connections string property of a sqlconnection object at design time to something other than a static string. ... I need it at design time because design time behavoir of other controls on my form depend on a connection object with a configured connectionstring property. ... I have tried setting up a connection via server explorer that allows me to use the dropdown on the connectionstring property to select it, however, all that does is pull in the generated connection string. ...
    (microsoft.public.vstudio.development)
  • Re: Connected := False {does not close the connection}
    ... >process is idle. ... >This is seen even at design time: ... >Drop a TADOConnection and connect to the database. ... >You will see the design-time connection in the list. ...
    (borland.public.delphi.database.ado)
  • Re: Dead dialup connections
    ... second connection. ... applicationgives when the modem is off. ... Others provide the classic " Login:" prompt as shown in the HOWTOs. ...
    (comp.dcom.modems)