I'm using an ODBC connection to connect to a SyBase Table. I connect to the DB ok, but It wont let me run a query. I get this error message on the line: objDR = cmd.ExecuteReader
Value of type 'Microsoft.Data.Odbc.OdbcDataReader' cannot be converted to 'System.Data.OleDb.OleDbDataReader'.
VB Code:
Dim cn As OdbcConnection cn = New OdbcConnection("DSN=SBPROD;Server=SYBASE;DB=fmsprod;Password=test;User ID=test") Dim cmd As New OdbcCommand(sqlcmd) Try cn.Open() objDR = cmd.ExecuteReader If objDR.Read = True Then gerror_flag = True Else gerror_flag = False End If cn.Close() Catch ex As Exception MsgBox(Err.Description) End Try
All I'm trying to do is see if any records are being retured...just a EOF test.
