G
Guest
I am trying to access some Fox Pro tables but for some table I get an
odbcException: NO_DATA
Some tables work and others don’t, anyone have any ideas?
Any help will be much appreciated.
Thanks in advance.
Chris.
Rather than include my applications actual code I have put some sample code
together. The code below lives in a button click handler. The ODBC driver is
6.01.8629.01
Dim odbcConn As New OdbcConnection
odbcConn.ConnectionString = "DSN=OperaII"
odbcConn.Open()
Dim strSQL As String = "SELECT * FROM Z_CNAME"
Dim odbcAdapter As New OdbcDataAdapter(strSQL, odbcConn)
Dim dt As New DataTable
Try
odbcAdapter.Fill(dt)
DataGrid1.DataSource = dt
Catch ex As Exception
MsgBox(ex.ToString)
End Try
If Not odbcConn Is Nothing Then
If odbcConn.State = ConnectionState.Open Then odbcConn.Close()
odbcConn.Dispose()
End If
odbcConn = Nothing
odbcException: NO_DATA
Some tables work and others don’t, anyone have any ideas?
Any help will be much appreciated.
Thanks in advance.
Chris.
Rather than include my applications actual code I have put some sample code
together. The code below lives in a button click handler. The ODBC driver is
6.01.8629.01
Dim odbcConn As New OdbcConnection
odbcConn.ConnectionString = "DSN=OperaII"
odbcConn.Open()
Dim strSQL As String = "SELECT * FROM Z_CNAME"
Dim odbcAdapter As New OdbcDataAdapter(strSQL, odbcConn)
Dim dt As New DataTable
Try
odbcAdapter.Fill(dt)
DataGrid1.DataSource = dt
Catch ex As Exception
MsgBox(ex.ToString)
End Try
If Not odbcConn Is Nothing Then
If odbcConn.State = ConnectionState.Open Then odbcConn.Close()
odbcConn.Dispose()
End If
odbcConn = Nothing