stemitch2000
Programmer
I have a function that sets up a connection to a database.
function OpenDB
dim con
On Error Resume Next
If Not (IsObject(con)) Then
response.write "opening new connection"
Set con = Server.CreateObject("ADODB.Connection"
set session("con"
= con
strDSN = Session("strDSN"
con.Open "DSN=" & strDSN
Else
'do nadda!
End If
openDB = con
End function
when I go to call it...
set con = openDB
is this right? because it comes back with a error 424 object required
function OpenDB
dim con
On Error Resume Next
If Not (IsObject(con)) Then
response.write "opening new connection"
Set con = Server.CreateObject("ADODB.Connection"
set session("con"
strDSN = Session("strDSN"
con.Open "DSN=" & strDSN
Else
'do nadda!
End If
openDB = con
End function
when I go to call it...
set con = openDB
is this right? because it comes back with a error 424 object required