473,604 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB error Expected 'Wend'

Hi
I've been trying to hand code my pages, after failing in a WSYWYG editor and
giving up.
I'm almost done with the page checking, it's just i'm having a Wend error
Microsoft VBScript compilation error '800a03fa'

Expected 'Wend'

/listing.asp, line 269

on my page, www.tripak.me.uk/listing.asp

I've attached the code at www.tripak.me.uk/listing.txt

I believe that Originally when i used the WSYWYG I created two seperate
recordsets, and the two endings were

<%
rsListing.Close ()
Set rsListing = Nothing
%>
<%
rsTextspec.Clos e()
Set rsTextspec = Nothing
%>

Now i tried deleting the rsTextspec one but i still get an error with the
rsListing one, which is the only recordset i have left.

Am i supposed to delete this? and close it up ealier? (line 210) and how?

I hope somone can help me.

Raphael

Jul 19 '05 #1
7 9160
These are the most aggravating problems. It could be anything from: you
forgot to put a Wend in there, to: you've got an extra "end if" in your
loop, to: you used Next or Loop instead of Wend. Proper formatting of your
code (indenting, etc.) can help you find these issues.

On another note: While...Wend has been deprecated and may not be supported
in a future version of vbscript. You should switch to using Do Until ...
Loop or Do ... Loop Until.

HTH,
Bob Barrows

Raphael Gluck wrote:
Hi
I've been trying to hand code my pages, after failing in a WSYWYG
editor and giving up.
I'm almost done with the page checking, it's just i'm having a Wend
error
Microsoft VBScript compilation error '800a03fa'

Expected 'Wend'

/listing.asp, line 269

on my page, www.tripak.me.uk/listing.asp

I've attached the code at www.tripak.me.uk/listing.txt

I believe that Originally when i used the WSYWYG I created two
seperate recordsets, and the two endings were

<%
rsListing.Close ()
Set rsListing = Nothing
%>
<%
rsTextspec.Clos e()
Set rsTextspec = Nothing
%>

Now i tried deleting the rsTextspec one but i still get an error with
the rsListing one, which is the only recordset i have left.

Am i supposed to delete this? and close it up ealier? (line 210) and
how?

I hope somone can help me.

Raphael


Jul 19 '05 #2
You have a WHILE (start of a loop) without a WEND(end of a loop)
<%
if blnHasTextSpec = true then
While ((Repeat1__numR ows <> 0) AND (NOT rsListing.EOF))
%>
<tr><td><a href="sublistin g.asp?Item_ID=< %=rsListing("It em_ID") %>"> <%
rsListing("Text _Spec")%> </a> </td>
<% if rsListing("lrg_ img") > "" then %>
<td><% =rsListing("lrg _img") %> </td>
<% end if %>
<% if rsListing("Item _ID") > "" then %>
<td colspan="2"><% rsListing("Item _ID") %> </td>
<% end if %>
<% if rsListing("Spec ific_imagesm") > "" then %>
<td colspan="2"><% rsListing("Spec ific_imagesm") %> </td>
<%WEND 'ADD THIS%>
<% end if %>

"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:Oq******** ******@tk2msftn gp13.phx.gbl...
Hi
I've been trying to hand code my pages, after failing in a WSYWYG editor and giving up.
I'm almost done with the page checking, it's just i'm having a Wend error
Microsoft VBScript compilation error '800a03fa'

Expected 'Wend'

/listing.asp, line 269

on my page, www.tripak.me.uk/listing.asp

I've attached the code at www.tripak.me.uk/listing.txt

I believe that Originally when i used the WSYWYG I created two seperate
recordsets, and the two endings were

<%
rsListing.Close ()
Set rsListing = Nothing
%>
<%
rsTextspec.Clos e()
Set rsTextspec = Nothing
%>

Now i tried deleting the rsTextspec one but i still get an error with the
rsListing one, which is the only recordset i have left.

Am i supposed to delete this? and close it up ealier? (line 210) and how?

I hope somone can help me.

Raphael

Jul 19 '05 #3
Thanks for that
Just a little question,
I paste the following line in

<%WEND 'ADD THIS%>

I tried that and i'm still getting an error
Expected statement

/listing.asp, line 181

WEND 'ADD THIS
I'm obviously supposed to insert something, but what?I'm not sure what wends
are, and how to close themExcuse my IgnoranceRaphae l
Jul 19 '05 #4
Here ya go... everything you need for vbscript and asp.

http://www.w3schools.com/vbscript/default.asp
http://www.devguru.com/Technologies/...ipt_intro.html
http://www.fuzzysoftware.com/default...25&parentID=13

~Brad

"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:eD******** ******@TK2MSFTN GP10.phx.gbl...
Thanks for that
Just a little question,
I paste the following line in

<%WEND 'ADD THIS%>

I tried that and i'm still getting an error
Expected statement

/listing.asp, line 181

WEND 'ADD THIS
I'm obviously supposed to insert something, but what?I'm not sure what wends are, and how to close themExcuse my IgnoranceRaphae l

Jul 19 '05 #5
Remove that line I told you to add, I took a look, and that's not where it
should be.

Put it back in further down

I STRONGLY recommend you get rid of dreamweaver until you know what's going
on. This code is a nightmare to try and decipher.
if blnHasTextSpec = true then
While ((Repeat1__numR ows <> 0) AND (NOT rsListing.EOF))
%>
<tr><td><a href="sublistin g.asp?Item_ID=< %=rsListing("It em_ID") %>"> <%
rsListing("Text _Spec")%> </a> </td>
<% if rsListing("lrg_ img") > "" then %>
<td><% =rsListing("lrg _img") %> </td>
<% end if %>
<% if rsListing("Item _ID") > "" then %>
<td colspan="2"><% rsListing("Item _ID") %> </td>
<% end if %>
<% if rsListing("Spec ific_imagesm") > "" then %>
<td colspan="2"><% rsListing("Spec ific_imagesm") %> </td>

<% end if %>

</tr>
<%
Repeat1__index= Repeat1__index+ 1
Repeat1__numRow s=Repeat1__numR ows-1
rsListing.MoveN ext()
Wend
else
While ((Repeat1__numR ows <> 0) AND (NOT rsListing.EOF))
%>
<tr>
<% if rsListing("Inve ntory_ID") > "" then %>
<td><% rsListing("Inve ntory_ID") %> </td>
<% end if %>
<% if rslisting("prod uct_name") > "" then %>
<td><% rsListing("Prod uct_Name") %></td>
<% end if %>
<% if rsListing("Desc rMetric") > "" then %>
<td><% rsListing("Desc rMetric") %></td>
<% end if %>
<% if rsListing("Colo r") > "" then %>
<td><% rsListing("Colo r") %></td>
<% end if %>
<% if rsListing("grad es") > "" then %>
<td><% rsListing("Grad es") %></td>
<% end if %>
<% if rsListing("word s") > "" then %>
<td><% rsListing("word s") %></td>
<% end if %>
</tr>
<% rsListing.MoveN ext 'ADD THIS%>
<%WEND 'ADD THIS%>
</table>

"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:eD******** ******@TK2MSFTN GP10.phx.gbl...
Thanks for that
Just a little question,
I paste the following line in

<%WEND 'ADD THIS%>

I tried that and i'm still getting an error
Expected statement

/listing.asp, line 181

WEND 'ADD THIS
I'm obviously supposed to insert something, but what?I'm not sure what wends are, and how to close themExcuse my IgnoranceRaphae l

Jul 19 '05 #6
That's not really an issue in IIS 5 and over anymore.

Ray at work

"Andrew J Durstewitz" <ad******@devbu ilder.org> wrote in message
news:3f******** *************@n ews.frii.net...
You might want to consider doing a

Response.Write "<td>" instead of jumping in and out of ASP with the <%
%>. It takes more on the processor to jump in and out like that.

Jul 19 '05 #7
No it doesn't.

"Andrew J Durstewitz" <ad******@devbu ilder.org> wrote in message
news:3f******** *************@n ews.frii.net...
You might want to consider doing a

Response.Write "<td>" instead of jumping in and out of ASP with the <%
%>. It takes more on the processor to jump in and out like that.

hth,
Andrew

* * * Sent via DevBuilder http://www.devbuilder.org * * *
Developer Resources for High End Developers.

Jul 19 '05 #8

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

Similar topics

1
1663
by: questionr | last post by:
There is a spell checker function which is written in VB Script. The function works well when tested seperately. But when the function is called from Java Script, the function shows an Error saying " A run time error has occured. Do you wish to debug? Line :0 , Object Expected". I just know that it is a Java Script error. Any suggestions on how to resolve this problem ? What could be the possible reasons for this error message?
7
4187
by: Ottar | last post by:
I've made a program sorting incomming mail in public folder. The function runs every minute by using the form.timer event. In Access XP it runs for weeks, no problem. Access 2003 runs the same code for 6 hours and stops. I've found the problem to be the Set MySession = CreateObject("MAPI.Session")
0
1000
by: Mamatha | last post by:
Hi i hava wrote the code to restore a file of SQL server database through ASP.It can access the backup file on server and restored but some times or in some systems it gives error like permission denide.What is the reason for that. Here is the code: <!--#Include File="Connect.inc"-->
4
3716
by: JH001A | last post by:
ACCESS 2003 VBA in the code below set.rs3, gets the error when I try using a parm for input to the where clause. If I use a number like the one comented out it works. Thanks for your help. Private Sub subBuildcredits() Dim db As DAO.Database Dim rs1 As DAO.Recordset Dim rs2 As DAO.Recordset Dim rs3 As DAO.Recordset Dim rs4 As DAO.Recordset
1
8999
by: darrel | last post by:
Hello, i need you help, can someone whats the cause of getting an error of Expected function or variable, its like this i have a function code in a module and call it on my main form.. here my code: Function DTR7() Dim rs As New ADODB.Recordset Dim cnn As New ADODB.Connection Dim x As Integer frmMain.Command2.Visible = True frmMain.Command1.Visible = False
3
1355
by: sibajisabat | last post by:
i am doing a vb project, i am getting error code 3021, when click doc1, this error occures, code below Private Sub cmdDoc1_Due_Click() Dim sysd As Date sysd = Format(Date, "dd-MMM-yy") Dim Row_Var As Integer Dim VhclNo As String Dim date1, strQueryDoc1Chk, strRecordFind, strQuerySM As String Dim rsDoc1Chk As New ADODB.Recordset
1
3803
by: morrisqueto | last post by:
Hello, One of my websites just started sending a new rare error. The site has been working for almost 2 years without trouble, but today morning started giving away this error in all my views. Microsoft VBScript runtime error '800a01fb' An exception occurred: 'MoveNext' /test.asp, line 544 Here is the code:
1
5143
by: kieran04 | last post by:
every time i run this program in VBE i keep getting the message 'Compile Error: expected array' for the two bold lines underneath, please help? Public Function KnotsToKmPerHr(knots As Double) As Double Dim Km As Double KNOTS_TO_KM = 1.852 Km = knots * KNOTS_TO_KM KnotsToKmPerHr = Km
0
1509
by: ppletkov | last post by:
Hi - I apologize if this is a simple question in advance :-) (hopefully it is so its quickly resolved!) i'm trying to figure out why i keep getting an error (Compile Error : expected function or variable) for my .find method. I have checked the format of this statement and it appears correct...? Dim ItemNumberWLO As String Dim ItemNumberWLN As String While Not WLO.EOF
0
7997
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
8406
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8065
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
8274
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
6737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3906
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
3954
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2433
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
1
1522
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.