>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