November 1, 2005 at 8:24 am
I cannot connect to my local server via ASP pages!
I have loaded SQL Server 2000 and am able to connect to two remote servers via ASP with no problem, but I cannot connect to my local one for web-testing purposes.
I keep getting this error message.
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'Testing'.
When I go into the Enterprise I can manipulate data within the tables, views and stored procedures on my local server and also execute commands to it from the Query Analyser, but I cannot connect to it via my ASP code.
I've checked and triple checked the User, Login and Roles settings and all appears to be okay, but obviously something is awry, somewhere.
Could it have something to do with the ODBC or Client Network Utility settings?
What I really need is a step-by-step guide on how to setup a 'local' server from scratch. Because with all the messing around I've been doing in trying to fix this problem, I've most probably changed something that I shouldn't have!
I would like to connect the server using SQL Server Authentication please.
If someone could point me in the right direction I'd be mighty grateful.
Thanks, Alan
November 1, 2005 at 9:25 am
Are you using a DSN or DSNless connection? Please post the connection string you are using in your asp page!
November 1, 2005 at 10:17 am
Thanks Kory,
I am using a DSN connection and here is my connection string
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={SQL SERVER};Server=Server1;UID=MyUserID;PWD=MyPassword;DATABASE=MyDBName;"
Although I'm using a DSN connection, I don't mind changing it to a DSN-less connection, just so long as it works
Alan
November 1, 2005 at 10:44 am
I know that you have stated you can manipulate items/data using EM. Is this using the same ID "Testing"? Can you get into QA with "Testing" user?
Good Hunting!
AJ Ahrens
webmaster@kritter.net
November 1, 2005 at 11:03 am
Brilliant!
The answer to your question was "No". I couldn't connect to Query Analyser (directly) using my login name and password.
The reason was (and here's the er, cough-cough, embarrassing bit) the password that I had initially used at SQL Server setup was the one I was trying to use to connect to the database.
So, to rectify, I went into EM --> Security --> Logins --> and simply changed the password to the one that I had set up in the above ASP connection string and it's working fine now.
Thank you so much. I have three hairs left on my head and will now make them into a celebratory pony-tail
Alan
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply