Avatar of bschwarting
bschwarting
 asked on

ASP Syntax

Why can't I get this to work?  Here is the error.

Microsoft VBScript compilation error '800a0401'
Expected end of statement
/updated/insert.asp, line 41
line1 = "<?xml version="1.0" encoding="UTF-8"?>"
------------------------------^
line1 = "<?xml version="1.0" encoding="UTF-8"?>"

f.WriteLine(line1)

Open in new window

Microsoft AccessASPSQL

Avatar of undefined
Last Comment
sammySeltzer

8/22/2022 - Mon
sammySeltzer

Have no idea what you are trying to do but change to single quoes like:

line1 = "<?xml version='1.0' encoding="UTF-8"?>"

f.WriteLine(line1)
sammySeltzer

line1 = "<?xml version='1.0' encoding='UTF-8'?>"

I missed the utf-8...
bschwarting

ASKER
Inside the quotes needs to stay exactly how it is.  I'm writing a bunch of stuff out to a text file, in a loop, and this has to be the header.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
sammySeltzer

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
bschwarting

ASKER
ah!  you da man!  double quotes worked great!
sammySeltzer

You can also try this:
Response.Write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");