Subject | Re: ISQL -i usage Expected End of Statement, encountered EOF |
---|---|
Author | Bill Oliver |
Post date | 2004-07-26T14:46:38Z |
The CR/LF was getting me.
Thanks!
-b
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
Thanks!
-b
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 02:09 PM 26/07/2004 +0000, you wrote:it
> >This should be a simple thing to resolve, but I just can't figure
> >out. :)legal SQL
> >
> >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
> statements. (isql is slightly tolerant of ISQL commands itencounters: it
> will just ignore them; but it doesn't know what to do with aWindows 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