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)
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)