Tech Support Guy banner
  • Please post in our Community Feedback thread for help with the new forum software! If you are having trouble logging in, please Contact Us for assistance.
Status
Not open for further replies.
1 - 2 of 2 Posts

·
Registered
Joined
·
1 Posts
Discussion Starter · #1 ·
Hey,

In need of some help to get this script working. Any help is greatly appreciated.

I have a list of users which I have sorted into groups to send different emails. The emails are html pages

The error

Microsoft VBScript runtime error '800a01a8'

Object required: '[string: "SELECT UserID, Conta"]'

/Admin/Planning/EmailMarketing_events.asp, line 26

The Code Problem is *

'Get SQL
Dim SQL
Dim oRS
Dim Connection
Dim ErrorMessage
Dim GroupDesc

Set Connection = New clsDBConnection1
Server.CreateObject("ADODB.RecordSet")
* Set GroupDesc = CCDLookUp("GroupSQL", "tblEmailGroup" , "EmailGroupID =" & DBConnection1.ToSQL (tblEmailMarketing1.EmailGroupID.Value, ccsInteger), DBConnection1)

oRS.Open GroupDesc, Connection, 3, 3

ErrorMessage = CCProcessError(Connection)
Connection.Close
Set Connection = Nothing
On Error Goto 0

Do While Not oRS.EOF

' Send Mail
Dim Mail

Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "mail.wiks.net.au" ' Required
Mail.Port = 25 ' Optional. Port is 25 by default
Mail.From = "[email protected]" ' Required
Mail.FromName = "WIKS - Workplace Improvement Kits" ' Optional
Mail.AddAddress Response.Write(oRS("Email")) , Response.Write(oRS("ContactName"))
Mail.Subject = tblEmailMarketing1.Subject.Value
Mail.Body = tblEmailMarketing1.BodyPage.Value
'Mail.AppendBodyFromFile = tblEmailMarketing1.BodyPage.Value
'Mail.AddToBody = True

On Error Resume Next
Mail.Send
If Err <> 0 Then
Response.Write "An error occurred: " & Err.Description
End If

oRS.MoveNext
Loop
 

·
Trusted Advisor
Joined
·
6,911 Posts
The error refers to an invalid object, so I think one of the values you query either doesn't exist of is not available.
This info I found by typing it in Google.
 
1 - 2 of 2 Posts
Status
Not open for further replies.
Top