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

Simple ASP page

Status
Not open for further replies.

cfcProgrammer

Programmer
Mar 1, 2006
88
CA
Hi,
I know this is going to be something very simple but I'm unable to see the issue. I am new to ASP. My page is not completed so all functionality is not coded and I am not expecting my SQL to work as I have not created a connection to the database yet but I should be able to get the page to simply display at this point but I am getting an error stating:

Microsoft JScript compilation error '800a03ec'

Expected ';'

/DFOReps/generate reports.asp, line 35

dim RptName = (Request.form("ReportName"))
----^

Here is the code that I have now. I apologize for posting something so simple. I don't understand where it could be expecting the ; as I am only using ASP and HTML. ????

Any help would be graciously appreciated.

Code:
<%@  Language=JavaScript %>
<% // VI 6.0 Scripting Object Model Enabled %>
<!--#include file="../_ScriptLibrary/pm.asp"-->
<% if (StartPageProcessing()) Response.End() %>
<FORM name=thisForm METHOD=post>
<html>
<head>

<!-- Style Sheet -->
<style TYPE="text/css">
<!--
  P {font-size: 10pt  font-family: Arial  color: black }
  TD {font-size: 8pt  color: black  font-family: Arial }
  TH {font-size: 10pt  color: black  font-family: Arial  font-style: bold }
  A:link {text-decoration:none  color:blue }
  A:visited {text-decoration:none color:red }
  A:Hover {text-decoration:underline color:maroon }
  H2 {font-family: Arial }
  H3 {font-family: Arial }
  H4 {font-family: Arial }
  H5 {font-family: Arial }
  H6 {font-family: Arial }
-->
</style>

<title>SIS - DFO Reports</title>
</head>

<body bgcolor="white">

<%

response.write(Request.form("ReportName"))

dim RptName = (Request.form("ReportName"))
 
select RptName{
case 1
FishStatus()
case 2
AISCommercial()
case 3
PatrolHoursByFishery()
case 4
PatrolDetailsByArea()
case 5
PatrolSightingsByArea()
case 6
AerialSurveillance()
case 7
AirSurveillanceFixedWing()
case 8
DFOAerialSurveillance()
}
end select

function FishStatus(){

'Retrieve the data for the Fish Status report based on the parameters entered 

 dim sSelect=""
 dim sFrom=""
 dim sWhere=""
 dim sOrder=""
 dim reg=""
 dim FromDate = Request.form("txtFromDay") + "/" + Request.form("txtFromMonth") + "/" + reqest.form("txtFromYear")
 dim ToDate= Request.form("txtToDay") + "/" +  Request.form("txtToMonth") + "/" +  Request.form("txtToYear")
   
  sSelect += "SELECT"
  sSelect += "ft.area"
  sSelect += "fc.species" 
  sSelect += "sum(d.dir_hrs)" 
  sSelect += "sum(d.dom_id)" 
  sSelect += "sum(d.for_id)"  
  sSelect += "sum(d.dom_obs)" 
  sSelect += "sum(d.for_obs)" 
    
  sFrom += "asis_directed d" 
  sFrom += "join asis_report_info ri on d.patrol_no=ri.patrol_no" 
  sFrom += "join asis_fhmtask ft on ft.patrol_no=d.patrol_no and ft.ref_no=d.ref_no" 
  sFrom += "join asis_fishery_code fc on fc.fishery = ft.fishery " 

  GetRegion()

  sWhere += "d.patrol_no like " 
  sWhere += "'&reg&'"  
  sWhere += "and" 
  sWhere += "ri.patrol_date between " 
  sWhere += "'&FromDate&'" 
  sWhere += "and" 
  sWhere += "'&ToDate&'" 

  sGroup += "ft.area,ri.patrol_date,fc.species" 

//  sOrder=MakeOrder() 
  
sSQL = sSelect + sFrom + sWhere 

response.write(sSql) 
  }

function GetRegion(){

var reg 


select (Request.form("region")){
case 1
reg = "NL" 
case 2
reg = "BKS" 
case 3
REG = "GR" 
case 4
reg = "QR" 
end select 
}
}

function thisPage_onenter() {
	if (Session("svPermission")!=1)
		Response.Redirect("../logout.asp") 
		
	if (Session("svPGeneral")!=1) {
		Session("svError")="Your current permission settings prohibit you from accessing all DFO REPORTS. <BR> Please see the <a href=contact.asp>contact page</a> for information about how to gain access. <BR><H5><a href=home.asp>GO HOME</a></H5>" 
		Response.Redirect("../error.asp") 
	}
}

%>

</body>
</html>
 


Try losing the parens.

dim RptName = Request.form("ReportName")


It's longer, but I like:

Dim RptName
RptName = Request.Form("ReportName")

better because it helps me see things. Just style and my pref.







 
There isn't a Dim statement in JScript - use var instead

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Sorry Chris - slow typist at work!

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
John,

Are you also a slow typist when you are at home? [smile]



-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
[smile]

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
JScript doesn't use select, either, and your case statements look like a mix and match of JScript and VBScript.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top