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, 01:31 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
asp calling functions from an include file

file------> home.asp-----------------------------------------------------


<html>
blah, blah, blah

<%
line # 587 call getCategories()
%>

endFile-----> home.asp-------------------------------------------------


file----> db.asp ---------------------------------------------------------

sub openConn()

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
%>
'///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
'// Get Categories //
'///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
<%
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
%>


endFile----> db.asp------------------------------------------------------

Reply With Quote
  #2  
Old July 21st, 2003, 01:32 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
Microsoft VBScript compilation error '800a03f6'
Expected 'End'
/home.asp, line 587

Reply With Quote
  #3  
Old July 21st, 2003, 01:33 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
is this better?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > asp calling functions from an include file


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 5 hosted by Hostway