Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a FoxPro Table From ASP 1

Status
Not open for further replies.

foxylady

Programmer
Jan 19, 2001
14
US
Does anyone know how to dynamically create a table(.dbf) file from ASP?

Thanks
 
Using ADO, you can use the Connection object to perform DDL operations, such as creating a table. Example VBS:

SET oConn = CreateObject("ADODB.Connection")
oConn.Open "dsn=MyDSN"
oConn.Execute "CREATE TABLE C:\Table2(Field1 c(10))"
oConn.Close
SET oConn = NOTHING

There is also ADOX - but I've never used it on VFP tables/databases.

If you using this in ASP as you mention, make sure your DSN's Fetch data in background option is disabled. If you're not using a DSN, make sure your connection string sets BackgroundFetch=No. Failing to do this can eventually crash IIS. Jon Hawkins
 
I understand that part but how do you put data in it from a recordset?
 
I am trying to create a foxpro .dbf on a client machine and put data that I already have in a recordset to that table that i just created
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top