|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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%"> <IMG alt="" border=0 SRC="IMAGES/catpila.gif"> <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")%> </B></A> </TD> </TR></TBODY></TABLE> <%RS.MoveNext loop%> <% call closeConn() %> <% end sub %> endFile----> db.asp------------------------------------------------------ |
|
#2
|
|||
|
|||
|
Microsoft VBScript compilation error '800a03f6'
Expected 'End' /home.asp, line 587 |
|
#3
|
|||
|
|||
|
is this better?
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > asp calling functions from an include file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|