# Microsoft VBScript runtime error '800a01a8'



## AnjL (Apr 27, 2010)

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


----------



## Keebellah (Mar 27, 2008)

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.


----------

