PDA

Click to See Complete Forum and Search --> : Check if connection is open?


Kings
Apr 9th, 2002, 11:37 AM
How can I check if I have a connection open (to my DB)?

In classic ASP, I used this

If objRS.State <> "0" Then objRS.Close


What can I use in ASP.NET?
This doesn't work;

Dim objDataReader as OleDbDataReader

'now this doesn;t work
If objDataReader.State <> "0" Then objDataReader.Close()


Anyone has an idea?

Thanks

Kings
Apr 9th, 2002, 12:32 PM
nevermind, someone else already answered this.