473,466 Members | 1,367 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Fox Pro and odbcException: NO_DATA

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
Nov 21 '05 #1
2 1209
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.
"Chris Podmore" wrote:
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

Nov 21 '05 #2
Hi Chris,

Have you considered using the Visual FoxPro OLE DB data provider? It's
downloadable from
http://msdn.microsoft.com/vfoxpro/do...s/default.aspx and works
with all versions of FoxPro tables.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
ci**************@msn.com www.cindywinegarden.com
"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
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.

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?

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kenneth Foli Jørgensen | last post by:
------=_NextPart_000_000D_01C35CF0.20AC1200 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable i get this msg: Microsoft.Data.Odbc.OdbcException:...
1
by: Frank Rizzo | last post by:
I have an app that has to connect to various data sources (ms sql server, sybase, etc...). For this reason I have OdbcConnection, OleDb Connection and SqlClient objects. When an error happens, I...
2
by: Chuck Ritzke | last post by:
Hi all, I am getting an intermittant error after uploading a project from my development machine. I click on a link which opens an aspx page that, upon page load, reads a very small amount of...
0
by: Sharon | last post by:
I have a problem using with dbf file here. I have tried the code below using VB.NET with no errors. However, I use the exact same code in ASP NET, it prompt me error when I tried to insert a...
3
by: Krish | last post by:
Hi, The sql returns value since i select primary key (cannot be null), but when i try to bind with combo box i get following error.. i cant see data. Iam using ODBC connection from asp.net to...
0
by: Krish | last post by:
Hi, The sql returns value since i select primary key (cannot be null), but when i try to bind with combo box i get following error.. i cant see data. Iam using ODBC connection from asp.net to...
3
by: fructose | last post by:
Thanks for help on my first post about the glossary entries guys. I've run into a bigger problem on the same topic though. (Forget anything I said in the last post, this is a separate point). OK,...
7
by: Ben Finney | last post by:
Howdy all, Ned Batchelder blogged about a debate over checking function parameters, and to what extent dynamic typing should be relied upon. I was one of many who commented, but I wrote what...
6
by: satish mullapudi | last post by:
Hi All, I am getting strange situation. These r the steps I have followed: 1. Created an EMPLOYEE table with around 14 fields & 688038 records. (so a large table indeed). 2. Tried to delete all...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.