Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Location
    Kuala Lumpur
    Posts
    38

    Question Unanswered: Run 2 Query in Single Connection

    Hi guys,



    need your expertise on this problem.

    I tried to run 2 queries in single connection. But it doesnt work to the second query

    page will return an error but execute the frist query only. How can i solve this problem.

    I'm using Microsoft Access 2000. Here are the code an error that return

    <%

    Dim objConn, strSQL1, strSQL2
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.Open "DSN=egbit_dev;"


    strSQL1 = "Update ADM_USERTAB Set USER_PWD = '" & new_pwd & "' where USER_ID = '" & userid & "'"
    set rsUpdate_Pwd = objConn.Execute(strSQL1)

    strSQL2 = "Update EGBIT_PWD_STATUS Set password_status = 'change' Where user_id = '" & userid & "'"
    set rsstatus = objConn.Execute(strSQL2)

    %>

    error :

    Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
    [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

    ( it refering to line that execute set rsstatus = objConn.Execute(strSQL2) )


    Please help me on this. Thanks in advance


    Shaffiq

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    UPDATE queries do not return recordsets.
    That which does not kill me postpones the inevitable.

Posting Permissions

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