Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Connand to create VFP table on internet
Message
 
À
28/12/1998 09:09:06
Ed Gay
Computer Software Consultants
Bangor, Maine, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00170725
Message ID:
00171316
Vues:
23
>Hi,
> I'm trying to create a VFP table on the internet using an SQL statement. I can not find the correct command for this. So far I'm able to add, change, delete records. I also can delete a table. The standard VFP command does not work using the ODBC SQL for FoxPro.

Ed,

To create a table via VFP's ODBC driver the SQL command syntax would be:

CREATE DBF TableName (FIELD1 FieldType (width [, precision]),FIELD2 FieldType (width [, precision]))

For example to create a table using VBScript:

Set ox = Server.CreateObject("ADODB.Connection")
ox.Open "your_ODBC_DSN"
Ecmd="CREATE DBF C:\your_dest_path\yourdbf (FIELD1 C(5), FIELD2 L)"
ox.Execute(Ecmd)
ox.close
set ox=nothing

Check VFP's help under CREATE TABLE SQL for more information.
Note that you must include the destination path of the DBF to be created regardless of the DSN source. The above code works with latest VFP ODBC driver configured for FREE tables. I have not tested with VFP's ODBC DBC container nor have I used VFP's odbc driver with cold fusion.

HTH,
Mike
Michael McLain
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform