Subject | Re: [IBO] TIB_Script: connect syntax |
---|---|
Author | Helen Borrie |
Post date | 2002-10-13T11:14:51Z |
At 12:35 PM 13-10-02 +0200, you wrote:
valid phrases in Fb/IB SQL.
Your problem is the use of double quotes. From IB 6 forward, double quotes
are no longer legal for delimiting strings. Replace them with single
quotes (as shown in both the IB 5.5 and IB 6 documentation) and you will
then have correct syntax for Firebird 1. This example is from page 42 of
the IB 5.5 Language Reference:
CONNECT 'employee.gdb' USER 'ACCT_REC' PASSWORD 'peanuts';
via the InterBase page of the www.ibphoenix.com website) a lot more useful
for Firebird than the old IB 5 docs. If you are trying to work with an old
5.0 database using Firebird, you would be well-advised to pick up also the
Migration Guide from the same source.
databases in the past five years...in particular, you will find that
Firebird is a lot more fussy about syntax errors and ambiguities.
Helen
>Hi all..for no very obvious reason. CONNECT DATABASE and CONNECT SCHEMA are not
>
>IBO: 4.2.Ga
>D5 Pro
>Win 98 SE
>FB 1.0
>
>I tried connecting to a DB by a script using TIB_Script.
>
>The correct connect syntax does not work ('connect "<dbpath>" user "SYSDBA"
>password "masterkey";').
>
>In Procedure TIB_Statement.SysExecuteImmediate, the call to
>SetConnectionProperties does not recognize the statement as valid connect
>statement. I found out that the parser expects a 'database' or 'theme' after
>the 'connect'. If I add this keyword then it works fine.
valid phrases in Fb/IB SQL.
Your problem is the use of double quotes. From IB 6 forward, double quotes
are no longer legal for delimiting strings. Replace them with single
quotes (as shown in both the IB 5.5 and IB 6 documentation) and you will
then have correct syntax for Firebird 1. This example is from page 42 of
the IB 5.5 Language Reference:
CONNECT 'employee.gdb' USER 'ACCT_REC' PASSWORD 'peanuts';
>But this is not according to the correct syntax (at least Interbase 5.0,I think you would find Borland's IB 6 documentation (available as a beta
>for IB 6.x I have no documentation).
via the InterBase page of the www.ibphoenix.com website) a lot more useful
for Firebird than the old IB 5 docs. If you are trying to work with an old
5.0 database using Firebird, you would be well-advised to pick up also the
Migration Guide from the same source.
>Is this a bug or by design?It's a question of catching up with changes that have occurred in the
databases in the past five years...in particular, you will find that
Firebird is a lot more fussy about syntax errors and ambiguities.
Helen