Subject | Re: [IBO] Cursors and SQL parsing... |
---|---|
Author | Martijn Tonies |
Post date | 2001-12-11T18:48:44Z |
""Jason Wharton"" <jwharton@...> wrote in message
news:059c01c18270$5247a6a0$dc756a41@CX170673E...
I'm having some other small issues with the parser though.
This statement:
SELECT
r.RelatieNummer,
r.AdresNaam,
r.Naam,
r.VeilingNummer
--r.RelatieNummer As "Rel nr."
--,CAST(d.ICLFactuur As Char(8))
FROM
Relatie r
--LEFT OUTER JOIN Debiteur d ON (d.RelatieNummer = r.RelatieNummer)
ORDER BY
r.RelatieNummer--,r.Naam
will be modified by InterBase Workbench - you perhaps know it supports
single line comments (before Firebird did), it replaces '--' with the right
comment markers (/* .. */). InterBase Workbench will change this too:
'SELECT'#$D#$A' r.RelatieNummer,'#$D#$A' r.AdresNaam,'#$D#$A'
r.Naam,'#$D#$A' r.VeilingNummer'#$D#$A' /* r.RelatieNummer As "Rel
nr."*/'#$D#$A' /* ,CAST(d.ICLFactuur As Char(8))*/'#$D#$A'FROM'#$D#$A'
Relatie r'#$D#$A' /* LEFT OUTER JOIN Debiteur d ON (d.RelatieNummer =
r.RelatieNummer)*/'#$D#$A'ORDER BY'#$D#$A' r.RelatieNummer /*
,r.Naam*/'#$D#$A
(taken from Delphis 'evaluate/modify' - therefore a bit too much 's alright)
As you can see, the line
r.RelatieNummer--,r.Naam
has been replaced by
r.RelatieNummer /* ,r.Naam*/'#$D#$A
which is just fine. However, when sending this to the server, IBO produces:
r.RelatieNummer ASC , r.Naam*/ ASC
Which, of course, doesn't run at all - claiming a 'token unknown' error on
the * ... jups, this is right - but totally useless for my customers.
Is there any way to turn off this kind of parsing? Or is it perhaps only a
bit buggy?
I'd rather have the server parse the stuff - one less layer to put errors in
(no offence).
--
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
news:059c01c18270$5247a6a0$dc756a41@CX170673E...
> I will need to update IBO's parsing to allow for this.Jason,
I'm having some other small issues with the parser though.
This statement:
SELECT
r.RelatieNummer,
r.AdresNaam,
r.Naam,
r.VeilingNummer
--r.RelatieNummer As "Rel nr."
--,CAST(d.ICLFactuur As Char(8))
FROM
Relatie r
--LEFT OUTER JOIN Debiteur d ON (d.RelatieNummer = r.RelatieNummer)
ORDER BY
r.RelatieNummer--,r.Naam
will be modified by InterBase Workbench - you perhaps know it supports
single line comments (before Firebird did), it replaces '--' with the right
comment markers (/* .. */). InterBase Workbench will change this too:
'SELECT'#$D#$A' r.RelatieNummer,'#$D#$A' r.AdresNaam,'#$D#$A'
r.Naam,'#$D#$A' r.VeilingNummer'#$D#$A' /* r.RelatieNummer As "Rel
nr."*/'#$D#$A' /* ,CAST(d.ICLFactuur As Char(8))*/'#$D#$A'FROM'#$D#$A'
Relatie r'#$D#$A' /* LEFT OUTER JOIN Debiteur d ON (d.RelatieNummer =
r.RelatieNummer)*/'#$D#$A'ORDER BY'#$D#$A' r.RelatieNummer /*
,r.Naam*/'#$D#$A
(taken from Delphis 'evaluate/modify' - therefore a bit too much 's alright)
As you can see, the line
r.RelatieNummer--,r.Naam
has been replaced by
r.RelatieNummer /* ,r.Naam*/'#$D#$A
which is just fine. However, when sending this to the server, IBO produces:
r.RelatieNummer ASC , r.Naam*/ ASC
Which, of course, doesn't run at all - claiming a 'token unknown' error on
the * ... jups, this is right - but totally useless for my customers.
Is there any way to turn off this kind of parsing? Or is it perhaps only a
bit buggy?
I'd rather have the server parse the stuff - one less layer to put errors in
(no offence).
--
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
> > Hi,___________________________________________________________________________
> >
> > I've noticed that when IBO opens a cursor (whatever component) it parses
> the
> > SQL quite a lot.
> >
> > Executing the following statement in IBO (IB_ISQL):
> >
> > select * from employee
> > order by emp_no asc 423423
> >
> > Succeeds just fine. The statement that goes to the server is:
> >
> > select * from employee
> > order by emp_no asc
> >
> > Obviously, this can be a problem with IB6.5, a query like this:
> >
> > select * from employee
> > order by emp_no asc
> > rows 1 to 5
> >
> > goes to the server like:
> >
> > select * from employee
> > order by emp_no asc
> >
> >
> > Comments anyone?
> > --
> > Martijn Tonies
> > InterBase Workbench - the developer tool for InterBase and Firebird
> > http://www.interbaseworkbench.com
> >
> > Upscene Productions
> > http://www.upscene.com
> >
> > "This is an object-oriented system.
> > If we change anything, the users object."
>
>
>
>
>
> IB Objects - direct, complete, custom connectivity to Firebird orInterBase
> without the need for BDE, ODBC or any other layer.___________________________________________________________________________
>
> http://www.ibobjects.com - your IBO community resource for Tech Infopapers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>