Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 17th, 2009, 03:55 PM
121 121 is offline
Authorized User
Join Date: Sep 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft VBScript compilation error '800a03f6'

Can someone help me please!! totally new to scripts but cannot get this to work... i've got no hair left....

error:: Microsoft VBScript compilation error '800a03f6'

Expected 'End'

/admin/includes/common.asp, line 790


'Two varibles are passed into the db
'u_input is the value if the user entered a response to
'the vote/poll question....IP is the address of the user
' if the user did not enter anything in the poll on this visit
' then display the poll question and possible choices
if u_input = "" then

<form action="<%= request.servervariables(" method="post" % script_name?)><span style="COLOR: #ffffff">"> </span>
<p><strong>Arts Category<br />
<br />
<input type="radio" checked="checked" value="1" name="u_input" />Arts 1<br />

<input type="radio" value="2" name="u_input" />Arts 2<br />

<input type="radio" value="3" name="u_input" />Arts 3<br />

<input type="radio" value="4" name="u_input" />Arts 4<br />

<input type="radio" value="5" name="u_input" />Arts 5<br />

<input type="radio" value="6" name="u_input" />Arts 6<br />

<input type="submit" value="Submit" /></p>
' if the user did input a choice on the vote/ballot
' check to see if their ip address is already in the db
' if the directory your .asp page is in does not have user
' write authority the accessdb variable and access db may
' need to be moved to your /cgi-bin/ directory and add that to the code below
cn="driver={Microsoft Access Driver (*.mdb)};"
cn=cn & "dbq=" & server.mappath(accessdb)
set rs = server.createobject("ADODB.Recordset")
sql = "select ip from ballot where ip ='" & u_ip & "'"
rs.Open sql, cn
if rs.eof then
' if the user has not voted previously indicate it
end if
if been_here_before = "No" then
' Since the user has not voted previously their input
' their vote will be added to the db
sql = "insert into ballot (ip, selection" & u_input &") "
sql = sql & "values ('" & u_ip & "',1)"
rs.Open sql, cn
end if
'This will summerize and count the records in the db
sql= "select distinctrow "
sql= sql & "sum(selection1) as sum_selection1, "
sql= sql & "sum(selection2) as sum_selection2, "
sql= sql & "sum(selection3) as sum_selection3, "
sql= sql & "sum(selection4) as sum_selection4, "
sql= sql & "sum(selection5) as sum_selection5, "
sql= sql & "sum(selection6) as sum_selection6, "
sql= sql & "count(*) AS total_votes "
sql= sql & "FROM ballot;"
rs.Open sql, cn
total1=rs ("sum_selection1")
total2=rs ("sum_selection2")
total3=rs ("sum_selection3")
total4=rs ("sum_selection4")
total5=rs ("sum_selection5")
total6=rs ("sum_selection6")
count=rs ("total_votes")
Arts Category <br />

<img height="10" src="black.jpg" width="<%= formatnumber((total1/count)*100,0) %>" />
= formatnumber((total1/count)*100,1)
%<br />
Arts 1 <br />

<img height="10" src="yellow.jpg" width="<%= formatnumber((total2/count)*100,0) %>" />
= formatnumber((total2/count)*100,1)
%<br />
Arts 2 <br />

<img height="10" src="pink.jpg" width="<%= formatnumber((total3/count)*100,0) %>" />
= formatnumber((total3/count)*100,1)
%<br />
Arts 3 <br />

<img height="10" src="blue.jpg" width="<%= formatnumber((total4/count)*100,0) %>" />
= formatnumber((total4/count)*100,1)
%<br />
Arts 4 <br />

<img height="10" src="green.jpg" width="<%= formatnumber((total5/count)*100,0) %>" />
= formatnumber((total5/count)*100,1)
%<br />
Arts 5 <br />

<img height="10" src="red.jpg" width="<%= formatnumber((total6/count)*100,0) %>" />
= formatnumber((total6/count)*100,1)
%<br />
Arts 6 <br />
Total Votes:
= formatnumber(count,0,0)
<br />

end if
Reply With Quote
  #2 (permalink)  
Old September 17th, 2009, 04:57 PM
Friend of Wrox
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

I don't think you are showing the relevant code.

Notice that the error is in your *INCLUDE* file, *NOT* in this file. (Unless this *is* the include file...in which case you are only showing a tiny probably irrelevant part, since the error is on line 790.)

And *please* when you post...put your code inside of [ code ] ... [ /code ] tags (without spaces in there).
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft VBScript compilation error '800a03f6' 121 Classic ASP Professional 11 September 20th, 2009 01:48 PM
Microsoft VBScript compilation error '800a03f6' jdutwell Classic ASP Basics 3 April 2nd, 2008 01:50 PM
Microsoft VBScript compilation error '800a03f6' ksrhyd Classic ASP Professional 0 October 11th, 2007 07:53 AM
Microsoft VBScript compilation error '800a03f6' dondavanzo Access ASP 1 May 30th, 2006 02:11 PM
Microsoft VBScript compilation error '800a03f6' stevesole Access ASP 2 June 8th, 2004 02:04 PM

All times are GMT -4. The time now is 07:33 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.