p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: Syntax error


Message #1 by "Robert Sindall" <rs@s...> on Tue, 11 Dec 2001 11:29:55 -0000
This is a multi-part message in MIME format.

------=_NextPart_000_0014_01C18209.BC4BDF10
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

I pasted your code and I got an invalid character on line 18.

When I saved your code as text and pasted it into an ASP page, the line

 Dim objCDO ?฿here ??? (line 18)

shows up as

 Dim objCDO ?฿here ??? (line 18)

Once, I removed the invalid text (i.e. just Dim objCDO) it ran fine.

Steve
  -----Original Message-----
  From: Robert Sindall [mailto:rs@s...]
  Sent: Tuesday, December 11, 2001 4:30 AM
  To: Code Clinic
  Subject: [proasp_codeclinic] Syntax error


  Hi,

  I have recently done loads of CDONTS form etc?. but for some reason today
I?m getting this error when I declare a variable.

  Why ?



  ERROR

  Microsoft VBScript compilation error '800a03ea'

  Syntax error

  /partner/index.asp, line 18

Dim objCDO
^




  CODE



  <%@LANGUAGE="VBSCRIPT"%>

  <% if (cStr(Request("Submit")) <> "") Then

              Dim MsgBody

              MsgBody =       "Date: "
& date() & vbcrlf & vbcrlf & _

                                      "Name: "
& Request.Form("contactname") & vbcrlf  & _

                                      "Company: "
& Request.Form("companyname") & vbcrlf  & _

                                      "Address 1: "
& Request.Form("address1") & vbcrlf  & _

                                      "Address 2: "
& Request.Form("address2") & vbcrlf  & _

                                      "Address 3: "
& Request.Form("address3") & vbcrlf  & _

                                      "Postcode: "
& Request.Form("postcode") & vbcrlf  & _

                                      "Telephone: "
& Request.Form("telephone") & vbcrlf  & _

                                      "Fax: "
& Request.Form("fax") & vbcrlf  & _

                                      "Email: "
& Request.Form("email") & vbcrlf  & _

                                      "Turnover: "
& Request.Form("turnover") & vbcrlf  & _

                                      "Number of Employees: "
& Request.Form("noemployees") & vbcrlf  & _

                                      "Services Required: "
& Request.Form("service") & vbcrlf  & _

                                      "Questions: "
& Request.Form("question")



              Dim objCDO ?฿here ??? (line 18)

              Set objCDO = Server.CreateObject("CDONTS.NewMail")

              objCDO.From = "PartnerForm@s..."

              objCDO.To = "info@s..."

              objCDO.CC = "rs@s..."

              objCDO.Subject = "ISP - Partners Signup Form"

              objCDO.Body = MsgBody

              objCDO.Send()

              Set objCDO = Nothing



              Response.Redirect("/index.asp")

  End If

  %>

$subst('Email.Unsub').



  Return to Index