473,230 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,230 software developers and data experts.

where to put 'end'??

Nat
Hi there,
I have code as following but it returns error
Error Type:
Microsoft VBScript compilation (0x800A03F6)
Expected 'End'
/urbisjhdintranet/metadata/resultList.asp, line 324
which is the second last line at the end of the code. I have no idea
where to put 'end'. It would be great if anyone could help.
Thanks heaps!
Nat

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/metadata.asp" -->
<%
Dim resultlist_varSupplier
Dim resultlist_varDataset
Dim resultlist_varDatamgr
Dim resultlist_varKeyword
resultlist_varSupplier = "%"
resultlist_varDataset = "%"
resultlist_varDatamgr = "%"
resultlist_varKeyword = "%"
if (Request.Form("lstSupplier") <> "") then
resultlist_varSupplier = Replace(Request.Form("lstSupplier"), "'",
"''")
if (Request.Form("lstDataset") <> "") then
resultlist_varDataset = Replace(Request.Form("lstDataset"), "'", "''")
if (Request.Form("lstDatamgr") <> "") then
resultlist_varDatamgr = Replace(Request.Form("lstDatamgr"), "'", "''")
if (Request.Form("txtKeyword") <> "") then
resultlist_varKeyword = Replace(Request.Form("txtKeyword"), "'", "''")

varSearch = ""
wherecheck = 0
if resultlist_varSupplier <> "%" then
varSearch = "WHERE CompanyName = '"&resultlist_varSupplier&"'"
wherecheck = 1
end if
if resultlist_varDataset <> "%" then
if wherecheck = 1 then
varSearch = varSearch&" and Parent_Dataset_Name =
'"&resultlist_varDataset&"'"
else
varSearch = "WHERE Parent_Dataset_Name =
'"&resultlist_varDataset&"'"
wherecheck = 1
end if
end if
if resultlist_varDatamgr <> "%" then
if wherecheck = 1 then
varSearch = varSearch&" and Name =
'"&resultlist_varDatamgr&"'"
else
varSearch = "WHERE Name = '"&resultlist_varDatamgr&"'"
wherecheck = 1
end if
end if
if resultlist_varKeyword <> "%" then
if wherecheck = 1 then
varSearch = varSearch&" and Keyword =
'"&resultlist_varKeyword&"'"
else
varSearch = "WHERE Keyword = '"&resultlist_varKeyword&"'"
end if
end if

set resultlist = Server.CreateObject("ADODB.Recordset")
resultlist.ActiveConnection = MM_metadata_STRING
resultlist.Source = "SELECT Child_Dataset_ID, Parent_Dataset_ID,
Parent_Dataset_Name, ChildDataset_Name, Dataset_StartDate,
Dataset_EndDate, Dataset_Type, Projections, Version, Cost, License,
Copyright, Last_Updated, Quality, Format, Filesize, FileLocation,
Source, CompanyName, Name, Keyword FROM qryAlldata " & varSearch & "
ORDER BY ChildDataset_Name"
resultlist.CursorType = 0
resultlist.CursorLocation = 2
resultlist.LockType = 3
resultlist.Open()
resultlist_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 10
Dim Repeat1__index
Repeat1__index = 0
resultlist_numRows = resultlist_numRows + Repeat1__numRows
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining
URL and Form parameters

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" &
MM_paramName & "=" End If
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_kee pNone=""

' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepURL = MM_keepURL & NextItem &
Server.URLencode(Request.QueryString(Item))
End If
Next

' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepForm = MM_keepForm & NextItem &
Server.URLencode(Request.Form(Item))
End If
Next

' create the Form + URL string and remove the intial '&' from each of
the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth,
Len(MM_keepBoth) - 1) End If
if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL,
Len(MM_keepURL) - 1) End If
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm,
Len(MM_keepForm) - 1) End If

' a utility function used for adding additional parameters to these
strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0035)http://www.urbisjhd.com/careers.htm -->
<HTML>
<!-- #BeginTemplate "/Templates/main_template.dwt" -->
<HEAD>
<!-- #BeginEditable "doctitle" -->
<TITLE>UrbisJHD :: Metadata Database</TITLE>
<!-- #EndEditable -->
<META http-equiv=Content-Type content="text/html;
charset=windows-1252">
<!-- #BeginEditable "script" -->
<SCRIPT src="js.js"></SCRIPT>
<NOSCRIPT>
<LINK href="ie.css" type=text/css
rel=styleSheet>
</NOSCRIPT><!-- #EndEditable -->
<META http-equiv=imagetoolbar content=no>
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
</HEAD>
<BODY bottomMargin=0 bgColor=#ffffff leftMargin=0 topMargin=0
rightMargin=0
marginwidth="0" marginheight="0">
<!--Start : logo-->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><A onmouseover="javascript:GB_statusMsg('Homepage'); return
true;"
onfocus=javascript:this.blur();
onmouseout="javascript:GB_statusMsg(''); return true;"
href="http://www.urbisjhd.com/default.htm"><IMG height=84
src="../Images/urbis.gif" width=154 border=0></A></TD>
<TD width="100%">
<div align="center"><img src="../Images/Intranet_new.jpg"
width="250" height="84"></div>
</TD>
<TD><IMG height=84 src="../Images/top_dots.gif" width=193
border=0></TD>
</TR>
</TBODY>
</TABLE>
<!--End : logo-->
<!--Start : nav-->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width=154><img src="../Images/blank.gif" width="154"
height="15"></TD>
<TD onmouseup="javascript:window.location.href='home.h tm';"
class=mainnav
onmouseover="javascript:this.className='mainnavove r';
GB_statusMsg('Home Page'); return true;"
onmouseout="javascript:this.className='mainnav'; GB_statusMsg('');
return true;" noWrap><A
class=mainnavlink
onmouseover="javascript:GB_statusMsg('Home page'); return true;"
onfocus=javascript:this.blur();
onmouseout="javascript:GB_statusMsg(''); return true;"
href="../home.htm">Home</A></TD>
<TD onmouseup="javascript:window.location.href='http://web01/urbisjhdintranet/UrbisJHD
Inside.htm';" class=mainnav
onmouseover="javascript:this.className='mainnavove r';
GB_statusMsg('Inside UrbisJHD'); return true;"
onmouseout="javascript:this.className='mainnav'; GB_statusMsg('');
return true;"
noWrap><A class=mainnavlink
onmouseover="javascript:GB_statusMsg('Inside UrbisJHD'); return
true;"
onfocus=javascript:this.blur();
onmouseout="javascript:GB_statusMsg(''); return true;"
href="http://web01/urbisjhdintranet/UrbisJHD%20%20Inside.htm">Inside
UrbisJHD</A></TD>
<TD onmouseup="javascript:window.location.href='http://web01/urbisjhdintranet/UrbisJHD
KCP.htm';"
class=mainnav
onmouseover="javascript:this.className='mainnavove r';
GB_statusMsg('KCP'); return true;"
onmouseout="javascript:this.className='mainnav'; GB_statusMsg('');
return true;"
noWrap><A class=mainnavlink
onmouseover="javascript:GB_statusMsg('KCP'); return true;"
onfocus=javascript:this.blur();
onmouseout="javascript:GB_statusMsg(''); return true;"
href="http://web01/urbisjhdintranet/UrbisJHD%20KCP.htm">KCP</A></TD>
<TD onmouseup="javascript:window.location.href='http://web01/urbisjhdintranet/UrbisJHD
Services.htm';"
class=mainnav
onmouseover="javascript:this.className='mainnavove r';
GB_statusMsg('Staff Services'); return true;"
onmouseout="javascript:this.className='mainnav'; GB_statusMsg('');
return true;"
noWrap><A class=mainnavlink
onmouseover="javascript:GB_statusMsg('Staff Services'); return
true;"
onfocus=javascript:this.blur();
onmouseout="javascript:GB_statusMsg(''); return true;"
href="http://web01/urbisjhdintranet/UrbisJHD%20%20Services.htm">Staff
Services</A></TD>
<TD onmouseup="javascript:window.location.href='http://web01/urbisjhdintranet/UrbisJHD
Forum.htm';" class=mainnav
onmouseover="javascript:this.className='mainnavove r';
GB_statusMsg('UrbisJHD Forum'); return true;"
onmouseout="javascript:this.className='mainnav'; GB_statusMsg('');
return true;"
noWrap><A class=mainnavlink
onmouseover="javascript:GB_statusMsg('UrbisJHD Forum'); return
true;"
onfocus=javascript:this.blur();
onmouseout="javascript:GB_statusMsg(''); return true;"
href="http://web01/urbisjhdintranet/UrbisJHD%20%20Forum.htm">UrbisJHD
Forum</A></TD>
<TD onmouseup="javascript:window.location.href='http://web01/urbisjhdintranet/phonelist/urbisjhd
phone list.asp';"
class=mainnav
onmouseover="javascript:this.className='mainnavove r';
GB_statusMsg('Phone List'); return true;"
onmouseout="javascript:this.className='mainnav'; GB_statusMsg('');
return true;"
noWrap><A class=mainnavlink
onmouseover="javascript:GB_statusMsg('Phone List'); return
true;"
onfocus=javascript:this.blur();
onmouseout="javascript:GB_statusMsg(''); return true;"
href="http://web01/urbisjhdintranet/phonelist/urbisjhd phone
list.asp">Phone
List</A></TD>
<TD onmouseup="javascript:window.location.href='http://web01/urbisjhdintranet/UrbisJHD
Portals.htm';"
class=mainnav
onmouseover="javascript:this.className='mainnavove r';
GB_statusMsg('Portals'); return true;"
onmouseout="javascript:this.className='mainnav'; GB_statusMsg('');
return true;"
noWrap><A class=mainnavlink
onmouseover="javascript:GB_statusMsg('Portals'); return true;"
onfocus=javascript:this.blur();
onmouseout="javascript:GB_statusMsg(''); return true;"
href="../UrbisJHD%20Portals.htm">Portals</A></TD>
<TD onmouseup="javascript:window.location.href='http://web01/urbisjhdintranet/UrbisJHD
Links.htm';"
class=mainnav
onmouseover="javascript:this.className='mainnavove r';
GB_statusMsg('Links'); return true;"
onmouseout="javascript:this.className='mainnav'; GB_statusMsg('');
return true;"
noWrap><A class=mainnavlink
onmouseover="javascript:GB_statusMsg('Links'); return true;"
onfocus=javascript:this.blur();
onmouseout="javascript:GB_statusMsg(''); return true;"
href="http://web01/urbisjhdintranet/UrbisJHD%20Links.htm">Links</A></TD>
<TD width="100%" class=sitecolour>&nbsp;</TD>
<TD width="100%" class=sitecolour>&nbsp;</TD>
</TR>
</TBODY>
</TABLE>
<!--End : nav-->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><IMG height=1 src="/Images/blank.gif" width=27
border=0></TD>
<TD vAlign=top><BR>
<!-- #BeginEditable "header" --><SPAN class=header>Search
Results</SPAN><!-- #EndEditable --><BR>
<BR>
<!-- #BeginEditable "content" -->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top width="480">
<%Response.Write Request.Form("txtKeyword")%>
</TD>
</TR>
</TBODY>
</TABLE>
<table>
<TR>
<TD vAlign=top width="466" class="boldwhitetext"
bgcolor="#AEAE55">ChildDataset</TD>
<TD vAlign=top width="466" class="boldwhitetext"
bgcolor="#AEAE55">ParentDataset</TD>
<TD vAlign=top width="466" class="boldwhitetext"
bgcolor="#AEAE55">Data_EndDate</TD>
<TD vAlign=top width="466" class="boldwhitetext"
bgcolor="#AEAE55">Data_Type</TD>
<TD vAlign=top width="466" class="boldwhitetext"
bgcolor="#AEAE55">Projections</TD>
<TD vAlign=top width="466" class="boldwhitetext"
bgcolor="#AEAE55">...</TD>
</tr>
<%
Dim RecordCounter
RecordCounter = 0
%>
<%
While ((Repeat1__numRows <> 0) AND (NOT resultlist.EOF))
%>
<TR>
<TD vAlign=top>
<%=(resultlist.Fields.Item("ChildDataset_Name").Va lue)%></TD>
<TD vAlign=top>
<%=(resultlist.Fields.Item("Parent_Dataset_Name"). Value)%></TD>
<TD vAlign=top>
<%=(resultlist.Fields.Item("Dataset_EndDate").Valu e)%></TD>
<TD vAlign=top>
<%=(resultlist.Fields.Item("Dataset_Type").Value)% ></TD>
<TD vAlign=top>
<%=(resultlist.Fields.Item("Projections").Value)%> </TD>
<TD vAlign=top>
<A HREF="ListDetail.asp?<%= "Child_Dataset_ID=" &
resultlist.Fields.Item("Child_Dataset_ID").Value %>">details</A></TD>
</TR>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
resultlist.MoveNext()
Wend
%>
</table>
<!-- #EndEditable -->
<!--End : content-->
<!--spacer-->
<IMG height=1
src="/Images/blank.gif" width=480 border=0> </TD>
<TD width="100%"><IMG height=15 src="../Images/blank.gif"
width=17 border=0></TD>
<TD class=subnavbgcolour vAlign=top><!-- #BeginEditable "image"
--><IMG height=51
src="../Images/careers.jpg" width=192 border="0"><!--
#EndEditable -->
<TABLE cellPadding=10>
<TBODY>
<TR>
<TD valign="top">
<!--Start : subnav-->
<!-- #BeginEditable "subnav" --> <!-- #EndEditable -->
<!--end : subnav-->
</TD>
</TR>
</TBODY>
</TABLE>
<BR>
<BR>
<IMG height=1
src="/Images/blank.gif" width=193 border=0> </TD>
</TR>
</TBODY>
</TABLE>
<!--Start : bottom dots-->
<BR>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD width="100%" background="../Images/btm_dots.gif"><IMG
height=39 src="../Images/blank.gif" width=1 border=0></TD>
<TD><IMG height=1 src="../Images/blank.gif" width=193
border=0></TD>
</TR>
</TBODY>
</TABLE>
<!--End : bottom dots-->
</BODY>
<!-- #EndTemplate -->
</HTML>
<%
resultlist.Close()
%>
Jul 19 '05 #1
2 1949
> if (Request.Form("lstSupplier") <> "") then
resultlist_varSupplier = Replace(Request.Form("lstSupplier"), "'",
"''")


If you are moving the resultlist_varSupplier = code to the next line, then
you must place an End If after, e.g.

If something Then
do_something
End If

If you keep it all on the same line then the end if is omitted, e.g.

If something Then do_something

(Man, does Dreamweaver ever make big ugly code...)

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


Jul 19 '05 #2
"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message news:<#8*************@TK2MSFTNGP11.phx.gbl>...
if (Request.Form("lstSupplier") <> "") then
resultlist_varSupplier = Replace(Request.Form("lstSupplier"), "'",
"''")


In this case it would be
if (Request.Form("lstSupplier") <> "") then
resultlist_varSupplier = Replace(Request.Form
("lstSupplier"), "'","''")
End If

Enjoy
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: GUEST | last post by:
Hi all. I'm a newbie to ORacle and am planning to take a course in Oracle this January. Can anyone tell me where a SQL/PL script is run from ? I tried to run a simple SQL/PL script under SQL...
0
by: Alex Vorobiev | last post by:
admittedly, this SP is probably a mess given that I am not a TSQL pro. its purpose is to, based on the arguments, do 1) paging or 2) return prev/next ids for a given record. it does the job, but...
9
by: heruti | last post by:
Hi all... I've been stumped by this for days. Bit of ASP code: (IIS) Set LocalConn = CreateObject("ADODB.Connection") LocalConn.CursorLocation = adUseClient LocalConn.CommandTimeout = 0...
16
by: Dixie | last post by:
I have a problem using Dev Ashish's excellent module to concatenate the results of a field from several records into one record. I am using the code to concatenate certain awards onto a...
8
by: John Welch | last post by:
I have a command button with the following code: DoCmd.OpenForm "frmSearchAssignments", , , "SearchAssignmentID = 1" (SearchAssignmentID is the PK, auto number) When it runs, the form opens but...
4
by: Brian Shannon | last post by:
I have 3 combo boxes and two date text boxes on a .aspx page. The user can fill in any of the 5 controls or none to filter a datagrid. I was hoping someone could explain how to efficiently build...
10
by: mttc | last post by:
I read articles that suggest preventing delete by throwing Exception from RowDeleting Event. I not understand where I can catch this Error?
41
by: Miroslaw Makowiecki | last post by:
Where can I download Comeau compiler as a trial version? Thanks in advice.
2
by: Ceebaby via AccessMonster.com | last post by:
Hi Folks I wondered if someone could point me in the right direction before I completely tear my hair out. I have a user selection form where options can be selected for a report. Users now...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.