[DB-SIG] dbf files and compact indices

Carl Karsten carl at personnelware.com
Sun Sep 19 06:36:54 CEST 2010

On Sat, Sep 18, 2010 at 11:23 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> Vernon Cole wrote:
>> Ethan:
>> I cannot see where you mentioned your operating system, I am assuming
>> Windows.
>> Perhaps you have already investigated this ... I have no way to test it
>> ... but you might try:
>> ADO can access almost any data source, and a quick look seems to show that
>> .dbf is supported using the JET driver or a FoxPro driver.
>> 1) upload pywin32
>> 2) import adodbapi
>> 3) find an appropriate connection string for your data source
>> http://connectionstrings.com suggests that perhaps:
>> Driver={Microsoft Visual FoxPro
>> Driver};SourceType=DBF;SourceDB=c:\myvfpdbfolder;Exclusive=No;
>> may be a good sample to start with -- there are other variations, check
>> their site.
>> 4) do your data input/output using standard Python db-api calls.
>> see python\lib\site-packages\adodbapi\test\ for usage examples
>> You can get pywin32 from http://sourceforge.net/projects/pywin32
> Thanks for the suggestion, but I don't want to be tied to Foxpro, which
> means I need to be able to parse these files directly.  I have the dbf
> files, now I need the idx and cdx files.

What do you mean "tied" ?

Carl K

More information about the Python-list mailing list