|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Accessing Foxpro DatabaseI 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, 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. 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. -- Show quoteHide quoteCindy Winegarden MCSD, Microsoft Visual FoxPro MVP cindy_winegar***@msn.com www.cindywinegarden.com <johns***@gmail.com> wrote in message news:1145898008.221558.294370@y43g2000cwc.googlegroups.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, > Might the bracket notation help? Select [field1], [1.field2] etc
Jeff <johns***@gmail.com> wrote in message Show quoteHide quote news:1145898008.221558.294370@y43g2000cwc.googlegroups.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, > Hi Jeff,
Brackets are considered string delimiters in FoxPro, so what you'd get is columns with "field1" and "1.field2" in them. :-) -- Show quoteHide quoteCindy Winegarden MCSD, Microsoft Visual FoxPro MVP cindy_winegar***@msn.com www.cindywinegarden.com "Jeff Dillon" <jeffdil***@hotmail.com> wrote in message news:eoo3EG%23ZGHA.4248@TK2MSFTNGP05.phx.gbl... > Might the bracket notation help? Select [field1], [1.field2] etc 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? 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. 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. -- Show quoteHide quoteCindy Winegarden MCSD, Microsoft Visual FoxPro MVP cindy_winegar***@msn.com www.cindywinegarden.com "frobobbo" <johns***@gmail.com> wrote in message news:1145974324.776517.239240@g10g2000cwb.googlegroups.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. > 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. 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. -- Show quoteHide quoteCindy Winegarden MCSD, Microsoft Visual FoxPro MVP cindy_winegar***@msn.com www.cindywinegarden.com "frobobbo" <johns***@gmail.com> wrote in message news:1145979564.911138.273650@j33g2000cwa.googlegroups.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. > 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. 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, Of course before posting, you did a Google search?
FoxPro to dBaseIV conversion Show quoteHide quote "frobobbo" <johns***@gmail.com> wrote in message news:1146595004.905764.309180@g10g2000cwb.googlegroups.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, > 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. Aren't we all
Show quoteHide quote "frobobbo" <johns***@gmail.com> wrote in message news:1146667934.460915.154030@j73g2000cwa.googlegroups.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. >
Make font Bold
Register DLL for COM interop vb.net 2005 - how to populate a listbox i need Code Generator... Performance testing tools for VB.NET application wav files in programs A couple of easy datagrid questions COM reference (X) as Interop.X Sql query..... Sum of another aggragate function DEALING WITH NULL QUERY RESULTS |
|||||||||||||||||||||||