Click to See Complete Forum and Search --> : error: login failed for user '(null)'


shaf_sar
October 28th, 2004, 08:59 PM
hello

i'm receiveing error message when trying to run my complete application in client pc

login failed for user '(null)'. Reason: Not associated with trusted SQL server connection

i'm using VB and SQL server
in the coding i'm using this connection string
"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=dbDesa;Data Source=MSSYA"

or maybe there is another setting in SQL server or client PC to enable the client accesing the server.

hspc
October 29th, 2004, 01:45 AM
Doesn't sa login have a password in the database ?
If so .. specify a password in the connection string :
"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=dbDesa;Data Source=MSSYA;Password=SAPASSWORD;"

shaf_sar
October 29th, 2004, 02:42 AM
i'm using different server and different database
using another type of authentication

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=BANCI;Data Source=COM1

but still got the same error

jp140768
November 1st, 2004, 03:53 PM
If you set up a UDL file (if you don't know how to do this, right click on a folder, take the option to create a new file, and when given the option to rename it, change the file extension to .UDL), double click this, and it will talk you through setting up your connection to a database - you even have the option of testing your connection to see if it works. Once this is done, you can right click the .UDL file and open it in notepad - the second line, provides you with the connection string.

HTH