Forum Moderators: open
im trying to functionise most of the parts of my asp report pages.
i have an include
<!--#INCLUDE FILE="functions.inc"-->
function dbConn()
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("dsn=general")
end function
function getData(qry)
Set oRS=Server.CreateObject("ADODB.recordset")
set oRS = oConn.execute(qry)
arrRows = oRS.getrows()
getData = arrRows
end function
which to me seems fine, but ...
i call dbconn first , then when i call getData, im presented with the error.
Object required: 'oConn'
i thought all vars etc were public to all, and i had to turn them private if i didnt want that so.
obviously im missing something as always.
any help much appreciated.
nat