Hello,
When connecting to a Sybase ASE database via ODBC using the code below, I'll occasionally get a '[IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed' error.
Can this be caused by my code? I read here that I should be using the 'With' statement instead, but I don't understand how that would affect this.
Thanks in advance!
Try
odsConn.Open()
Dim acctCheckString As String = sB.ToString
Dim odsCmd As New OdbcCommand(acctCheckString, odsConn)
odsRtrn = CStr(odsCmd.ExecuteScalar).TrimEnd
Catch ex As Exception
odsRtrn = ex.Message.ToUpper
odsRtrn = CheckError(odsRtrn)
Finally
odsConn.Close()
End Try