Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 04:17
man_at_work22 man_at_work22 is offline
Registered User
 
Join Date: Oct 2004
Location: Kuala Lumpur
Posts: 37
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, 04: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

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