Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to run an sql script file?
Message
De
21/05/2001 13:30:57
 
 
À
21/05/2001 11:03:06
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:
00509576
Vues:
17
>I want to run SQL DDL statements over a VFP database, not a ODBC database, I mean, create tables in VFP using DDL statements like create table, alter table, add column, create index etc.
>
>If I try to execute this statement in the command window:
>alter table MyTable add primary key (Field1, Field2, Field3)
>I get an error:
>Function name is missing ).
>
>I was wandering too, if I can execute a complete sql script, instead line by line. Something like Oracle instruction @c:\script.sql
>>>>>>>>>>>


I misunderstood then. In VFP you write:
alter table MyTable add primary key Field1</
That should work.

As per your other question, I don't do Oracle, but I do not think you can run a sql script. What you can do, in VFP7 is use EXECSCRIPT(cExpression [, param1, param2..]) to run a VFP script that could contain several ALTER TABLE, etc.

HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform