thelordoftherings
Programmer
Hello,
I have this standard code for opening an closing connection to a DB. Can someone please add this code propar error handling?
<%
Dim connection, rs
Sub createConnection()
openstr ="test"
Set connection = Server.CreateObject("ADODB.connection")
connection.Open openstr, "", ""
Set rs = Server.CreateObject("ADODB.Recordset")
End Sub
Sub closeConnection()
rs.close
connection.close
Set rs = Nothing
Set connection = Nothing
End Sub
%>
I have this standard code for opening an closing connection to a DB. Can someone please add this code propar error handling?
<%
Dim connection, rs
Sub createConnection()
openstr ="test"
Set connection = Server.CreateObject("ADODB.connection")
connection.Open openstr, "", ""
Set rs = Server.CreateObject("ADODB.Recordset")
End Sub
Sub closeConnection()
rs.close
connection.close
Set rs = Nothing
Set connection = Nothing
End Sub
%>