• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1361
  • Last Modified:

Object doesn't support named arguments: 'RS.ActiveConnection'

I have a page called "retrieve.asp" that allows the user to select an item to update. That page then sends the user to a page called updateProducts.asp. When the updateProducts.asp page loads I get this error:

Microsoft VBScript runtime error '800a01be'

Object doesn't support named arguments: 'RS.ActiveConnection'

/ASP/updateProducts.asp, line 11

Here is the start of code on my page. Can someone tell me what I'm doing wrong?

--------------------------------
<%
'Get the Product ID
productID = Request("pid")

'Open the Database connection
Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/ASP/storeDB.mdb")

'Open the Recordset
Set RS = Server.CreateObject("ADODB.Connection")
RS.ActiveConnection = Con
RS.CursorType = 3
RS.Open "SELECT * FROM Products WHER product_id = " & productID
IF NOT RS.EOF THen
      productName = RS("product_name")
      productPrice = RS("prodcut_price")
      productPicture = RS("product_picture")
      productCategory = RS("product_category")
      productBriefDesc = RS("product_briefDesc")
      productFullDesc = RS("product_fullDesc")
      productStatus = RS("product_status")
END IF

'Close the Recordset
RS.Close

FUNCTION SELECTED(firstVal, secondVal)
      If cSTR(firstVal) = cSTR(secondVal) THEN
            SELECTED = " SELECTED "
      End If
End Function

%>
-----------------------------------
Any help would be much appreciated.
0
Tritorian
Asked:
Tritorian
  • 2
1 Solution
 
davidlars99Commented:
Set RS = Server.CreateObject("ADODB.Connection") should be Set RS = Server.CreateObject("ADODB.Recordset")
0
 
TritorianAuthor Commented:
@&^*&! lol... I hate that I missed that. Thanks so much for your help!
0
 
davidlars99Commented:
no problem,  be more careful next time :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now