Subject | Database not assigned |
---|---|
Author | Michael Vilhelmsen |
Post date | 2003-12-16T10:41:48Z |
Hi
I have a program made in D5 Ent using InterbaseExpress Comp.
I Connect to a FB DB (FB version 1.0.3).
The FB runs either on Windows 98 or Windows 2000 Server.
In my app. I sometimes do a update of the DB (Creating new table,
view, stored procedure etc.).
I Usually creates this in IBExpert and the take the SQL needed and
put in a TIBScript.
I only update the DB when there is NO USERS ATTACHED except this one
machine.
I Connects as SYSDBA always.
Then lately I have created some new tables with the SQL from IBExpert.
This can be as follows:
CREATE TABLE POINT_AFSLUT_KVIT(
ID INTEGER NOT NULL);
Commit
alter table POINT_AFSLUT_KVIT
add constraint PK_POINT_AFSLUT_KVIT
primary key (ID);
Commit
CREATE GENERATOR GEN_POINT_AFSLUT_KVIT_ID;
Commit
SET TERM ^ ;
CREATE TRIGGER POINT_AFSLUT_KVIT_BI FOR POINT_AFSLUT_KVIT
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
IF (NEW.ID IS NULL) THEN
NEW.ID = GEN_ID(GEN_POINT_AFSLUT_KVIT_ID,1);
END
^
SET TERM ; ^
Commit
Then as the last thing IBExpert gives me this SQL Statement, which I
also (try) to execute.
UPDATE RDB$RELATION_FIELDS F1
SET F1.RDB$DEFAULT_VALUE = NULL,
F1.RDB$DEFAULT_SOURCE = NULL
WHERE (F1.RDB$RELATION_NAME = 'POINT_AFSLUT_KVIT') AND
(F1.RDB$FIELD_NAME = 'ID');
But this always gives me DATABASE NOT ASSIGNED.
As I recall IBExpert didn't give me this statement in earlier version
(I have the newest version available).
My questions are:
1.
Why do I get this error ?
2.
What does this last SQL Statement actually do ?
Regards
Michael
I have a program made in D5 Ent using InterbaseExpress Comp.
I Connect to a FB DB (FB version 1.0.3).
The FB runs either on Windows 98 or Windows 2000 Server.
In my app. I sometimes do a update of the DB (Creating new table,
view, stored procedure etc.).
I Usually creates this in IBExpert and the take the SQL needed and
put in a TIBScript.
I only update the DB when there is NO USERS ATTACHED except this one
machine.
I Connects as SYSDBA always.
Then lately I have created some new tables with the SQL from IBExpert.
This can be as follows:
CREATE TABLE POINT_AFSLUT_KVIT(
ID INTEGER NOT NULL);
Commit
alter table POINT_AFSLUT_KVIT
add constraint PK_POINT_AFSLUT_KVIT
primary key (ID);
Commit
CREATE GENERATOR GEN_POINT_AFSLUT_KVIT_ID;
Commit
SET TERM ^ ;
CREATE TRIGGER POINT_AFSLUT_KVIT_BI FOR POINT_AFSLUT_KVIT
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
IF (NEW.ID IS NULL) THEN
NEW.ID = GEN_ID(GEN_POINT_AFSLUT_KVIT_ID,1);
END
^
SET TERM ; ^
Commit
Then as the last thing IBExpert gives me this SQL Statement, which I
also (try) to execute.
UPDATE RDB$RELATION_FIELDS F1
SET F1.RDB$DEFAULT_VALUE = NULL,
F1.RDB$DEFAULT_SOURCE = NULL
WHERE (F1.RDB$RELATION_NAME = 'POINT_AFSLUT_KVIT') AND
(F1.RDB$FIELD_NAME = 'ID');
But this always gives me DATABASE NOT ASSIGNED.
As I recall IBExpert didn't give me this statement in earlier version
(I have the newest version available).
My questions are:
1.
Why do I get this error ?
2.
What does this last SQL Statement actually do ?
Regards
Michael