Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2002
    Location
    Chennai
    Posts
    4

    Unanswered: Login failed for user '(null)'

    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.

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245

    Re: Login failed for user '(null)'

    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.

  3. #3
    Join Date
    Sep 2002
    Location
    Chennai
    Posts
    4
    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>

  4. #4
    Join Date
    Dec 2002
    Posts
    1,245
    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>

  5. #5
    Join Date
    Mar 2003
    Posts
    6

    Unhappy

    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.

  6. #6
    Join Date
    Mar 2003
    Location
    Bucharest, Romania
    Posts
    80

    Re: Login failed for user '(null)'

    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="

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •