If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Run 2 Query in Single Connection

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-01-04, 03:17
man_at_work22 man_at_work22 is offline
Registered User
 
Join Date: Oct 2004
Location: Kuala Lumpur
Posts: 38
Question 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
Reply With Quote
  #2 (permalink)  
Old 10-04-04, 03:25
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
UPDATE queries do not return recordsets.
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On