Set rsPromoSale = MSCS.Execute(strSQL)
If Not rsPromoSale.EOF Then ' They have X in their basket
Do While Not rsPromoSale.EOF
' Response.Write "PROMO: " & rsPromoSale("cond_value") & " - " &
rsPromoSale("award_value") & " - " & rsPromoSale("promo_description") & " - "
& rsPromoSale("name") & " - " & rsPromoSale("parent_dept_id") & " - " &
rsPromoSale("inventory") & " <br> " & vbCrlf
' Add Freebie to Freebie Dictionaries - Setup if needed
If FreeItemsDeptsDict.Exists(""&rsPromoSale("award_value")&"") Then
FreeItemsInvDict(""&rsPromoSale("award_value")&"") =
FreeItemsInvDict(""&rsPromoSale("award_value")&"") + lineItem.quantity
Else
FreeItemsDeptsDict(""&rsPromoSale("award_value")&"") =
""&rsPromoSale("parent_dept_id")&""
FreeItemsInvDict(""&rsPromoSale("award_value")&"") = lineItem.quantity
End If
FreeItemsMAXDict(""&rsPromoSale("award_value")&"") =
rsPromoSale("Total_inventory")
rsPromoSale.MoveNext
Loop
End If
Sometimes we see this pop-up
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the
keyword 'AND'.
/store/basket.asp, line 233
Not sure why? Can someone take a look and see what could be the problem and
line 233 begins with SET rsPromoSale at the top.
--
Thanks,
Rick
'turn on error-handling:
on error resume next
Set rsPromoSale = MSCS.Execute(strSQL)
if err<>0 then
'log the error and sql statement contained in strSQL
'tell the user something went wrong - don't be specific
else
'process the recordset
end if
'turn off error-handling:
on error goto 0
Here is some info about logging errors to a text file:
http://classicasp.aspfaq.com/files/directories-fso/could-i-get-some-help-working-with-files-using-filesystemobject.html
Nothing to do with your problem but:
http://www.aspfaq.com/show.asp?id=2126
--
HTH,
Bob Barrows