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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp beginer question

Status
Not open for further replies.

jvande

MIS
Jun 6, 2001
115
US
I have a silly question. It has been some time since I have programmed asp. I have the below code and I keep getting the error &quot;Expected statement&quot; I know the code works, my problem is that I am combining html and asp. As soon as I take out the <html>, test page, and </html> is works. Please help.

<html>
test page

<%
OPTION EXPLICIT
%>
<!--#include file=&quot;includes/connectionstring.asp&quot;-->

<%
dim strSQL
dim i

'Open empty recordset to add data to table
strSQL = &quot;SELECT * FROM test_web where 1=0;&quot;
oRS.Open strSQL, dbConn, 1, 3, 1
oRS.AddNew

'loop through fields in pdf file and populate record set
for i = 1 to 3
oRS(i) = request.form(i)
next
ors.update
ors.close

%>
</html>
 
[tt]
Place this above your <html> tag

<%@LANGUAGE=&quot;VBSCRIPT&quot;%>
[tt]&quot;A Successful man is one who can build a firm foundation with the bricks that others throw at him&quot;[/tt]
[noevil]
 
That doesn't work. I tried that already. Thanks
 
[tt]Can you post the error to help you better, shooting in the dark without error.
[tt]&quot;A Successful man is one who can build a firm foundation with the bricks that others throw at him&quot;[/tt]
[noevil]
 
Try this:
----------------------------

<%
OPTION EXPLICIT
%>

<html>
test page

<!--#include file=&quot;includes/connectionstring.asp&quot;-->

<%
dim strSQL
dim i

'Open empty recordset to add data to table
strSQL = &quot;SELECT * FROM test_web where 1=0;&quot;
oRS.Open strSQL, dbConn, 1, 3, 1
oRS.AddNew

'loop through fields in pdf file and populate record set
for i = 1 to 3
oRS(i) = request.form(i)
next
ors.update
ors.close

%>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top