Subject Re: [firebird-support] Trouble running scripts
Author Helen Borrie
At 03:20 PM 1/06/2004 +0000, you wrote:
>Hi, I'm trying out Firebird (1.5.0.4306) with the latest firebird odbc
>driver (1.02.0064), and using ibexpert/marathon as a frontend to run
>scripts. I installed the super-server as an application on my
>Win2000 machine.
>
>I have generated a script from my dictionary to create the tables.
>Here is a small portion:
>
>CREATE TABLE AUDITChange (
>AuditChangeID INTEGER NOT NULL,
>AuditID INTEGER,
>opID VARCHAR(31),
>OldValue CHAR(30),
>NewValue CHAR(30),
>EntryDate DATE,
>EntryTime TIME,
>PRIMARY KEY (AuditChangeID)
>);
>CREATE TABLE MODULE (
>ModuleID VARCHAR(11) NOT NULL,
>DenyAccess SMALLINT,
>PRIMARY KEY (ModuleID)
>);
>CREATE TABLE OP (
>ModuleID VARCHAR(11) NOT NULL,
>ProcessID VARCHAR(31) NOT NULL,
>OpID VARCHAR(31) NOT NULL,
>RuntimeFlag SMALLINT,
>PRIMARY KEY (ModuleID,ProcessID,OpID)
>);
>
>This script is suppossed to create 4 tables. However it fails on
>the second table saying that CREATE is an invalid token. This is the
>error reported in Marathon 3 beta:
>ISC ERROR CODE:335544569
>
>ISC ERROR MESSAGE:
>Dynamic SQL Error
>SQL error code = -104
>Token unknown - line 11, char 1
>CREATE
>
>STATEMENT:
>TIBOInternalDataset: "frmSQLForm.qrySQLStatement.I
>BOqrqrySQLStatement."
>
>If I run each table by itself I can create all four tables however, so
>the script's syntax seems to be ok.
>
>Apparently I'm getting trouble with multi-statement scripts. Maybe
>firebird requires something to be written in-between statements?

No - it's apparent from the error message that you were not running these
statements as a script. You can't just pile multiple statements into a
DSQL interface and expect them to run as a script. You actually have to
present them as a script, using a script tool.

Marathon has a "Script executive" tool and I'm sure IBExpert has something
similar...

/heLen