Print Page | Close Window

dynamic-include

Printed From: SalesCart
Category: Legacy Products
Forum Name: SalesCart Standard / PRO / SQL
Forum Description: All questions pertaining to SalesCart Standard, PRO and SQL should be posted here.
URL: http://forum.salescart.com/forum/forum_posts.asp?TID=208
Printed Date: November/23/24 at 9:50pm
Software Version: Web Wiz Forums 11.04 - http://www.webwizforums.com


Topic: dynamic-include
Posted By: drafting
Subject: dynamic-include
Date Posted: October/08/04 at 11:15am
Hello,

I have check the box in the salescart bot so the dynamic-include page can give options to the customer. When I check the box I receive this error:

Microsoft VBScript runtime error '800a01fa'

Class not defined: 'CSimpleAdo'

/mall/dynamic-include.asp, line 21

Does anyone know how to fix this to make the dynamic-include work? Thanks!



Replies:
Posted By: Techno Geek
Date Posted: October/11/04 at 11:58am
It looks like that 'CSimpleAdo' is being redefined in dynamic-include.asp. Do a search on that file for CSimpleAdo. Comment out the line (add apostrophe to the beginning of the line) that this shows up on and it should take care of the problem.

-------------
Techno Geek
Customer Support Engineer
ComCity and SalesCart Technical Support


Posted By: drafting
Date Posted: October/11/04 at 12:36pm
Hello,

Thanks for responding. I did what you said and added the apostrophe to the beginning of the line...but now a new error comes up:

Microsoft VBScript runtime error '800a01a8'

Object required: ''

/mall/dynamic-include.asp, line 22




Posted By: Techno Geek
Date Posted: October/11/04 at 12:39pm
Go ahead and paste the code, let's see what you have :)

Copy the code then pate in here and make sure that you wrap it in. It should look like this:

[ CODE ]CODE IN HERE[/CODE]

-------------
Techno Geek
Customer Support Engineer
ComCity and SalesCart Technical Support


Posted By: drafting
Date Posted: October/11/04 at 12:45pm
Here is the code for dynamic-include.asp. Thanks!

<%
'edit this file for the options you want to display
'There is no longer a maximum number of options but all must be named option
'you can delete the options you don't need
'you can specify a price increase for option but separating the option value with the delimiter (default=$) specified in the wizard

     ' The separator field is what you want to separate different options, can be "" or "<p>"
Separator = "<br>"
%>

<%
thisproduct = FP_Field(fp_rs,"ProdID")

'READ STUFF From Database
     Dim objSimpleAdo, rstRS, SQLStmt

     SQLStmt = "SELECT * From Options "
     SQLStmt = SQLStmt & "WHERE [ProdID] =" & thisproduct & " "
     SQLStmt = SQLStmt & "ORDER BY Options.Attribute, Options.[AttNo]; "

     'Set SimpleAdo = New CSimpleAdo
     SimpleAdo.setConnectionString = Application("Products1_ConnectionString")
     Set RS = SimpleAdo.getRecordSet(SQLStmt)
     'Do stuff with the record set
%><%
     CurrentRecord = 0
     ChangeFlag = ""
     Do While CheckRS(RS)
     Description = RS("Description")
           ' Save Attribute name if first time in
           If CurrentRecord = 0 Then
                ChangeFlag = RS("Attribute")
                Response.write ("<Strong>" & ChangeFlag & "</Strong><select name=option size=1>")
           End If

     'Hasn't changed
     If RS("Attribute") = ChangeFlag Then
           Response.write ("<option value=" & RS("FmVal") & ">" & RS("Choice") & "</option>")
           Else
                Response.write ("</select>" & RS("Description") & separator)
                ChangeFlag = RS("Attribute")
                Response.write ("<Strong>" & ChangeFlag & "</Strong><select name=option size=1>")
                Response.write ("<option value=" & RS("FmVal") & ">" & RS("Choice") & "</option>")
     End If

     RS.MoveNext
           CurrentRecord = CurrentRecord + 1
     Loop

Response.write ("</select>" & Description & separator)


'Done with everything
Set SimpleAdo = Nothing
Set RS = Nothing
%>


Posted By: UpstateGirl
Date Posted: October/13/04 at 2:00pm
I'm getting the same error and have not been able to resolve it. And when I look at the dynamic-include.asp by itself it is throwing this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FP_Field'
/dynamic-include.asp, line 10

The field that it does not like is the prodID (which is a number) and the database field basketID (which is also a number)

Any thoughts?

thisproduct = FP_Field(fp_rs,"basketid")


Posted By: drafting
Date Posted: October/20/04 at 10:03am
I still have not heard anything from Support at SalesCart. I will let you all know if I hear anything.


Posted By: Techno Geek
Date Posted: October/26/04 at 11:10am
The most important part of this issue to make sure that you have the following code on top of your dynamic product pages:

<%@ LANGUAGE="VBScript.Encode" %>

<!--#include file="../cgi-bin/CSimpleAdo.asp"-->
<!--#include file="../cgi-bin/ADOVBS.inc"-->
<!--#include file="../cgi-bin/IASUtil.asp"-->


-------------
Techno Geek
Customer Support Engineer
ComCity and SalesCart Technical Support



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.04 - http://www.webwizforums.com
Copyright ©2001-2015 Web Wiz Ltd. - http://www.webwiz.co.uk