Hi
I receive this error when I am trying to connect to my sql server and the odbc doesn't work. When this error occur it make my vb application crash.
I would like to know if I can put a validation in my vb application that display an error message that I created and allow my application to not crash. So make the user try again.
This is my code to allow me to connect to my odbc(when it's running).
Option Explicit
Public MyConn As Connection
Public Function OpenDb()
Dim strConnect As String
Set MyConn = New Connection
MyConn.Open "DSN=MyDSN;", "username", "password"
End Function
thanks in advance
I receive this error when I am trying to connect to my sql server and the odbc doesn't work. When this error occur it make my vb application crash.
I would like to know if I can put a validation in my vb application that display an error message that I created and allow my application to not crash. So make the user try again.
This is my code to allow me to connect to my odbc(when it's running).
Option Explicit
Public MyConn As Connection
Public Function OpenDb()
Dim strConnect As String
Set MyConn = New Connection
MyConn.Open "DSN=MyDSN;", "username", "password"
End Function
thanks in advance