Results 1 to 6 of 6

Thread: database error

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Posts
    100

    database error

    Hi all.

    I am having problem with my ASP code.
    I couldnt figure out why the error occur since I am new in web programming.
    Can u help me fix this prob?
    Why the error occur?
    The error is like below:

    Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
    [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'USER-LZA0CD0651\IUSR_USER-LZA0CD0651'.
    /rekod/frekod.asp, line 137

    Below is the portion of my code.
    VB Code:
    1. Dim rsrekod
    2. Dim rsrekod_numRows
    3.  
    4. Set rsrekod = Server.CreateObject("ADODB.Recordset")
    5. rsrekod.ActiveConnection = MM_cuba_STRING  'line 137
    6. rsrekod.Source = "SELECT * FROM dbo.trekod WHERE nokp = '" + Replace(rsrekod__MMColParam, "'", "''") + "'"
    7. rsrekod.CursorType = 0
    8. rsrekod.CursorLocation = 2
    9. rsrekod.LockType = 1
    10. rsrekod.Open()
    11.  
    12. rsrekod_numRows = 0

    Thanks in advance.

  2. #2
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: database error

    is the variable named MM_cuba_STRING an adodb connection
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Posts
    100

    Re: database error

    yes it is

  4. #4
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: database error

    Are you using mysql database?

    have you opened your connection before opening your recordset?
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Posts
    100

    Re: database error

    obviously..sql server

  6. #6
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: database error

    Are you sure that the USER-LZA0CD0651\IUSR_USER-LZA0CD0651 has been added to the SQL Server User Groups?
    Use [code] source code here[/code] tags when you post source code.

    My Articles

Posting Permissions

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



Click Here to Expand Forum to Full Width