Re: FoxPro Table Structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux