Hi,
I am using MS SQL 2000 Personal Edition on my Windows XP Professional machine. It is working fine with Enterprice manager and SQL Query analyser.
To use the db in my web application I configured a system dsn of "SQL Server" driver. I used "sa" user with my pass and tested the connection. It said it was ok. When I used in my web page it throws this exception
ODBC Error Code = 28000 (Invalid authorization specification)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Any one could help me figure this prob.Can you post the connection string you are using? To the best of my knowledge, if you are using DSN connection, you still need to supply the user name and password.
Regards,
Hugh Scott
Originally posted by karthiknataraj
Hi,
I am using MS SQL 2000 Personal Edition on my Windows XP Professional machine. It is working fine with Enterprice manager and SQL Query analyser.
To use the db in my web application I configured a system dsn of "SQL Server" driver. I used "sa" user with my pass and tested the connection. It said it was ok. When I used in my web page it throws this exception
ODBC Error Code = 28000 (Invalid authorization specification)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Any one could help me figure this prob.|||I use Cold fusion. So I created a system DSN and in my <cfquery> tag I simply give the dsn name. Another one site which is live uses sql server and I checked the code it the same.
<CFQUERY NAME="Q1" DATASOURCE="Test">
Select * from emp
</CFQUERY>|||I don't have any experience with Cold Fusion, and I try to stay away from DSN connections as much as possible. I am digging through the cobwebs of my memory to try to come up with an answer.
I would:
1. Re-verify that the password is saved in your DSN config
2. Try specifying the UID and password in the CFQUERY; your production web server may be using a Windows Trusted connection to your SQL Server.
3. See if Cold Fusion can make DSN-less connections to source databases.
HTH,
Hugh Scott
Originally posted by karthiknataraj
I use Cold fusion. So I created a system DSN and in my <cfquery> tag I simply give the dsn name. Another one site which is live uses sql server and I checked the code it the same.
<CFQUERY NAME="Q1" DATASOURCE="Test">
Select * from emp
</CFQUERY>|||I had the same problem. Microsft had me chage the AllowInProcess reg key to 0 for the provider type I was having issues with (in my case MADASQL). This will move these connections out of the MemToLeave area the SQL uses. However you will have to use SQL authentication after this.|||Even if you use a pedifined DSN for your connection, you still HAVE to supply the user="sa" and the pass="". I don't how you can do this with cold fusion, but I that's a guess:
"DATASOURCE=DSN2;USER=SA:PASSWORD="
No comments:
Post a Comment