close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Microsoft OLE DB Provider for SQL Server error '80040e18' - Rowset position cannot be

Thread began 8/08/2011 1:08 am by Gareth.TannattNash253613 | Last modified 8/08/2011 7:58 am by Gareth.TannattNash253613 | 8642 views | 1 replies

Gareth.TannattNash253613

Microsoft OLE DB Provider for SQL Server error '80040e18' - Rowset position cannot be

I'm using Ecart 4 within Dreamweaver CS5.5. Hiostorically when adding the add to cart procedure Ecart has changed the recordset cursor type.

However on this occasion it isn't doing so and as a result I get the following error when testing the add to cart behaviour -

"Microsoft OLE DB Provider for SQL Server error '80040e18'
Rowset position cannot be restarted.
/detail.asp, line 36"

How do I overcome this? My code is -


<%
Dim RsProductDetail__MMColParam
RsProductDetail__MMColParam = "0"
If (Request("p") <> "") Then
RsProductDetail__MMColParam = Request("p")
End If
%>
<%
Dim RsProductDetail
Dim RsProductDetail_cmd
Dim RsProductDetail_numRows

Set RsProductDetail_cmd = Server.CreateObject ("ADODB.Command")
RsProductDetail_cmd.ActiveConnection = MM_Connection_STRING
RsProductDetail_cmd.CommandText = "SELECT Something From Somewhere Order BY P.ID DESC"
RsProductDetail_cmd.Prepared = true
RsProductDetail_cmd.Parameters.Append RsProductDetail_cmd.CreateParameter("param1", 5, 1, -1, RsProductDetail__MMColParam) ' adDouble

Set RsProductDetail = RsProductDetail_cmd.Execute
RsProductDetail_numRows = 0
%>
<%
' WA eCart AddToCart
if (cStr(Request.Form("ShoppingCart_1_ATC")) <> "" OR cStr(Request.Form("ShoppingCart_1_ATC.x")) <> "") then
ATC_itemID = cStr(Request.Form("ShoppingCart_1_ID_Add"))
ATC_AddIfIn = 0
ATC_RedirectAfter = "cart.html"
ATC_RedirectIfIn = ""
ATC_RSPos = RsRelatedProduct.AbsolutePosition
RsRelatedProduct.MoveFirst()
DO while (NOT RsRelatedProduct.EOF)
if (cStr(RsRelatedProduct.Fields("ID").value) = cStr(ATC_itemID)) then
ATC_itemName = "" & cStr((RsRelatedProduct.Fields.Item("Product-Name").Value)) & ""' column binding
ATC_itemDescription = "" & cStr((RsRelatedProduct.Fields.Item("Description").Value)) & ""' column binding
ATC_itemWeight = cDbl("0")' column binding
ATC_itemQuantity = "" & cStr(Request.Form("ShoppingCart_1_Quantity_Add")) & ""' column binding
ATC_itemPrice = cDbl("" & cStr((RsRelatedProduct.Fields.Item("Price").Value)) & "")' column binding
ATC_itemItemDeliveryCharge = cDbl("0")' column binding
Exit DO
end if
RsRelatedProduct.MoveNext()
Loop
RsRelatedProduct.AbsolutePosition = ATC_RSPos
if (IsNumeric(ATC_itemQuantity) AND ATC_itemQuantity <> 0) then
set ShoppingCart = ShoppingCart_AddToCart(ATC_AddIfIn, ATC_RedirectIfIn, ATC_itemID, ATC_itemName, ATC_itemDescription, ATC_itemWeight, ATC_itemQuantity, ATC_itemPrice, ATC_itemItemDeliveryCharge)
if (ATC_RedirectAfter <> "" AND ShoppingCart_redirStr = "") then
ShoppingCart_redirStr = ATC_RedirectAfter
end if
Session("WAEC_ContinueRedirect") = cStr(Request.ServerVariables("Script_Name")) & "?" & cStr(Request.QueryString())
end if
end if
%>

Line 36 being -

RsRelatedProduct.MoveFirst()

I tried adding RsRelatedProduct.ActiveConnection.CursorLocation = 3 above Set RsProductDetail = RsProductDetail_cmd.Execute but that just moved the error to line 37.

Thanks for any help or insight..

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...