SunQuest
           ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 21st, 2003, 09:44 AM
rayjava rayjava is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 21 rayjava User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
asp

I have an asp file that houses a few subs,
these subs are called from another asp page.

this is the sub that pulls the categories out of the database and displays them on the main page, this code was working and now when it is called from the main page via 'call getCategories()'
I get an error that says 'expected end' I don't understand why

any help ?



<%
sub getCategories()
Dim RS
Dim SQLStmt
'set ID=Request.queryString("ID")
call openConn()
SQLStmt = SQLStmt &"SELECT CATEGORYID,CATEGORYNAME,CATEGORYDETAILS "
SQLStmt = SQLStmt & "FROM tbl_CATEGORIES"
SET RS = DBC.Execute(SQLStmt)
%>
<%Do While Not RS.EOF%>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD colSpan=2 width="100%">&nbsp;<IMG alt="" border=0
SRC="IMAGES/catpila.gif">&nbsp;<A
class=categorylinks
href="http://68.194.73.6:84/products.asp?ID=<%= RS.Fields("CATEGORYID")%>"
title="Click to view category"><B><%= RS.Fields("CATEGORYNAME")%>&nbsp;</B></A>
</TD>
</TR></TBODY></TABLE>
<%RS.MoveNext: loop%>

<%
call closeConn()
%>
<%
end sub
%>

Reply With Quote
  #2  
Old July 21st, 2003, 12:52 PM
karsh44's Avatar
karsh44 karsh44 is offline
Just another guy
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2003
Location: Wisconsin
Posts: 2,915 karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 13 h 6 m 22 sec
Reputation Power: 76
First, you need to use more descriptive titles for your posts. "asp" doesn't help anyone tell what your problem is, so they will tend to skip it.
Next, what is the exact error? does it tell you what line and such its on? You're sure the error is in this sub, not some part of the main page, or one of the other subs you call from inside this one? More error information makes it easier to troubleshoot code. I find it hard to just find little errors by looking at a snippet of code, so if I'm going to help, please try to give a bit more information (or wait and see if another asp 'guru' can help)

Reply With Quote
  #3  
Old July 21st, 2003, 01:09 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,711 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 21 m 59 sec
Reputation Power: 688
<%RS.MoveNext: loop%>

Turn this in to 2 lines.
<%RS.MoveNext
loop %>

Reply With Quote
  #4  
Old July 22nd, 2003, 09:11 AM
karsh44's Avatar
karsh44 karsh44 is offline
Just another guy
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2003
Location: Wisconsin
Posts: 2,915 karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 13 h 6 m 22 sec
Reputation Power: 76
Bah, can't believe I missed that.
Still, my previous comments about more descriptive subject and including more information about errors stands. DougG won't always be around to bail you out.
__________________
--Dave--

U2kgSG9jIExlZ2VyZSBTY2lzLCBOaW1pdW0gRXJ1ZGl0aW9uaXMgSGFiZXM=

Reply With Quote
  #5  
Old July 22nd, 2003, 03:19 PM
rayjava rayjava is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 21 rayjava User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i did that but it still doesn't work

Reply With Quote
  #6  
Old July 23rd, 2003, 11:10 AM
karsh44's Avatar
karsh44 karsh44 is offline
Just another guy
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2003
Location: Wisconsin
Posts: 2,915 karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 13 h 6 m 22 sec
Reputation Power: 76
Does it throw the same error, or a different one? Post the precise error please, just saying "it still doesn't work" is not descriptive.
Also, as I mentioned before, have you checked to be sure that the problem is in this sub, not one of the other subs that is called from this one?

Reply With Quote
  #7  
Old July 23rd, 2003, 03:25 PM
rayjava rayjava is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 21 rayjava User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
it seems as though any time I call a sub from the main page I receive this error:

Microsoft VBScript compilation error '800a03f6'
Expected 'End'
/fs.asp, line 587

line 587 is the line (in the main page) that calls
the sub. like this [call getCategories()] nothing
else on the line, so I am assuming it is a prob with the sub or one of the subs being called from the sub, the only thing is I am pretty sure that the subs are correct, I can give the files to you if you wouldn't mind.

Reply With Quote
  #8  
Old July 23rd, 2003, 08:38 PM
karsh44's Avatar
karsh44 karsh44 is offline
Just another guy
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2003
Location: Wisconsin
Posts: 2,915 karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level)karsh44 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 13 h 6 m 22 sec
Reputation Power: 76
Post the openConn() and closeConn() code. That error indicates you're missing an 'End If' statement somewhere, but may also be because you don't have a current enough version of vb. Is this file a #include file by chance? If so, try moving the include to the top of the page. I'm just throwing out some possibilities here. Post the other code, and I'll see if that helps, or if it helps someone else figure it out

Reply With Quote
  #9  
Old July 23rd, 2003, 08:48 PM
rayjava rayjava is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 21 rayjava User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hey thanks alot for the help, I really want to learn more about web programming. I will post the code

How do I check the version of vb and/or update the version of vb if needed?

---------------------------------------------------------
Dim dbc
Dim strConn
Dim strpath

'this procedure is called wherever a connection is needed. Returns 'dbc' as active connection
sub openConn()
'use appropriate connection string
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=******;"

Set dbc = Server.CreateObject("ADODB.Connection")
dbc.open strConn
end sub

sub closeConn()
if isobject(dbc) then
if dbc.State = adStateOpen then
dbc.Close
end if
set dbc = nothing
end if
end sub

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > asp


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway