Subject | Re: [ib-support] Re: -- Comment |
---|---|
Author | Paul Reeves |
Post date | 2001-11-16T07:59:27Z |
"Claudio Valderrama C." wrote:
====
/*-- Create database*/
CREATE DATABASE "x:\data\ods10\controller.gdb"
USER 'SYSDBA' PASSWORD 'masterkey';
CONNECT 'x:\data\ods10\Controller.gdb' USER 'SYSDBA' PASSWORD 'masterkey';
--now drop it
drop database;
/* OK, Now let's really drop it.*/
drop database;
/* exit */
exit;
=====
'--now drop it' is definitely not parsed as a comment. A confusing error is
thrown - it counts the line number from the start of the comment, not the
start of the script.
I've done some more tests on this and as far as I can tell the '--' comment
marker only works inside SPs.
Interesting explanation about the parser problems, btw. Do you mind if I tidy
it up for an RC1 FAQ I am writing?
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further
>OK, try this:
> ""Fabrice Aeschbacher"" <fabrice.aeschbacher@...> wrote in
> message news:<9t0nc1+kpik@...>...
> >
> > If I do this, I getthe following error:
> >
> > -- INPUT TESTDATAS.SQL; /* Insert some test data */
> > Statement failed, SQLCODE =3D -104
> >
> > Dynamic SQL Error
> > -SQL error code =3D -104
> > -Unexpected end of command
>
> Fabrice, try this:
>
> /* INPUT TESTDATAS.SQL */ ;
>
> Now, tell me, what do you get? Same error message, right? There are a couple
> of problems here:
>
====
/*-- Create database*/
CREATE DATABASE "x:\data\ods10\controller.gdb"
USER 'SYSDBA' PASSWORD 'masterkey';
CONNECT 'x:\data\ods10\Controller.gdb' USER 'SYSDBA' PASSWORD 'masterkey';
--now drop it
drop database;
/* OK, Now let's really drop it.*/
drop database;
/* exit */
exit;
=====
'--now drop it' is definitely not parsed as a comment. A confusing error is
thrown - it counts the line number from the start of the comment, not the
start of the script.
I've done some more tests on this and as far as I can tell the '--' comment
marker only works inside SPs.
Interesting explanation about the parser problems, btw. Do you mind if I tidy
it up for an RC1 FAQ I am writing?
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further