Problem with my DB connection... please Help me!

simf1

New member
Joined
Feb 28, 2005
Messages
1
Programming Experience
Beginner
I'm Working with VB.net and i Use this connection function (see code below). It's working perfecly, but sometime it's to long before to have a result. Please help to optimise my code.
Best regard!
SimF1

'OpenConnection CODE(start)

Public Sub OpenConnexion()

bdConnection = New ADODB.Connection
With bdConnection
.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=sqlc0b.megasqlservers.com;DATABASE=myDBNamse;UID=userId;PWD=pswd;"

.CursorLocation = ADODB.CursorLocationEnum.adUseClient
.ConnectionTimeout = 30
On Error GoTo err_Renamed
.Open()
End With

err_Renamed:
Exit Subend sub

'OpenConnection CODE(end)
 
Back
Top