Subject Re: [firebird-support] ISQL -i usage Expected End of Statement, encountered EOF
Author Helen Borrie
At 02:09 PM 26/07/2004 +0000, you wrote:
>This should be a simple thing to resolve, but I just can't figure it
>out. :)
>
>You should be able to use "isql -i file.sql" to run isql in batch
>mode and process the sql commands found in file.sql.
>
>However, when I try this, I get the message below:
>
>C:\fbdata>isql foo2.fdb -i t.sql
>Expected end of statement, encountered EOF
>
>What am I forgetting?
>
>Contents of t.sql:
>C:\fbdata>cat t.sql
>create table t (i integer, c char(10) );
>commit;
>exit;
>C:\fbdata>

"In batch mode" doesn't mean a series of Windows command shell
commands. It needs to be a proper SQL script, consisting of only legal SQL
statements. (isql is slightly tolerant of ISQL commands it encounters: it
will just ignore them; but it doesn't know what to do with a Windows batch
file!! )

This would be a legal script:

connect 'c:\databases\mydb.fdb' user 'sysdba' password 'masterkey';
create table t (i integer, c char(10));
commit;

NOTE~~~must end the file with a CRLF

/heLen