Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to run an sql script file?
Message
 
To
19/05/2001 20:28:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00509146
Message ID:
00509193
Views:
19
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform