Subject | Re: [IBO] tib_script |
---|---|
Author | rudi_josic |
Post date | 2004-06-21T18:03:47Z |
--- In IBObjects@yahoogroups.com, Paul Vinkenoog <paul@v...> wrote:
the script is a little long (to write it here, abauto 33 tables with
some Triggers), but if is not a nuisance, i can send it to your e-mail
account.
*************************************
yes it has autoddl on!
SET TERM ^ ;
SET SQL DIALECT 3^
SET AUTODDL ON^
CREATE DATABASE 'C:\Documents and Settings\...mydb.gds'
USER 'SYSDBA' PASSWORD 'masterkey'
DEFAULT CHARACTER SET ISO8859_1^
**************************************
yes is commited after the create table declaration!
CREATE TABLE "dml" (
"Id" INT64 NOT NULL,
"Accion" CHAR(1) NOT NULL COLLATE ES_ES,
"Campo" VARCHAR(128) NOT NULL COLLATE ES_ES,
"Valor01" VARCHAR(128) NOT NULL COLLATE ES_ES,
"Valor02" VARCHAR(128) COLLATE ES_ES,
"Valor03" VARCHAR(128) COLLATE ES_ES,
"Valor04" VARCHAR(128) COLLATE ES_ES,
"Usuario" VARCHAR(32) NOT NULL COLLATE ES_ES )^
COMMIT^
ALTER TABLE "dml" ADD CONSTRAINT "PK_dml" PRIMARY KEY ( "Id" )^
COMMIT^
*********************************
and no ib_sql had not the autocommit option checked!
*********************************
i'll wait until you autorize me to send it to you if it necesary.
Thanks.
Rudi.
> Hi rudi_josic,or
>
> > if not FileExists(ExtractFilePath(ParamStr(0)) + 'mydb.gdb')
> > then IB_Script1.Execute;
>
> > but it raise an exception : "exception class : EIB_ISCError with
> > message 'ISC ERROR CODE : 335544569
> > dynamic sql error
> > sql error code = -204
> > table unknown
> > dml
> > at line 1 column 18'
> >
> > the database is created but empty.
>
> Without seeing your script it's hard to tell, but I suspect that you
> didn't commit after creating the table, and then when you tried to
> manipulate it, it wasn't visible yet. Do you have "SET AUTODDL ON"
> "SET AUTO ON" at the start of your script? Or, alternatively, do youto
> have a "COMMIT" after the statement that creates the table? Or, more
> alternatively, do you have your transaction's ServerAutoCommit set
> true?Thank you to respond Paul
>
> The reason that it does work in IB_SQL may be that you have
> "AutoCommit" or "Server AutoCommit" on there.
>
>
> Greetings,
> Paul Vinkenoog
the script is a little long (to write it here, abauto 33 tables with
some Triggers), but if is not a nuisance, i can send it to your e-mail
account.
*************************************
yes it has autoddl on!
SET TERM ^ ;
SET SQL DIALECT 3^
SET AUTODDL ON^
CREATE DATABASE 'C:\Documents and Settings\...mydb.gds'
USER 'SYSDBA' PASSWORD 'masterkey'
DEFAULT CHARACTER SET ISO8859_1^
**************************************
yes is commited after the create table declaration!
CREATE TABLE "dml" (
"Id" INT64 NOT NULL,
"Accion" CHAR(1) NOT NULL COLLATE ES_ES,
"Campo" VARCHAR(128) NOT NULL COLLATE ES_ES,
"Valor01" VARCHAR(128) NOT NULL COLLATE ES_ES,
"Valor02" VARCHAR(128) COLLATE ES_ES,
"Valor03" VARCHAR(128) COLLATE ES_ES,
"Valor04" VARCHAR(128) COLLATE ES_ES,
"Usuario" VARCHAR(32) NOT NULL COLLATE ES_ES )^
COMMIT^
ALTER TABLE "dml" ADD CONSTRAINT "PK_dml" PRIMARY KEY ( "Id" )^
COMMIT^
*********************************
and no ib_sql had not the autocommit option checked!
*********************************
i'll wait until you autorize me to send it to you if it necesary.
Thanks.
Rudi.