Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to run an sql script file?
Message
 
À
19/05/2001 20:28:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00509146
Message ID:
00509193
Vues:
20
VFP's version of sql is not ANSI 92 compliant, so the first thing you will have to do is change some of the syntax of the sql statments, to let me match vfp sql syntax.
ie. the ; is not used the same in vfp as it is in sql.

that being said, and I now that you are complete making the nessary changes, to your sql statments, which are in a text file.

this is how you could execute them.

m_cmd =filetostr("sqlstatment.txt")

&m_cmd


I would first try it with a smaller sql statment, to get the syntax bugs worked out.

Bob Lee

I belive Alex post is assuming that you want to send the sql statments to a sql server of some sort, not performing the sql statments on vfp native tables.

Bob Lee


>Hi all,
>
>I was wandering if I can run an sql script file into VFP. I have an sql script file for to create a database, (create table.......,etc.). Sql statements in the file are SQL ANSI-92 compliant. Is there any way for to do that???
>
>Any ideas will be useful.
>
>
>Thanks.
In the beginning, there was a command prompt, and all was well.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform