Fox Pro and odbcException: NO_DATA

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
 
G

Guest

OK I think I have established what the problem is. If the Fox table contains
a memo field then I can't do SELECT *. If I SELECT field1, field2, field3 but
not the memos then it works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top