|
-
Mar 21st, 2001, 11:07 PM
#1
Thread Starter
New Member
I have an ASP Page with a function that goes like this :
<%Public Sub Populate_Array()
Dim con
Dim rst
Dim StrSql
Set con = Server.CreateObject("ADODB.Connection")
Set rst = Server.CreateObject("ADODB.RecordSet")
con.Provider = "Microsoft.Jet.OLEDB.3.51"
con.Open "C:\Inetpub\wwwroot\db\information.mdb"
StrSql = "Select * From TeamNhl Order By TeamNhlName"
rst.Open StrSql,con,adOpenStatic
session("ArrayTeamNhl")=rst.GetRows
rst.close
con.Close
End Sub%>
How can i CALL that function from another page ??
-
Mar 22nd, 2001, 04:26 AM
#2
Place this function in a include file and place the include line on you page where
you want to use this function.
Example: myfunction.inc
And place this line on your page where you want to use the function.
Code:
<!-- #INCLUDE FILE="myfunction.inc"-->
Now you can call the function in your page.
-
Mar 22nd, 2001, 09:59 AM
#3
Lively Member
Name the above file as say test.asp and then in the other asp include this pice of code.
_____________________________________________
Server.Execute "test.asp"
_____________________________________________
Sonia
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|