On Aug 28, 2012, at 11:32 AM, Paul M Foster <pa...@quillandmouse.com> wrote:

> On Tue, Aug 28, 2012 at 10:46:24AM -0400, Floyd Resler wrote:
> 
>> Is there a way in PHP to get the structure of a FoxPro table (using
>> ODBC) without having to query the table?  I know I can get it by
>> getting a row from the table and using odbc_field_type but I'd rather
>> not have to query an entire table since there is no LIMIT command in
>> FoxPro.  I've looked and looked and haven't found a solution.
>> 
>> Thanks!  Floyd
> 
> FoxPro tables have a header which details the structure of the rows
> which follow it. I've never written PHP code to do what you're asking,
> but I did write a C program which will detail the header, dump the
> records, output the table as SQL and a variety of other things,
> depending on the command line switches. I generally use it *with* PHP,
> using a system() call, capture the results, and then display them on
> screen as needed. The code is on SourceForge. See:
> 
> http://noferblatz.com/dbfsak.php
> 
> If you download the code and need help, just let me know. I believe the
> command line switch you're looking for is -i, as in:
> 
> dbfsak -i mytable.dbf
> 
> Paul
> 
> -- 
> Paul M. Foster
> http://noferblatz.com
> http://quillandmouse.com

Paul,
        Thanks for the info.  Unfortunately dbfsak won't work for me since I 
don't have direct access to the ForPro dbf files.  I access them through an 
odbc-odbc bridge server.

Thanks!
Floyd

Reply via email to