Results 1 to 2 of 2

Thread: ADODB.Recordset error '800a0bb9'

  1. #1
    Join Date
    Feb 2007

    ADODB.Recordset error '800a0bb9'

    Hi guys

    I'm getting the following error in a script that I'm trying to adapt:

    ADODB.Recordset error '800a0bb9'

    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

    /basket_util.asp, line 56

    basket_util.asp is shown below with the error line shown.

    '## This page is setup to process the shopper's basket content.
    '## It contains all the utility Subroutines and Functions. 
    'This Sub routine adds a product to shopper's basket
    Function FcnAddtoBasket (ConnObj,usr_GUID,prodID,prodname,prodquantity,prodlistprice,prodsaleprice)
    	dim strAddCode,rsAdd
    	set rsAdd = server.CreateObject ("ADODB.RECORDSET")
    	rsAdd.Open "EXEC sproc_addToBasket " & chr(39) & usr_GUID & chr(39) & "," & chr(39) & prodID & chr(39) & "," & chr(39) & prodname & chr(39) & "," & prodquantity & "," & prodlistprice & "," & prodsaleprice,ConnObj
    	strAddCode = rsAdd("errorcode")
    	FcnAddtoBasket = strAddCode
    	set rsAdd = nothing
    End Function
    'This sub routine deletes the shopper's entire basket content
    Function FcnDeleteBasket(ConnObj,usr_GUID,bID)
    	Dim rsDel
    	set rsDel = server.CreateObject ("ADODB.recordset")
    	rsDel.Open "EXEC sproc_deleteBasket " & chr(39) & usr_GUID & chr(39) & "," & bID,ConnObj
    	FcnDeleteBasket = rsDel("errorcode")
    	Set rsDel = nothing
    End Function
    'This sub routine deletes the shopper's entire basket content
    Function FcnMakeDefBasket(ConnObj,usr_GUID,bID)
    	Dim rsDef
    	set rsDef = server.CreateObject ("ADODB.recordset")
    	rsDef.Open "EXEC sproc_makeDefaultBasket " & chr(39) & usr_GUID & chr(39) & "," & bID,ConnObj
    	FcnMakeDefBasket = rsDef("errorcode")
    	Set rsDef = nothing
    End Function
    'this sub updates the shopper's basket
    Sub SubUpdateBasket(updStr)
    	dim updConn
    	set updConn = server.CreateObject ("ADODB.Connection")
    	updConn.ConnectionString = strBasketDSN
    	updConn.Execute updStr
    	Set updConn = nothing
    End Sub
    'This function gets shopper's basket and returns the recordset to caller
    Function FcnGetBasket (ConnObj,usr_GUID)
    	Dim rsTemp
    	set rsTemp = server.CreateObject ("ADODB.recordset")
    rsTemp.Open "EXEC sproc_getBasket " & chr(39) & usr_GUID & chr(39),ConnObj 'error line
    	Set FcnGetBasket = rsTemp
    End Function
    'This function saves the shopper's current basket
    Function FcnSaveBasket (ConnObj,usr_GUID,bName,bID)
    	Dim rsSave
    	set rsSave = server.CreateObject ("ADODB.recordset")
    	rsSave.Open "EXEC sproc_saveBasket " & chr(39) & usr_GUID & chr(39) & "," & chr(39) & bName & chr(39) & "," & bID,ConnObj
    	FcnSaveBasket = rsSave("errorcode")
    	Set rsSave = nothing
    End Function
    'This function gets shopper's previously saved baskets, if any
    Function FcnGetSavedBaskets (ConnObj,usr_GUID)
    	Dim rsTempSaved
    	set rsTempSaved = server.CreateObject ("ADODB.recordset")
    	rsTempSaved.Open "EXEC sproc_getSavedBaskets " & chr(39) & usr_GUID & chr(39),ConnObj
    	Set FcnGetSavedBaskets = rsTempSaved
    	Set rsTempSaved = nothing
    End Function
    'This sub writes out a generic error message
    Sub	writeError
    	Response.Write ("<font color='red'><p>An error occured while processing your basket request!<br>Please contact the site Administrator.<p></font>")
    End Sub
    'This sub writes out a message for saved baskets
    Sub	writeSavedBasketMessage
    	Response.Write ("<h4>Your Saved Baskets</h4><p><font color='brown'>You do not have any saved basket at this time.</font><p>")
    End Sub
    'This sub writes out a message for attempted duplicate entries
    Sub	writeDuplicateEntryMessage
    	Response.Write "<font color='green'>You already have this product in your basket.</font>" 
    End Sub
    'This function returns a 32 character GUID from SQL Server
    Function FcnGenerateGUID(ConnObj)
    	dim strGUID,rsGUID
    	set rsGUID = server.CreateObject ("ADODB.RECORDSET")
    	rsGUID.Open "EXEC sproc_createGUID",ConnObj
    	strGUID = rsGUID("guid")
    	FcnGenerateGUID = strGUID
    	set rsGUID = nothing
    End Function
    'This subroutine reads the DSN, and open's a 
    'connection object for the basket page
    Sub	SubGetDSNCreateConn
    	strBasketDSN = Application("strBaskDSN")
    	set BaskConn = server.CreateObject ("ADODB.Connection")
    		'BaskConn.ConnectionString = "travcart"
    		BaskConn = "provider=sqloledb;data source=(local);initial catalog=cart;user id=sa;password=password@1;"
    End Sub
    'This subroutine gets a 32 char guid from SQL and 
    'writes that value to the shopper's cookie as their shopper ID
    Sub	SubCreateNReturnGUID
    	Dim myGuid
    	'Call function to return a GUID
    	myGuid = FcnGenerateGUID(BaskConn)
    	'append created userGuid to cookie...
    	Response.Cookies ("shopGuid")("Guid") = myGuid
    	Response.Cookies ("shopGuid").expires = "August 30, 2020"
    End Sub
    <%	Sub BasketHeader	'To display Basket Header	%>
    	<table cellspacing="1" cellpadding="1" border="0" width="500">
    	<tr bgcolor="gray">
    		<th><b> <font size="-1" color="#ffffff">Item</font></b></th>
    		<th><b> <font size="-1" color="#ffffff">Item ID</font></b></th>
    		<th><b> <font size="-1" color="#ffffff">Qty</font></b></th>
    		<th><b> <font size="-1" color="#ffffff">Unit<br>Price</font></b></th>
    		<th><b> <font size="-1" color="#ffffff">Sale<br>Price</font></b></th>
    		<th><b> <font size="-1" color="#ffffff">Total</font></b></th>
    <%	End Sub								%>
    <%	Sub BasketManager	'To Manage Saved Baskets	%>
    	<h4>Your Saved Baskets</h4>
    	<form name="BaskMgr" method="POST" action="basket.asp">
    		<table cellspacing="2" cellpadding="1" border="0" width="500">
    			<th align="left" bgcolor="gray"><b>	<font size="-1" color="#ffffff">Basket Name</font></b></th>
    			<th align="left" bgcolor="gray"><b>	<font size="-1" color="#ffffff">Date Created</font></b></th>
    			<!-- Loop to populate table -->
    			<% do 
    				Dim strBName,strDateCreated,intSavedBaskID
    				intSavedBaskID = rsSavedBaskets("basket_id")
    				strBName = rsSavedBaskets("basket_name")
    				strDateCreated = rsSavedBaskets("date_created")
    				<td><%= strBName %></td>
    				<td><%= strDateCreated %></td>
    				<td align="center"><a href="basket.asp?btnMkDef=<%= intSavedBaskID %>"><b>Make Default</b></a></td>
    				<td align="center"><a href="basket.asp?btnDelSaved=<%= intSavedBaskID %>"><b>Delete</b></a></td>
    			loop until rsSavedBaskets.eof
    			set rsSavedBaskets = nothing
    			<!-- End Loop -->
    <%	End Sub								%>
    Any ideas? I'm pretty new to ASP and SQL so I'm not really sure what to do.


  2. #2
    Join Date
    Feb 2007
    rsDel.Open "EXEC sproc_deleteBasket " & chr(39) & usr_GUID & chr(39) & "," & bID,ConnObj

    should be

    rsDel.Open "EXEC sproc_deleteBasket " & chr(39) & usr_GUID & chr(39) & "," & bID&"",ConnObj


    rsDef.Open "EXEC sproc_makeDefaultBasket " & chr(39) & usr_GUID & chr(39) & "," & bID,ConnObj

    should be

    rsDef.Open "EXEC sproc_makeDefaultBasket " & chr(39) & usr_GUID & chr(39) & "," & bID & "",ConnObj

    You have missed the closing quotations at the end of ur SQL statements, try that and see where you get.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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