Page 1 of 1

Cannot log on from a server-application

Posted: Thu 24 Jun 2010 10:42
by DerPaul
Hi

Whenever I try to log on from a sever-application, I get the following error:
"Login failed for user 'blabla\bla'.
Cannot open database "bla" requested by the login. The login failed."

It happens no matter what database I try to open.
I also tried different databases, and the two different logon-types in Services (Local systemaccount and "This account"), and there are no real differences.

I've made a test-program, and sent it to Dmitri Gerasimenko. Hope its okay.


Hope you can find a solution (Hope there IS a solution?)


Best regards

Poul

Posted: Thu 24 Jun 2010 13:57
by Dimon
I can not reproduce the problem.
Please check that you can connect to your SQL Server with the same username, password, and host from any client application (for example SDACDemo).

Posted: Thu 24 Jun 2010 18:31
by DerPaul
Hi

After system-logon, I can logon to any database using any valid password.
You can also see that in the logfile in the example I sent you.

The problem isn't logging on to a database as such, it's logging on *before* anyone has logged on to the system, ie. when the Windows login-window is on the screen.

You say that you cannot reproduce the problem. Did you run my example?
That is, install it as a service (ie. run it with the commandline parameters /install), and then restart your Pc?

That's when it won't work.


Best regards

Poul

Works with ADO

Posted: Mon 28 Jun 2010 18:17
by DerPaul
Hi

Just wanted you to know this works with ADO.

Poul

Posted: Tue 29 Jun 2010 08:40
by Dimon
This problem is connected with the specificity of SQL Server work.
Please copy the ConnectionString property value of the TADOConnection component, that is connected successfully, and set it to the MSConnection.ConnectString property. After this try to test your application.