How can I differentiate oracle error between connection error and other errers in vba.
I tried the code bellow. But not only when internet cable is disconnected but also when sql syntax error happened , the code show ORACLE CONNECTING ERROR.
Public Function TEST() As Boolean
Dim strSql As String
Dim oraDS As OraDynaset
On Error GoTo ERR
strSql = ""
strSql = " select COLUMN from TALE "
Set OraRec = New ADODB.Recordset
OraRec.Open strSql, OraCon, adOpenKeyset, adLockReadOnly
If OraCon.State <> adStateOpen Then
MsgBox "ORACLE CONNECTING ERROR"
MsgBox "ORACLE SQL SYNTAX ERROR"