TIA
Mark Rohde
"Hannes Danzl [TPX]" <Han...@danzl.lznad.at> wrote in message
news:O#uAJ0ThC...@tpsmail01.turbopower.net...
> have you tried
>
> SQLNameString = '"' { noDblQuote } '"' | '[' { noDblQuote } ']'
>
> --
> Hannes
>
> -> Han...@danzl.lznad.at (remove .lznad) / http://www.danzl.at
> FF Foundry at http://community.turbopower.com/
> Newsgroup search at http://www.tamaracka.com/search.htm
> Fixes and updates at ftp://ftp.turbopower.com/pub/flash/updates/
>
>
> "Mark Rohde" <mro...@agdata.com.au> wrote in message
> news:9nOgRRTh...@tpsmail01.turbopower.net...
> > Mike,
> > I would appreciate a pointer in the right direction.
> > I have identified what I believe are the lines resposible
> > CHARACTERS
> > ...
> >
> > noDblQuote = ANY - '"' - eol .
> >
> > TOKENS
> > ...
> >
> > SQLNameString = '"' { noDblQuote } '"' .
> >
> >
> > But changing these values does not appear to work, ideally I would like
to
> > extend the functionality to include " or []. Any help/direction would
be
> > appreciated
> >
> >
> >
> > Mark Rohde
> >
> >
> >
> > "Mike Reith" <mre...@tetzel.com> wrote in message
> > news:MPG.183216f22...@news.turbopower.com...
> > > Mark,
> > >
> > > If you run into any road blocks I might be able to help. I wrote and
> > > maintain Coco/R for Delphi.
> > >
> > > Mike
> > > mre...@tetzel.com
> > >
> > > In article <LPpKZ$RhCHA...@tpsmail01.turbopower.net>,
> > > mro...@agdata.com.au says...
> > > > Thanks Sean,
> > > > I have read a little about Coco/R BTH I was short on time and it
> seemed
> > a
> > > > little beyond me. I'll give it a go and advise my progress if anyone
> is
> > > > interested
> > > >
> > > >
> > > > Mark Rohde
> > > >
> > > >
> > > > "Sean Winstead[TurboPower]" <se...@turbopower.com> wrote in message
> > > > news:ekrfsukiau2lvptmp...@4ax.com...
> > > > > That would be in the FF SQL grammar contained in file FFSQL.ATG.
You
> > can
> > > > > edit and compile that grammar into file FFSQL.pas using a utility
> > named
> > > > > Coco/R. Coco/R is available via http://www.tetzel.com. We use the
> beta
> > > > > version.
> > > > >
> > > >
> > > >
> > > >
> >
> >
>
>
TOKENS
...
SQLNameString = '"' { noDblQuote } '"' .
Mark Rohde
That would be in the FF SQL grammar contained in file FFSQL.ATG. You can
SQLNameString = '"' { noDblQuote } '"' | '[' { noDblQuote } ']'
--
Hannes
-> Han...@danzl.lznad.at (remove .lznad) / http://www.danzl.at
FF Foundry at http://community.turbopower.com/
Newsgroup search at http://www.tamaracka.com/search.htm
Fixes and updates at ftp://ftp.turbopower.com/pub/flash/updates/
"Mark Rohde" <mro...@agdata.com.au> wrote in message
news:9nOgRRTh...@tpsmail01.turbopower.net...
Mark Rohde
"Sean Winstead[TurboPower]" <se...@turbopower.com> wrote in message
news:ekrfsukiau2lvptmp...@4ax.com...
>
Downloaded the latest Coco/R made the changes and implimented into the
server. A couple of things however:
It seems in BracketedName<var aName : string>,
Symbol.Len := GetScanner.BufferPosition - Symbol.Pos - 2;
Is not returning the correct position. This is the SQL I am passing
Select [Account ID] from Accounts
The SQL engine returns the error "....Account ID] fr is not ...." By
changing the Literal from 2 to 6 the script works. But of course this would
be too simple... in a multiple field select this method does not work. I
have tried to compensate in the ffSQL.pas and scan aName removing all the
extra chars, this also failed.
I am guessing that there is some issue in either GetScanner.BufferPosition
or in Symbol.Pos (this is my bet) rather than the literal 2, not being
familar with Coco/R and its language any assistance would be appreciated
TIA
Mark Rohde
"Mike Reith" <mre...@tetzel.com> wrote in message
news:MPG.1833bb709...@news.turbopower.com...
> Mark,
>
> Working on this problem identified a bug in Coco/R for Delphi so you
> will have to download the latest version (1.1.0.182) from my web page.
>
> Then change the SQLName production to:
>
> SQLName <var aName : string>
> =
> ident (. aName := LexString; .)
> | SQLNameString (. aName := CheckSQLName(LexString); .)
> | BracketedName<aName>
> .
>
> And add the BracketedName production:
>
> BracketedName<var aName : string>
> (. var Symbol : TSymbolPosition; .)
> = (. aName := '';
> Symbol := TSymbolPosition.Create;
> try
> Symbol.Pos := GetScanner.BufferPosition; .)
> (
> "["
> { ANY
> }
> "]"
> ) (. Symbol.Len := GetScanner.BufferPosition -
> Symbol.Pos - 2;
> aName := GetScanner.GetString(Symbol);
> finally
> Symbol.Free;
> end; .)
> .
>
> Hope this helps. Let me know if there are any problems.
>
> Mike
>
> In article <9nOgRRTh...@tpsmail01.turbopower.net>,
> mro...@agdata.com.au says...
I think that you are right and that there is a problem with the literal;
the test cases that I ran were rather short. I'll look at it this
weekend and find out where the problem is occurring.
Mike
In article <kDFLKPsh...@tpsmail01.turbopower.net>,
mro...@agdata.com.au says...
Thanks for sharing the solution.
Please note that posting of TP source to the Foundry is expressly
prohibited, so take care to only post changes and not complete unit(s).
--
Eivind Bakkestuen [TPX]
Please, no private email unless requested.
This newsgroup is searchable at http://www.tamaracka.com
Visit TurboPower's new Foundry at http://community.turbopower.com
"Mark Rohde" <mro...@agdata.com.au> wrote in message
news:xSzUnhRi...@tpsmail01.turbopower.net...
> Big thanks to Mike Reith of Coco/R. The changes made to ffSQL.pas via
Coco/R
> now allow for the use of [] or "" for field identifications. This now
brings
> FlashFiler and SQLConrtructor together as a working solution for me
instead
> of being a painfull execice of search/replace.
> I will submit this change to the foundry for those that are
> interested........
>
> Thanks again Mike for all your help.
>
>
> Mark Rohde
>
>
> I am guessing that there is some issue in either GetScanner.BufferPosition
> or in Symbol.Pos (this is my bet) rather than the literal 2, not being
> familar with Coco/R and its language any assistance would be appreciated
Mark,
Try the following code:
SQLName <var aName : string>
=
ident (. aName := LexString; .)
| SQLNameString (. aName := CheckSQLName(LexString); .)
| BracketedName <aName> (. aName := CheckSQLName(aName); .)
.
BracketedName<var aName : string>
(. var Symbol : TSymbolPosition; .)
= (. aName := '';
Symbol := TSymbolPosition.Create;
try
// GetScanner.NextSymbol will be the [
Symbol.Pos := GetScanner.NextSymbol.Pos; .)
(
"["
{ ANY
}
"]"
)
(. // GetScanner.CurrentSymbol will be the ]
Symbol.Len := (GetScanner.CurrentSymbol.Pos
+ GetScanner.CurrentSymbol.Len) - Symbol.Pos;
aName := GetScanner.GetString(Symbol);
finally
Symbol.Free;
end; .)
.
You were right that I did not get the correct position within the source
stream for the closing bracket. I have rewritten the code avoiding the
use of BufferPosition. Hopefully this code will work.
Mike
Either way I wont send anything to the Foundry as I thing it would violate
the Foundry rules. If TP want the changed file I'd be happy to send it to
them or they can follow the thread and decide for themselves.
Just another note of appreciation to Mike and also one to TP. Where else can
a programmer go, express a wish to change something fundimental in a
database engine and recieve expert advise and the source code to make the
changes? I am constantly impressed and satified my money and advise to my
employer are well spent.
Mark Rohde.
"Eivind Bakkestuen [TPX]" <eivind.b...@tpx.turbopower.com> wrote in
message news:C1YErESi...@tpsmail01.turbopower.net...
http://www.aipoint.com/b_asi/sqlConstructor/index.htm
--
Eivind Bakkestuen [TPX]
Please, no private email unless requested.
This newsgroup is searchable at http://www.tamaracka.com
Visit TurboPower's new Foundry at http://community.turbopower.com
"Mark Rohde" <mro...@agdata.com.au> wrote in message
news:UwpdBFJh...@tpsmail01.turbopower.net...
Mark Rohde
"Eivind Bakkestuen [TPX]" <eivind.b...@tpx.turbopower.com> wrote in
message news:nPygq5vj...@tpsmail01.turbopower.net...
--
Eivind Bakkestuen [TPX]
Please, no private email unless requested.
This newsgroup is searchable at http://www.tamaracka.com
Visit TurboPower's new Foundry at http://community.turbopower.com
"Mark Rohde" <mro...@agdata.com.au> wrote in message
news:6IsGr$1lCH...@tpsmail01.turbopower.net...