Help needed: SQL Creation of ObjectPtr

Karl Grob kgrob at mus.ch
Wed Nov 28 04:35:34 CST 2007


Hi

Can anyone give me some help?

ALTER TABLE tbl_Wortindex
ADD tbl_Wortindex_eroeffnetVon OBJECTPTR INDEXED
REFERENCES  tbl_Benutzer ON DELETE SET NULL
CONSTRAINT Link_tbl_Wortindex_eroeffnetVon
ON UPDATE NULL

does work, but gives the following results:

The Link Name is not "Link_tbl_Wortindex_eroeffnetVon" but "Link_1"

All this does not work without "ON UPDATE NULL" and it does not accept  
the DELETE statement in place of the UPDATE-Statement. In WIKI I read:
---
CREATE TABLE T2(
   T1_PTR ObjectPtr REFERENCES TABLE_1 CONSTRAINT link_T1_T2
   ON DELETE CASCADE
)
You can see that ObjectPtr field needs only Target Table  
specification, but do not need the key field of that table, because  
always a RecID field of Target Table is used. Also ObjectPtr field do  
not need ON UPDATE action.

---

I really have problems to find working examples (No example for ALTER  
TABLE! ALTER TABLE is especially for Links a very common situation.  
Circles are forbidden, arent they?).

Perhaps there is some help out there.

Thanks in advance

Karl Grob



RealBasic 2007/5

V4RB (18.11.2007)

MacPro (Intel)


More information about the Valentina mailing list