Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

writing to a file

Status
Not open for further replies.

dcarbone

Programmer
Aug 22, 2003
29
CA
I need to write this line to a file:

oTextFile.Write &quot;<td align=center><b><font size=2 face=Arial><% rst3Simple.Fields(&quot;Destination&quot;).Value %></font></b></td>&quot;

but i keep getting this error:

Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/lcrForBid.asp, line 152, column 83
oTextFile.Write &quot;<td align=center><b><font size=2 face=Arial><% rst3Simple.Fields(&quot;Destination&quot;).Value
----------------------------------------------------------------------------------^

i guess it has something to do with the quotes or percent signs, but i need them to be written for this to work
 
I'll assume you have <% %> around that complete satatement like this
<%
oTextFile.Write &quot;<td align=center><b><font size=2 face=Arial><% rst3Simple.Fields(&quot;Destination&quot;).Value %></font></b></td>&quot;
%>

well, you can't do this <%<% %>%>
try building the string with concatination
oTextFile.Write &quot;<td align=center><b><font size=2 face=Arial>&quot; & rst3Simple.Fields(&quot;Destination&quot;).Value & &quot;</font></b></td>&quot;

_____________________________________________________________________
You can accomplish anything in life, provided that you do not mind who gets credit.
Harry S. Truman

onpnt2.gif

 
Thanks for the help, that resolved the syntax error, however, the value of

rst3Simple.Fields(&quot;Destination&quot;).Value

is not being written to the file
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top