473,654 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

where to put 'end'??

Nat
Hi there,
I have code as following but it returns error
Error Type:
Microsoft VBScript compilation (0x800A03F6)
Expected 'End'
/urbisjhdintrane t/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="VB SCRIPT"%>
<!--#include file="../Connections/metadata.asp" -->
<%
Dim resultlist_varS upplier
Dim resultlist_varD ataset
Dim resultlist_varD atamgr
Dim resultlist_varK eyword
resultlist_varS upplier = "%"
resultlist_varD ataset = "%"
resultlist_varD atamgr = "%"
resultlist_varK eyword = "%"
if (Request.Form(" lstSupplier") <> "") then
resultlist_varS upplier = Replace(Request .Form("lstSuppl ier"), "'",
"''")
if (Request.Form(" lstDataset") <> "") then
resultlist_varD ataset = Replace(Request .Form("lstDatas et"), "'", "''")
if (Request.Form(" lstDatamgr") <> "") then
resultlist_varD atamgr = Replace(Request .Form("lstDatam gr"), "'", "''")
if (Request.Form(" txtKeyword") <> "") then
resultlist_varK eyword = Replace(Request .Form("txtKeywo rd"), "'", "''")

varSearch = ""
wherecheck = 0
if resultlist_varS upplier <> "%" then
varSearch = "WHERE CompanyName = '"&resultlist_v arSupplier&"'"
wherecheck = 1
end if
if resultlist_varD ataset <> "%" then
if wherecheck = 1 then
varSearch = varSearch&" and Parent_Dataset_ Name =
'"&resultlist_v arDataset&"'"
else
varSearch = "WHERE Parent_Dataset_ Name =
'"&resultlist_v arDataset&"'"
wherecheck = 1
end if
end if
if resultlist_varD atamgr <> "%" then
if wherecheck = 1 then
varSearch = varSearch&" and Name =
'"&resultlist_v arDatamgr&"'"
else
varSearch = "WHERE Name = '"&resultlist_v arDatamgr&"'"
wherecheck = 1
end if
end if
if resultlist_varK eyword <> "%" then
if wherecheck = 1 then
varSearch = varSearch&" and Keyword =
'"&resultlist_v arKeyword&"'"
else
varSearch = "WHERE Keyword = '"&resultlist_v arKeyword&"'"
end if
end if

set resultlist = Server.CreateOb ject("ADODB.Rec ordset")
resultlist.Acti veConnection = MM_metadata_STR ING
resultlist.Sour ce = "SELECT Child_Dataset_I D, Parent_Dataset_ ID,
Parent_Dataset_ Name, ChildDataset_Na me, Dataset_StartDa te,
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_Na me"
resultlist.Curs orType = 0
resultlist.Curs orLocation = 2
resultlist.Lock Type = 3
resultlist.Open ()
resultlist_numR ows = 0
%>
<%
Dim Repeat1__numRow s
Repeat1__numRow s = 10
Dim Repeat1__index
Repeat1__index = 0
resultlist_numR ows = resultlist_numR ows + Repeat1__numRow s
%>
<%
' *** 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="":M M_keepForm="":M M_keepBoth="":M M_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each Item In Request.QuerySt ring
NextItem = "&" & Item & "="
If (InStr(1,MM_rem oveList,NextIte m,1) = 0) Then
MM_keepURL = MM_keepURL & NextItem &
Server.URLencod e(Request.Query String(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_rem oveList,NextIte m,1) = 0) Then
MM_keepForm = MM_keepForm & NextItem &
Server.URLencod e(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_keepBo th,
Len(MM_keepBoth ) - 1) End If
if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepUR L,
Len(MM_keepURL) - 1) End If
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepFo rm,
Len(MM_keepForm ) - 1) End If

' a utility function used for adding additional parameters to these
strings
Function MM_joinChar(fir stItem)
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.d wt" -->
<HEAD>
<!-- #BeginEditable "doctitle" -->
<TITLE>UrbisJ HD :: 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=imagetool bar 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="ja vascript:GB_sta tusMsg('Homepag e'); return
true;"
onfocus=javascr ipt:this.blur() ;
onmouseout="jav ascript:GB_stat usMsg(''); return true;"
href="http://www.urbisjhd.co m/default.htm"><I MG height=84
src="../Images/urbis.gif" width=154 border=0></A></TD>
<TD width="100%">
<div align="center"> <img src="../Images/Intranet_new.jp g"
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="java script:window.l ocation.href='h ome.htm';"
class=mainnav
onmouseover="ja vascript:this.c lassName='mainn avover';
GB_statusMsg('H ome Page'); return true;"
onmouseout="jav ascript:this.cl assName='mainna v'; GB_statusMsg('' );
return true;" noWrap><A
class=mainnavli nk
onmouseover="ja vascript:GB_sta tusMsg('Home page'); return true;"
onfocus=javascr ipt:this.blur() ;
onmouseout="jav ascript:GB_stat usMsg(''); return true;"
href="../home.htm">Home</A></TD>
<TD onmouseup="java script:window.l ocation.href='h ttp://web01/urbisjhdintrane t/UrbisJHD
Inside.htm';" class=mainnav
onmouseover="ja vascript:this.c lassName='mainn avover';
GB_statusMsg('I nside UrbisJHD'); return true;"
onmouseout="jav ascript:this.cl assName='mainna v'; GB_statusMsg('' );
return true;"
noWrap><A class=mainnavli nk
onmouseover="ja vascript:GB_sta tusMsg('Inside UrbisJHD'); return
true;"
onfocus=javascr ipt:this.blur() ;
onmouseout="jav ascript:GB_stat usMsg(''); return true;"
href="http://web01/urbisjhdintrane t/UrbisJHD%20%20I nside.htm">Insi de
UrbisJHD</A></TD>
<TD onmouseup="java script:window.l ocation.href='h ttp://web01/urbisjhdintrane t/UrbisJHD
KCP.htm';"
class=mainnav
onmouseover="ja vascript:this.c lassName='mainn avover';
GB_statusMsg('K CP'); return true;"
onmouseout="jav ascript:this.cl assName='mainna v'; GB_statusMsg('' );
return true;"
noWrap><A class=mainnavli nk
onmouseover="ja vascript:GB_sta tusMsg('KCP'); return true;"
onfocus=javascr ipt:this.blur() ;
onmouseout="jav ascript:GB_stat usMsg(''); return true;"
href="http://web01/urbisjhdintrane t/UrbisJHD%20KCP. htm">KCP</A></TD>
<TD onmouseup="java script:window.l ocation.href='h ttp://web01/urbisjhdintrane t/UrbisJHD
Services.htm';"
class=mainnav
onmouseover="ja vascript:this.c lassName='mainn avover';
GB_statusMsg('S taff Services'); return true;"
onmouseout="jav ascript:this.cl assName='mainna v'; GB_statusMsg('' );
return true;"
noWrap><A class=mainnavli nk
onmouseover="ja vascript:GB_sta tusMsg('Staff Services'); return
true;"
onfocus=javascr ipt:this.blur() ;
onmouseout="jav ascript:GB_stat usMsg(''); return true;"
href="http://web01/urbisjhdintrane t/UrbisJHD%20%20S ervices.htm">St aff
Services</A></TD>
<TD onmouseup="java script:window.l ocation.href='h ttp://web01/urbisjhdintrane t/UrbisJHD
Forum.htm';" class=mainnav
onmouseover="ja vascript:this.c lassName='mainn avover';
GB_statusMsg('U rbisJHD Forum'); return true;"
onmouseout="jav ascript:this.cl assName='mainna v'; GB_statusMsg('' );
return true;"
noWrap><A class=mainnavli nk
onmouseover="ja vascript:GB_sta tusMsg('UrbisJH D Forum'); return
true;"
onfocus=javascr ipt:this.blur() ;
onmouseout="jav ascript:GB_stat usMsg(''); return true;"
href="http://web01/urbisjhdintrane t/UrbisJHD%20%20F orum.htm">Urbis JHD
Forum</A></TD>
<TD onmouseup="java script:window.l ocation.href='h ttp://web01/urbisjhdintrane t/phonelist/urbisjhd
phone list.asp';"
class=mainnav
onmouseover="ja vascript:this.c lassName='mainn avover';
GB_statusMsg('P hone List'); return true;"
onmouseout="jav ascript:this.cl assName='mainna v'; GB_statusMsg('' );
return true;"
noWrap><A class=mainnavli nk
onmouseover="ja vascript:GB_sta tusMsg('Phone List'); return
true;"
onfocus=javascr ipt:this.blur() ;
onmouseout="jav ascript:GB_stat usMsg(''); return true;"
href="http://web01/urbisjhdintrane t/phonelist/urbisjhd phone
list.asp">Phone
List</A></TD>
<TD onmouseup="java script:window.l ocation.href='h ttp://web01/urbisjhdintrane t/UrbisJHD
Portals.htm';"
class=mainnav
onmouseover="ja vascript:this.c lassName='mainn avover';
GB_statusMsg('P ortals'); return true;"
onmouseout="jav ascript:this.cl assName='mainna v'; GB_statusMsg('' );
return true;"
noWrap><A class=mainnavli nk
onmouseover="ja vascript:GB_sta tusMsg('Portals '); return true;"
onfocus=javascr ipt:this.blur() ;
onmouseout="jav ascript:GB_stat usMsg(''); return true;"
href="../UrbisJHD%20Port als.htm">Portal s</A></TD>
<TD onmouseup="java script:window.l ocation.href='h ttp://web01/urbisjhdintrane t/UrbisJHD
Links.htm';"
class=mainnav
onmouseover="ja vascript:this.c lassName='mainn avover';
GB_statusMsg('L inks'); return true;"
onmouseout="jav ascript:this.cl assName='mainna v'; GB_statusMsg('' );
return true;"
noWrap><A class=mainnavli nk
onmouseover="ja vascript:GB_sta tusMsg('Links') ; return true;"
onfocus=javascr ipt:this.blur() ;
onmouseout="jav ascript:GB_stat usMsg(''); return true;"
href="http://web01/urbisjhdintrane t/UrbisJHD%20Link s.htm">Links</A></TD>
<TD width="100%" class=sitecolou r>&nbsp;</TD>
<TD width="100%" class=sitecolou r>&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>Se arch
Results</SPAN><!-- #EndEditable --><BR>
<BR>
<!-- #BeginEditable "content" -->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top width="480">
<%Response.Writ e Request.Form("t xtKeyword")%>
</TD>
</TR>
</TBODY>
</TABLE>
<table>
<TR>
<TD vAlign=top width="466" class="boldwhit etext"
bgcolor="#AEAE5 5">ChildDataset </TD>
<TD vAlign=top width="466" class="boldwhit etext"
bgcolor="#AEAE5 5">ParentDatase t</TD>
<TD vAlign=top width="466" class="boldwhit etext"
bgcolor="#AEAE5 5">Data_EndDate </TD>
<TD vAlign=top width="466" class="boldwhit etext"
bgcolor="#AEAE5 5">Data_Type </TD>
<TD vAlign=top width="466" class="boldwhit etext"
bgcolor="#AEAE5 5">Projectio ns</TD>
<TD vAlign=top width="466" class="boldwhit etext"
bgcolor="#AEAE5 5">...</TD>
</tr>
<%
Dim RecordCounter
RecordCounter = 0
%>
<%
While ((Repeat1__numR ows <> 0) AND (NOT resultlist.EOF) )
%>
<TR>
<TD vAlign=top>
<%=(resultlist. Fields.Item("Ch ildDataset_Name ").Value)%> </TD>
<TD vAlign=top>
<%=(resultlist. Fields.Item("Pa rent_Dataset_Na me").Value)%> </TD>
<TD vAlign=top>
<%=(resultlist. Fields.Item("Da taset_EndDate") .Value)%></TD>
<TD vAlign=top>
<%=(resultlist. Fields.Item("Da taset_Type").Va lue)%></TD>
<TD vAlign=top>
<%=(resultlist. Fields.Item("Pr ojections").Val ue)%></TD>
<TD vAlign=top>
<A HREF="ListDetai l.asp?<%= "Child_Dataset_ ID=" &
resultlist.Fiel ds.Item("Child_ Dataset_ID").Va lue %>">details</A></TD>
</TR>
<%
Repeat1__index= Repeat1__index+ 1
Repeat1__numRow s=Repeat1__numR ows-1
resultlist.Move Next()
Wend
%>
</table>
<!-- #EndEditable -->
<!--End : content-->
<!--spacer-->
<IMG height=1
src="/Images/blank.gif" width=480 border=0> </TD>
<TD width="100%"><I MG height=15 src="../Images/blank.gif"
width=17 border=0></TD>
<TD class=subnavbgc olour 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.Clos e()
%>
Jul 19 '05 #1
2 1971
> if (Request.Form(" lstSupplier") <> "") then
resultlist_varS upplier = Replace(Request .Form("lstSuppl ier"), "'",
"''")


If you are moving the resultlist_varS upplier = 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***@TRASHasp faq.com> wrote in message news:<#8******* ******@TK2MSFTN GP11.phx.gbl>.. .
if (Request.Form(" lstSupplier") <> "") then
resultlist_varS upplier = Replace(Request .Form("lstSuppl ier"), "'",
"''")


In this case it would be
if (Request.Form(" lstSupplier") <> "") then
resultlist_varS upplier = 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
3161
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 Plus but it doesn't work. Maybe I was doing something wrong. Any suggestions would be greatly appreciated... Thanks in advance
0
3259
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 at the cost of several seconds. i was hoping someone could give me pointers on how to optimize it. perhaps, i should break it down into smaller SPs, or create additional indices on the source table, etc. thank you in advance for your help!
9
3715
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 LocalConn.Open sConnStringSO (SQL Server 2000, irrelevant what it is, see below). LocalConn.Errors.Clear
16
3055
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 certificate at the end of the year. I have the code working fine, except for the fact that when I want to restrict the entries to awards between certain dates, even though I can use the restriction in the query that shows the actual records, when the...
8
13204
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 shows all records, rather than going to the one I want. If I look at the form in design view, it shows 'SearchAssignmentID=1' (without quotes) as the filter in the properties list. frmSearchAssignments is bound to a query qrySearchAssignments....
4
3798
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 the where clause of a sql string to send to SQL 2000 for a data set. Currenly I check each control with an IF statement to determine if something is filled in. If there is I begin building the where clause. Below is what I have done (and it...
10
5551
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
18161
by: Miroslaw Makowiecki | last post by:
Where can I download Comeau compiler as a trial version? Thanks in advice.
2
5128
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 want to also filter the options by date selections or not if they wish. I added to unbound text fields to input the start and end dates and inserted them into my str Where code. It was working fine until the these were added.
0
8379
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8294
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8494
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8596
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.