>Hello Sergey
>Thank you for your quick answer.
>Until now I found no way to put 2 commands in a batch.
>Again from sql studio i can do this with // on a empty line
>create table ...
>//
>drop table ...
>//
>commit
>
>When i try this from foxpro
>text to xyz
>create table ...
>//
>drop table ...
>//
>commit
>endtext
>
>sqlexec(connr,xyz)
>i get an error from the database: invalid end of sql statement pos nn
>nn seams to be end of first line ??
I've done this a number of times, even in VFP7 and 8. No // lines, just blank lines. Check your end-of-line markers, though - try to see what strconv(xyz, 15) shows - is there an 0D, or 0D0A at the end of each line. Maybe something's eating them.