|
sendemail.asp error |
Post Reply |
Author | |
jason2004
Groupie Joined: September/29/05 Status: Offline Points: 87 |
Post Options
Thanks(0)
Posted: July/16/06 at 9:21pm |
sendemail.asp
Microsoft VBScript runtime error '800a01fa' Class not defined: 'CSimpleAdo' /cgi-bin/sendemail.asp, line 17 Line 17 is: Set SimpleAdo = New CSimpleAdo SimpleAdo.setConnectionString = Session("ConnectionString") Set RS = SimpleAdo.getRecordSet(SQLStmt) Any idea what's wrong? SalesCart Pro 5 |
|
mikeb
Admin Group Joined: March/17/04 Location: United States Status: Offline Points: 194 |
Post Options
Thanks(0)
|
You don't have cmail.asp in cgi-bin
|
|
jason2004
Groupie Joined: September/29/05 Status: Offline Points: 87 |
Post Options
Thanks(0)
|
I do have CMail.asp in cgi-bin folder. <% '----------------------------------------------------------- --------- ' CMail.asp ' ' Copyright (c) 1995-2003 ComCity Corporation. All Rights Reserved. ' ' ' ' Define all Function Calls, Subroutines, and classes in this file ' ' CREATED February 19, 2001 by ip ' ' MODIFICATIONS '----------------------------------------------------------- --------- ' 3/19/01 &nbs p; mtb & nbsp; Needs Release 1.0 ' 1/14/03 &nbs p; wc &n bsp; Updated to use Bamboo ' 1/29/03 wc &nbs p;Updated to use JMail ' 2/4/03 wc &nbs p;Updated Bamboo to send mail using objMail.Send instead of objMail.SendMail ' 3/27/03 wc &nbs p;Updated to use Persits ASPEmail ' 7/2/03 wc &nbs p;Updated CDONTS to have option to send HTML-based email ' 7/2/03 wc &nbs p;Updated to send via CDOSYS ' '----------------------------------------------------------- --------- ' EXAMPLE ' 'Use ScCdo for CDONTS, ScAspMail for Serverobject's ASPMail, Bamboo for Bamboo Email, JMail for JMail, 'ScAspEmail for Persits ASPEmail, CDOSYS for CDOSYS ' 'The AddToAddress takes three parameters Name, email, address, type(1=To, 2=Cc, 3=Bcc) 'these are all required or you will get an error. Each Name must be unique. If you 'don't have a name just pass up a made up one. or the email address. ' 'Set objMail = New CMail 'objMail.SetPluginType = "ScCdo" 'objMail.SetFromAddress=mymail 'objMail.AddToAddress "Jim Bim", toaddress, 1 'objMail.AddToAddress "Old Granddad", ccaddress, 2 'objMail.AddToAddress "Johnny Walker", bccaddress, 3 'objMail.SetSubject=mysubject 'objMail.SetBody=themessage 'mailres=objMail.SendMessage() 'Set objMail = Nothing '----------------------------------------------------------- --------- '**Start Encode** |
|
mikeb
Admin Group Joined: March/17/04 Location: United States Status: Offline Points: 194 |
Post Options
Thanks(0)
|
Sorry not Cmail. Csimpleado.asp is the class that holds csimpleado. Either its not in the cgi-bin or it can't find it because of pathing/relative pathing issues you have introduced somehow.
|
|
jason2004
Groupie Joined: September/29/05 Status: Offline Points: 87 |
Post Options
Thanks(0)
|
I do have CSimpleado.asp in CGI-BIN folder. I have 2 versions of this file: One that came with SalesCart Pro 5: -------------------------------- <% '----------------------------------------------------------- --------- ' CSimple ADO ' ' Copyright (c) 1995-2003 ComCity Corporation. All Rights Reserved. ' ' ' ' Define all Function Calls, Subroutines, and classes in this file ' ' CREATED Unknown by ip ' MODIFICATIONS '----------------------------------------------------------- --------- ' Unknown &nbs p; ip &n bsp; Created ' 3/16/01 &nbs p; mtb & nbsp; Incorporation changes for Pro 3.0 ' 3/16/01 &nbs p; mtb & nbsp; Needs Release 2.0 ' 5/13/03 &nbs p; wc &n bsp; Created new function checkSQL to modify SQL statements to conform with SQL Server ' 5/13/03 &nbs p; wc &n bsp; Updated getRecordSet and ExecuteInsertUpdate functions to use checkSQL function ' ' ' '----------------------------------------------------------- --------- ' EXAMPLE '----------------------------------------------------------- --------- 'Dim objSimpleAdo, rstRS, strSql ' 'strSql = "SELECT * FROM MyTable" 'Set SimpleAdo = New CSimpleAdo 'SimpleAdo.setConnectionString = Session("Connection") 'Set rstRS = SimpleAdo.getRecordSet(strSql) 'Do stuff with the record set 'Set SimpleAdo = Nothing 'Set RS = Nothing ' '----------------------------------------------------------- --------- '**Start Encode**#@~^pgsAAA==@#@&@#@&@#@&;Vlk/,/?b:2Vb[G@#@&dh.k7lY ~/W xmOkGUUY.k &nbs p; L@#@&dK.b\lOn,ZGx ; ------------------------------------------------- and one I have downloaded: <% '----------------------------------------------------------- --------- ' CSimple ADO ' ' Copyright (c) 1995-2003 ComCity Corporation. All Rights Reserved. ' ' ' ' Define all Function Calls, Subroutines, and classes in this file ' ' CREATED Unknown by ip ' MODIFICATIONS '----------------------------------------------------------- --------- ' Unknown &nbs p; ip &n bsp; Created ' 3/16/01 &nbs p; mtb & nbsp; Incorporation changes for Pro 3.0 ' 3/16/01 &nbs p; mtb & nbsp; Needs Release 2.0 ' 5/13/03 &nbs p; wc &n bsp; Created new function checkSQL to modify SQL statements to conform with SQL Server ' 5/13/03 &nbs p; wc &n bsp; Updated getRecordSet and ExecuteInsertUpdate functions to use checkSQL function ' ' ' '----------------------------------------------------------- --------- ' EXAMPLE '----------------------------------------------------------- --------- 'Dim objSimpleAdo, rstRS, strSql ' 'strSql = "SELECT * FROM MyTable" 'Set SimpleAdo = New CSimpleAdo 'SimpleAdo.setConnectionString = Session("Connection") 'Set rstRS = SimpleAdo.getRecordSet(strSql) 'Do stuff with the record set 'Set SimpleAdo = Nothing 'Set RS = Nothing ' '----------------------------------------------------------- --------- '**Start Encode** Class CSimpleAdo Private ConnectionString Private Conn Private RS Public Property Let setConnectionString(strConn) ConnectionString = strConn End Property Private Function getDataConnection() On Error Resume Next Conn.O pen ConnectionString If Err.number <> 0 Then Dim&nb sp; newConn, posUID newCon n = ConnectionString posUID = Instr(1,newConn,"uid",1) If posUID <> 0 Then newConn = Mid(newConn,1,posUID-1) End&nb sp; If Respon se.Write "Could not open data connection. Error:<BR>" & Err.Description Respon se.Write "<p>The Invalid ConnectionString is defined as: " & newConn Respon se.End End If Set getDataConnection = Conn End Function Public Function getRecordSet(sql) sql = checkSQL(sql) Dim conn Set conn = getDataConnection() RS.CursorType = 3 RS.CursorLocation = 3 On Error Resume Next RS.Open sql,conn If Err.number <> 0 Then Response.Write "Error: <BR>" & Err.Description Exit Function End If Set getRecordSet = RS End Function Public Function ExecuteInsertUpdate(sql) sql = checkSQL(sql) Dim Conn Set Conn = getDataConnection() On Error Resume Next Conn.Execute(sql) If Err.number <> 0 Then ExecuteInsertUpdat e = False End If ExecuteInsertUpdate = True End Function Public Function checkSQL(SQLStr) If Session("DBType") = 1 Then SQLStr = Replace(SQLStr, "DISTINCTROW ", "") SQLStr = Replace(SQLStr, "Order.", "[order].") SQLStr = Replace(SQLStr, "order.", "[order].") If InStr(SQLStr, "DELETE item.Control") Then SQLStr = Replace(SQLStr, "item.Control ", "") End&nb sp; If If InStr(SQLStr, "DELETE *") Then SQLStr = Replace(SQLStr, "* ", "") End&nb sp; If If InStr(SQLStr, "AllOrders") Then SQLStr = Replace(SQLStr, "[order].", "") SQLStr = Replace(SQLStr, "#", "'") SQLStr = Replace(SQLStr, "customer.", "") SQLStr = Replace(SQLStr, "[AllOrders]", "AllOrders") End&nb sp; If If InStr(SQLStr, "ConfirmedOrder") Then SQLStr = Replace(SQLStr, "[order].", "") SQLStr = Replace(SQLStr, "#", "'") SQLStr = Replace(SQLStr, "customer.", "") If InStr(SQLStr, "orderdate like") Then SQLStr = Replace(SQLStr, "like", "=") End If End&nb sp; If If InStr(SQLStr, "CustomerOrder") Then SQLStr = Replace(SQLStr, "[order].", "") SQLStr = Replace(SQLStr, "#", "'") End&nb sp; If End If checkSQL = SQLStr End Function Private Sub Class_Initialize() Set RS = Server.CreateObject("ADODB.RecordSet") Set Conn = Server.CreateObject("ADODB.Connection") End Sub Private Sub Class_Terminate() Set Conn = Nothing Set RS = Nothing 'Conn.Close End Sub End Class %> -------------------------------------- Which one is the correct? Edited by jason2004 |
|
jason2004
Groupie Joined: September/29/05 Status: Offline Points: 87 |
Post Options
Thanks(0)
|
What pathing/relative pathing issues you think I might have?
Looking at the code shouldn't the Session ("ConnectionString") be ("SalesCart1_connectionstring") or to leave as it is? Set SimpleAdo = New CSimpleAdo SimpleAdo.setConnectionString = Session("ConnectionString") Set RS = SimpleAdo.getRecordSet(SQLStmt) |
|
mikeb
Admin Group Joined: March/17/04 Location: United States Status: Offline Points: 194 |
Post Options
Thanks(0)
|
The version of CSimpleADO that ships with the product is the correct one although that file has undergone very little changes so its doubtful the version is the problem. If the file is in the cgi-bin folder, than the problem is that it cannot find the file.
You should not be changing connection string information. The name of the SalesCart Connection string session variable is "ConnectionString". You don't change this stuff...there never is a reason to even open it up. Your error message is quite discript. Class not defined: 'CSimpleAdo' In other words, I cannot find CSimpleAdo? Where is it? I expect to see it in the same path as where I am as normally defined by an include at the top of the page, but I cannot find it there. Sendemail.asp normally gets called from receipt2.asp. Does the top of your receipt page have this?: <!--#include file="codepage.asp"--> |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |