DOH!
In reality, what I am doing is
Code:
Dim cn As OracleConnection = Nothing
If OpenConnection(cn) Then Exit Sub ' Fn raises error, if nec.
...
...
Private Function OpenConnection(ByRef cn As OracleConnection) As Boolean
cn = new OracleConnection()
cn.ConnectionString = "Data Source = wigga ;" & _
"User ID = " & frmLogin.txtUsrNm.Text & ";" & _
"Password = " & frmLogin.txtPW.text
try
cn.Open
Catch ex As OracleClient.OracleException
MsgBox(ex.Message & " ...", , "Error")
If cn.State <> ConnectionState.Closed Then cn.Close
Return True
Catch ex As Exception
MsgBox(ex.Message & " ... ", , "Error")
If cn.State <> ConnectionState.Closed Then cn.Close
Return True
End Try
Return False
End Function
Just thought to post fewer details.
But you are so right about the spelling... I'll try fixing that, and see what benefits derive...