Re: VB : One Connection vs. Multiple Connections
Posted by: Marcel du Preez
Date: August 31, 2006 02:15PM

I've used the multiple-connection way a couple of times, as my app is in the background for the better part of the day, and accessed once or twice in between. I am trying to use the one-connection now, as I've found that it's a bit faster.

How do you control whether the connection is valid? When? I've thought of checking the connection each time before it's used to read/write data, as follows :

Public Function CheckMySqlConnection() As Boolean
'Returns True if valid, False if invalid

If DBConnection.State.ToString = "Open" Then
Return True
Else
Return False
End If

End Function

On a false response, the connection is opened again. Is this adequate?

Options: ReplyQuote


Subject
Written By
Posted
Re: VB : One Connection vs. Multiple Connections
August 31, 2006 02:15PM
August 31, 2006 04:01PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.