473,387 Members | 3,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Accessing Foxpro Database

I am accessing an existing Foxpro database, of which I have no control
over. I have been successful in accessing all the tables except for
one. This one table I can access the first 9 fields in the table, but
VB.NET will not see any fields past the first nine. I have discovered
that the problem is the 10th field name begins with a 1. I was able to
create a copy of this table, rename the field and can successfully
access it. The problem is that I need to be able to access this table
in its current form.

I am using the OleDBConnection using Provider=VFPOLEDB.1.

Any help would be very much appreciated.

Thanks,

Apr 24 '06 #1
14 2373
BK
Without knowing any further details.... have you tried the AS clause in
your SELECT statement? For example:

SELECT *, 1ThisColumnBlowsUp AS ThisNowWorks FROM Foo

Not sure if this will relieve your situation, but it may be worth
trying.

Apr 24 '06 #2
Hi John,

I find it very curious that a "FoxPro" table has a column that begins with
something other than the allowed underscore or alpha characters. I can think
of three possibilities as to how this happened - it's either a DBF created
by something other than FoxPro, or it was created as an Excel spreadsheet
and saved as a DBF, or, after it was created someone changed a column name
using notepad or a Hex editor. I tried making this type of change using
Notepad and when I opened the resulting table I saw only the first column; a
situation similar to what you're seeing.

I'd contact the person who "owns" the table and ask some questions.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
ci**************@msn.com www.cindywinegarden.com
<jo******@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.com...
I am accessing an existing Foxpro database, of which I have no control
over. I have been successful in accessing all the tables except for
one. This one table I can access the first 9 fields in the table, but
VB.NET will not see any fields past the first nine. I have discovered
that the problem is the 10th field name begins with a 1. I was able to
create a copy of this table, rename the field and can successfully
access it. The problem is that I need to be able to access this table
in its current form.

I am using the OleDBConnection using Provider=VFPOLEDB.1.

Any help would be very much appreciated.

Thanks,

Apr 24 '06 #3
Might the bracket notation help? Select [field1], [1.field2] etc

Jeff
<jo******@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.com...
I am accessing an existing Foxpro database, of which I have no control
over. I have been successful in accessing all the tables except for
one. This one table I can access the first 9 fields in the table, but
VB.NET will not see any fields past the first nine. I have discovered
that the problem is the 10th field name begins with a 1. I was able to
create a copy of this table, rename the field and can successfully
access it. The problem is that I need to be able to access this table
in its current form.

I am using the OleDBConnection using Provider=VFPOLEDB.1.

Any help would be very much appreciated.

Thanks,

Apr 24 '06 #4
Hi Jeff,

Brackets are considered string delimiters in FoxPro, so what you'd get is
columns with "field1" and "1.field2" in them. :-)

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
ci**************@msn.com www.cindywinegarden.com
"Jeff Dillon" <je********@hotmail.com> wrote in message
news:eo****************@TK2MSFTNGP05.phx.gbl...
Might the bracket notation help? Select [field1], [1.field2] etc

Apr 24 '06 #5
I thank you all for your responses, but unfortunately alias don't work,
and fields seem almost invisible. I do SELECT *, and then do a
fieldcount and only get 9, rather than the expected 120. I could be
mistaken about the DB being FoxPro, but I have tried all diferent Data
Providers and the FoxPro one was the only one that could access it.

I have attempted to contact the creator, but it is a retail recipe
software, and I am creating a new GUI for a touchscreen. They have not
responed to me, Yet (I am still hopeful). Are there any other data
providers that might be able to overlook the fields beginning with
numbers?

Apr 25 '06 #6
As a matter of additional info, I have even tried to do an Import with
MS Access 2003, and it too will only show the first 9 fields. I have
downloaded a free DBF Viewer, and it will show all fields.

Apr 25 '06 #7
Hi John,

Basically you've got a corrupt table. If you only need this one table and
one time only I'd use the DBF Viewer to save it into another format and then
change the field name. Otherwise I'd contact the vendor to get a fresh copy
of the table.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
ci**************@msn.com www.cindywinegarden.com
"frobobbo" <jo******@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
As a matter of additional info, I have even tried to do an Import with
MS Access 2003, and it too will only show the first 9 fields. I have
downloaded a free DBF Viewer, and it will show all fields.

Apr 25 '06 #8
Cindy,

Well, I don't beleive the table is corrupt, that is just what the
vendor decided to name the fields. I have installed software updates
and they are able to write successfully to the table.

I was able to convert the DB to dBaseIV and read it successfully. The
problem is that doing so would break future updates to the retail
software. My intent is to add to the functionality of the retail
software rather than replace it, therefore I need to keep the Database
in tact. Is there any way to Ignore errors or something in my
connection string?

Thanks.

Apr 25 '06 #9
Hi John,

No version of FoxPro will open a table with a field that begins with a
numeric value and see all the columns. Perhaps it is, in fact, a dBaseIV
table. If you can open it that way then I suggest you try the OLE DB
provider for Jet, specifying dBaseIV.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
ci**************@msn.com www.cindywinegarden.com
"frobobbo" <jo******@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
Cindy,

Well, I don't beleive the table is corrupt, that is just what the
vendor decided to name the fields. I have installed software updates
and they are able to write successfully to the table.

I was able to convert the DB to dBaseIV and read it successfully. The
problem is that doing so would break future updates to the retail
software. My intent is to add to the functionality of the retail
software rather than replace it, therefore I need to keep the Database
in tact. Is there any way to Ignore errors or something in my
connection string?

Thanks.

Apr 25 '06 #10
Thanks, but I can't open it with dBaseIV unless I first convert the
table, which is not the ideal situation for me. I will keep looking.

Apr 25 '06 #11
So, I guess the question now is, does anybody know if free utility to
convert from a FoxPro DB to a dBaseIV DB. I could just run a convert
on the table.

Thanks,

May 2 '06 #12
Of course before posting, you did a Google search?

FoxPro to dBaseIV conversion
"frobobbo" <jo******@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
So, I guess the question now is, does anybody know if free utility to
convert from a FoxPro DB to a dBaseIV DB. I could just run a convert
on the table.

Thanks,

May 2 '06 #13
Yes, I searched Google. Most programs go from DBaseIV to Foxpro, not
the other way around. The few that do it cost mony, I am just looking
for a quick and dirty free script.

May 3 '06 #14
Aren't we all

"frobobbo" <jo******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
Yes, I searched Google. Most programs go from DBaseIV to Foxpro, not
the other way around. The few that do it cost mony, I am just looking
for a quick and dirty free script.

May 3 '06 #15

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

Similar topics

4
by: Kimo | last post by:
Hi I develope an application in VB.Net. I want to connect to foxpro database. I use the following code Tr Dim cnn As New OleDbConnectio cnn.ConnectionString = "Provider=VFPOLEDB.1;" + "Data...
13
by: Simon Bailey | last post by:
I am a newcomer to databases and am not sure which DBMS to use. I have a very simplified knowledge of databases overall. I would very much appreciate a (simplifed) message explaining the advantages...
2
by: Salad | last post by:
OS = WinXP & Win98. Access = A97 & AXP Q1) Where can I find the VFP ODBC driver at Microsoft. I have been working developing an app in Access that will link to some DOS FoxPro tables. I...
1
by: David Sorber via AccessMonster.com | last post by:
Hello, I've got two questions. Im writing an Access 2000 database to collect data from multiple Visual Foxpro Databases, total some figures, save the data into a table for archiving purposes, and...
2
by: omchandan | last post by:
I want to access ie open/read contents or close a .dcb file through API.Is there any api available to accomplise this task. The current way followed by me is to change .dcb file to a csv file and...
12
by: Alex S | last post by:
Hello everyone, My company uses a FoxPro database right now as an interface and a database. For our situation, I have come to the conclusion that it would be a better choice for us to move to an...
5
by: John | last post by:
I have an ASP.NET 2.0 application developed in VB.net, that accesses an Microsoft Access database. When the database is on the same IIS server all works just fine. BUT when it tried to access the...
19
by: cj | last post by:
I'm getting terrible response times trying to pull data from VFP tables using .net--like 2 minutes! Can someone help? f:\arcust01 currently contains 187,728 records and is indexed on CUSTNO...
3
by: HistoricVFP | last post by:
Hello, I’ve been given the task of importing .dbf files from a very old version of Visual FoxPro (version 2.1) into Access (2003). When I import the data straight to Access it errors with: ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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...

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.