473,795 Members | 3,081 Online
Bytes | Software Development & Data Engineering Community
+ 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.Connec tionString = "DSN=OperaI I"
odbcConn.Open()
Dim strSQL As String = "SELECT * FROM Z_CNAME"
Dim odbcAdapter As New OdbcDataAdapter (strSQL, odbcConn)
Dim dt As New DataTable

Try
odbcAdapter.Fil l(dt)
DataGrid1.DataS ource = dt
Catch ex As Exception
MsgBox(ex.ToStr ing)
End Try

If Not odbcConn Is Nothing Then
If odbcConn.State = ConnectionState .Open Then odbcConn.Close( )
odbcConn.Dispos e()
End If
odbcConn = Nothing
Nov 21 '05 #1
2 1229
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.Connec tionString = "DSN=OperaI I"
odbcConn.Open()
Dim strSQL As String = "SELECT * FROM Z_CNAME"
Dim odbcAdapter As New OdbcDataAdapter (strSQL, odbcConn)
Dim dt As New DataTable

Try
odbcAdapter.Fil l(dt)
DataGrid1.DataS ource = dt
Catch ex As Exception
MsgBox(ex.ToStr ing)
End Try

If Not odbcConn Is Nothing Then
If odbcConn.State = ConnectionState .Open Then odbcConn.Close( )
odbcConn.Dispos e()
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**********@d iscussions.micr osoft.com> wrote in message
news:5C******** *************** ***********@mic rosoft.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
786
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: NO_DATA - no error information = available at Microsoft.Data.Odbc.OdbcConnection.HandleError(IntPtr hHandle, = SQL_HANDLE hType, RETCODE retcode)
1
1987
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 want a single procedure to handle the error from all the connection types by passing the either the SqlException, OdbcException or OleDbException. Unfortunately the object SystemException, that these exceptions have been derived from, does not...
2
2288
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 data from an MS Access database, using ODBC and a stored query. There is no problem on my development machine. On the production server though, I get the intermittant error shown below. If I click back and forth between the problem page and the...
0
1857
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 record. The error Detail : ERROR Operation must use an updateable query. Description: An unhandled exception occurred during the execution of the
3
1368
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 talk to DB2 database. Any help gurus System.Data.Odbc.OdbcException: NO_DATA - no error information available Thanks, Krish
0
938
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 talk to DB2 database. Any help gurus System.Data.Odbc.OdbcException: NO_DATA - no error information available OdbcDataReader ddDR2 = null; OdbcConnection cn = new OdbcConnection("DSN=TeacherCert;UID=dexkme;
3
1349
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, here's the deal: I've got a page with hundreds of technical terms on it, and I want each term to link to a glossary entry on a separate page. That would be simple, except I want the printed data of each glossary entry to be a small file which...
7
3729
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 purports to be a comprehensive checklist when considering special-case inputs for functions. I thought the best way to puncture my ego would be to post that list here and see how well it survives :-) Here goes:
6
11294
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 the rows in the table using the traditional DELETE FROM EMPLOYEE stmt. It is taking around 53 secs to delete all the records. So I have done the below steps to make it fatster: (i) Create an empty file called No_Data.DEL in the C:\ drive....
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10165
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9043
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
4113
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 we have to send another system
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.