[DB-SIG] Creating Visual FoxPro tables using ODBC

M.-A. Lemburg mal@lemburg.com
Thu, 02 Jan 2003 18:18:05 +0100


Bob Gailer wrote:
> I'm accessing Visual FoxPro tables from a Python program using ODBC. I 
> tried cursor.execute('select blah from blah into table foo') but no 
> table foo gets created. Is there a way to do this other than a series of 
> inserts? If I have to use inserts, is there a way to create the empty 
> table thru ODBC?

You create tables with "CREATE TABLE xyz (...schema...)". Inserts
can then be done using "INSERT ... FROM othertable" with some
databases.

You should probably also check whether using a VIEW wouldn't
be better in your case.
  --
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/