I've got a file called 'functions.asp' which contains the following function:
------------------------------------------------------------
Function GetSurname()
Set rstFunctions=Server.CreateObject("ADODB.Recordset")
SQuery = "SELECT * FROM tblNames WHERE ID = " & ??
rstFunctions.Open SQuery, Application("Connection"),3 ,3
Response.Write(rstFunctions("Surname"))
Set rstFunctions = Nothing
End Function
-----------------------------------------------------------
In my main asp page I'm using:
<!--#include file="../../functions/functions.asp"-->
How do I send a variable to the function to return the surname. The ?? needs to be the variable
Any help will be much appreciated.
Cheers J
------------------------------------------------------------
Function GetSurname()
Set rstFunctions=Server.CreateObject("ADODB.Recordset")
SQuery = "SELECT * FROM tblNames WHERE ID = " & ??
rstFunctions.Open SQuery, Application("Connection"),3 ,3
Response.Write(rstFunctions("Surname"))
Set rstFunctions = Nothing
End Function
-----------------------------------------------------------
In my main asp page I'm using:
<!--#include file="../../functions/functions.asp"-->
How do I send a variable to the function to return the surname. The ?? needs to be the variable
Any help will be much appreciated.
Cheers J