Subject | RE: [IBO] Quoted object names in TIB_Script component |
---|---|
Author | firebird@spence.users.panix.com |
Post date | 2006-07-13T14:03:38Z |
>Behalf Of Helen Borrie
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On
> Sent: Wednesday, July 12, 2006 11:34 PMDIALECT
> To: IBObjects@yahoogroups.com
> Subject: RE: [IBO] Quoted object names in TIB_Script component
>
>
> At 01:02 PM 13/07/2006, you wrote:
>
> > > It depends. First do a reality check to make sure that the database
> > > that your IB_Script is accessing is Dialect 3. Quoted identifiers
> > > are unknown tokens in Dialect 1 databases.
> > >
> >
> >And that was it! I did SET SQL DIALECT 3; before the CREATE DATABASE
> >and all was well.
> >
> >Which brings up another question: In "The Firebird Book", pg 233, it says
> >that Firebird always creates a dialect 3 database by default, which is
> >why I left it out in the first place. And just to be on the safe side,
> >I had set the SQLDialect property to 3 in the TIB_Connection object that
> >was associated with the TIB_SCRIPT.
> >
> >Why would it have created a dialect 1 database, absent the SET SQL
> >command?So you're saying that when I do this:
>
> SQL dialect has two sides.
>
> On the one hand, a dialect 3 database is a database in which the full
> language features of IB 6.0 and Firebird are implemented. A dialect
> 1 database is one where the language features of IB 5.6 are
> implemented but not all of the later features.
>
> On the other hand, the client library can't deal with the database
> it's connecting to unless it knows which dialect it is supposed to be
> using. So, if you connect to a dialect 1 database using a dialect 3
> client, or vice versa, you are going to encounter exception conditions.
>
> Now, a TIB_Connection is a connection *to a database*. So you have a
> bootstrap situation if your TIB_Connection is "connecting" to a
> database that doesn't exist yet. As far as I know, IBO still
> *creates* a dialect 1 database by default. Once it has created the
> database, it can *then* follow your instruction and connect to it as
> a dialect 3 client. But that's too late. Because the database
> dialect wasn't set *before* the CREATE DATABASE statement, IBO didn't
> know you wanted a dialect 3 database.
SET SQL DIALECT 3;
CREATE DATABASE "c:\aaa1\bbbb.fdb"
USER 'SYSDBA' PASSWORD 'masterkey';
in the TIB_Script object, setting the dialect is necessary to alert
the object that I want dialect 3, not dialect 1 because the database
doesn't exist yet anyway, and that your book's comments only applied
to isql, which assume dialect 3 by default. Now I see.
>I would think that Jason should make TIB_Script act as much like isql
> If you ask "Does Helen think Jason should consider making Dialect 3
> the default, seven years on from IB 6?" the answer is simply
> "Yes". Firebird's isql has been creating Dialect 3 databases by
> default since 2003 and "to everything, there is a season".
>
as possible.
Thanks for your help.
Michael D. Spence
Mockingbird Data Systems, Inc.