0

I mainly want to use advantage to be able to access Fox tables larger than 2 gig. My programs are simple and are run from the command window. I have Adv Data Archetect installed and have the ODBC driver installed.
I'm not very knowledgeable with connections, etc. Can someone explain to me, provide a link or provide the code that I would need to be able to use and create 2 gig + tables. Thanks

Jens Mühlenhoff
  • 14,565
  • 6
  • 56
  • 113
KEV KNOX
  • 1
  • 1
  • I'm using Visual Foxpro 9. I'm trying this – KEV KNOX Jul 05 '12 at 18:56
  • x="Driver=Advantage StreamlineSQL ODBC; DataDirectory=C:\Data ; DefaultType=Visual FoxPro;" – KEV KNOX Jul 05 '12 at 18:56
  • but I'm missing something I guess. I've also uninstalled the ODBC driver at this point, thinking I didn't need it. – KEV KNOX Jul 05 '12 at 18:58
  • Sorry I didn't that well. I'm trying this on the Foxpro command line....... m_x="Driver=Advantage StreamlineSQL ODBC; DataDirectory=C:\Data ;DefaultType=Visual FoxPro;" !m_x – KEV KNOX Jul 05 '12 at 19:00
  • I put the odbc driver back. I can go into ADA and change a record and see the change in the file from the foxpro command line. I can't open a fox file over 2 gig but i can in ADA. The question now is, is it even possible to open a file over 2 gig in VFP? I thought by using ADA it would allow me to open a 2 gig+ file in VFP. – KEV KNOX Jul 05 '12 at 21:09
  • 1
    It should work fine. If you go through ODBC, FoxPro doesn't "care" about the file size. You might want to edit your question and try to clarify exactly what you are doing and what error you are getting. It seems a bit vague to me at this point. – Mark Wilkins Jul 05 '12 at 22:27
  • What exact error message do you get if you try to access the table though the ADS ODBC driver? – Jens Mühlenhoff Jul 06 '12 at 11:38
  • Thanks for giving me confirmation that I can use files in VFP that are over the 2 gig limit. The error message I get when I try to open a file over 2 gig is "not a database file". I will post the exact message in a few minutes. – KEV KNOX Jul 06 '12 at 13:23
  • Here's the story. I open a vfp file that's close to the 2 gig limit in ADA and add some records to it and close the file in ADA. I then try and open it on the command line in VFP I get a message that it's not a table. Yet before I added the records to it in ADA I was able to open the file on the command line in VFP. To restate, at this point I have the odbc driver installed. I'm close, I guess, I just can't get this part to work. – KEV KNOX Jul 06 '12 at 13:36
  • I wonder if it's the way that I'm trying to open the file in VFP. I'm trying to open it with the USE command. Can this be done or do I need to use other commands? – KEV KNOX Jul 06 '12 at 13:53
  • Now I've found that in the April 2008 issue of FoxRockX that I can't access files greater that 2 gig in Fox. The qoute is,"Of course if your DBF becomes larger than 2 GB, you'll only be able to access it through ADS since VFP will see it as invalid." Can anyone verify this? – KEV KNOX Jul 06 '12 at 15:15

1 Answers1

2

I cannot tell from the OP what you have actually done, but it sounds like you are expecting to be able to use an ODBC driver with an existing Visual FoxPro application without changing the application from the direct table access. That is not possible.

Here is a link to a screencast showing an example of using ODBC to get to a table that is over the 2GB limit. If I recall correctly, it shows how to use views to access the data; doing it that way can minimize the number of changes you need to make. More information about remote views can be found here.

You can also use ODBC "directly" with SQL pass through statements. It is also possible to use OLE DB with cursor adapters if you prefer that over ODBC.

Mark Wilkins
  • 40,729
  • 5
  • 57
  • 110