Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Location
    chennai,India
    Posts
    4

    Unanswered: sql server 2000 connection error

    hello all,i am using sql server 2000 and ASP .when i connect to db i am getting this error.

    Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
    [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'WIGGUM\IUSR_WIGGAM'.
    /pcdisplay/frontend.asp, line 17

    even i entered correct passwd .

    my connection string is

    dim objConn
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.Open "DSN=wig; UID=test;PWD=hello"
    objConn.Close

    how can i rectify this? i like to display query results in a html table

    exactly i like to get select count(*) from a table .how shall i execute query and assign the result to a variable. pls clear my doubts.thx in advance

    -regards
    aravind

  2. #2
    Join Date
    Jan 2003
    Location
    Midwest
    Posts
    138
    you need to specify the database name in the statement

    Code:
    objConn.Open "DSN=wig;UID=test;PWD=hello;Database=dbname"

Posting Permissions

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