I want to bbuilt the following VBScript function
function ValidateRTN( sRTN )
'Connect to the fileNet library database
Set cnFN2 = Server.CreateObject("ADODB.Connection")
Set RSFN2 = CreateObject("ADODB.Recordset")
sSQL = "SELECT * from TEMP_CUBS WHERE E_NAME = " & sRTN
RSFN2.Open strSQL, cnFN2, adOpenStatic, adLockReadOnly
If ( RSFN2.EOF and RSFN2.BOF ) then
response.write "return false"
response.write "return true"
Set RSFN2 = Nothing
Set cnFN2 = Nothing
Since I'm new to this whole world of VBScript, How can I access the database within my VBScript function? How can I return a value from one vbscript fn to another vbscript function? Why can't I simply write plain sql statements like above in a vbscript function??
Any help is greatly appreciated.