Subject Re: [firebird-support] Why can't I use '--' comments in the following script ?
Author Helen Borrie
>At 06:20 16/01/2005, you wrote:
> > >Hi,
> > >I am writing a program that produces scripts to create Firebird database.
> > >
> > >Can someone please tell me why I can't use the '--' comments in script 2
> > >(when I try to create a trigger for automatic CURRENT_DATE and
> CURRENT_USER
> > >values) ?
> > >
> > >A similar syntax when creating a trigger to create a generator field does
> > >work !
> > >
> > >I marked the lines with <--------.
> > >
> > >I am using the /* */ comments at the moment, but I just want to know why
> > >the '--' comments do not work.

I asked:

> >What tool are you using to run the scripts?
> >

OK, now here's a funny thing.

I copy-pasted your scripts, edited out the garbage from the isql scroll,
ran them, and got the same effects as you.

So I fiddled about with that troublesome '-- TRIGGER' comment in script 1:

1) I enclosed it in the multi-line comment markers, like so:

/*
-- TRIGGER
*/

Same errors!! uh-oh!

2) I deleted it and retyped it, so it was now

-- TRIGGER

No problems whatsoever.

I don't have a bin editor that I can look at what those two '--' characters
are in your original output...but whatever they are, isql don't like
'em. Did you maybe use a unicode editor to add the comment lines?

./heLen