473,320 Members | 1,804 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,320 software developers and data experts.

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.Close()
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 9142
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.Close()
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__numRows <> 0) AND (NOT rsListing.EOF))
%>
<tr><td><a href="sublisting.asp?Item_ID=<%=rsListing("Item_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("Specific_imagesm") > "" then %>
<td colspan="2"><% rsListing("Specific_imagesm") %> </td>
<%WEND 'ADD THIS%>
<% end if %>

"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:Oq**************@tk2msftngp13.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.Close()
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 IgnoranceRaphael
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**************@TK2MSFTNGP10.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 IgnoranceRaphael

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__numRows <> 0) AND (NOT rsListing.EOF))
%>
<tr><td><a href="sublisting.asp?Item_ID=<%=rsListing("Item_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("Specific_imagesm") > "" then %>
<td colspan="2"><% rsListing("Specific_imagesm") %> </td>

<% end if %>

</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsListing.MoveNext()
Wend
else
While ((Repeat1__numRows <> 0) AND (NOT rsListing.EOF))
%>
<tr>
<% if rsListing("Inventory_ID") > "" then %>
<td><% rsListing("Inventory_ID") %> </td>
<% end if %>
<% if rslisting("product_name") > "" then %>
<td><% rsListing("Product_Name") %></td>
<% end if %>
<% if rsListing("DescrMetric") > "" then %>
<td><% rsListing("DescrMetric") %></td>
<% end if %>
<% if rsListing("Color") > "" then %>
<td><% rsListing("Color") %></td>
<% end if %>
<% if rsListing("grades") > "" then %>
<td><% rsListing("Grades") %></td>
<% end if %>
<% if rsListing("words") > "" then %>
<td><% rsListing("words") %></td>
<% end if %>
</tr>
<% rsListing.MoveNext 'ADD THIS%>
<%WEND 'ADD THIS%>
</table>

"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:eD**************@TK2MSFTNGP10.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 IgnoranceRaphael

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

Ray at work

"Andrew J Durstewitz" <ad******@devbuilder.org> wrote in message
news:3f*********************@news.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******@devbuilder.org> wrote in message
news:3f*********************@news.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
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...
7
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...
0
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...
4
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. ...
1
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:...
3
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")...
1
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. ...
1
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...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.