NEVERMIND: (solved) create table sql for object ptr
Dave Parizek
david at parizek.com
Tue Jun 19 23:38:02 CDT 2007
NEVERMIND my previous request.
I got it by dumping an old db in Valentina Studio:
"ParentPtr" OBJECTPTR CONSTRAINT Link_1 REFERENCES "Person" ON DELETE
SET_NULL ...,
What is the sql syntax if I want to create an objectptr field in a
create table sql statement?
I cannot find an example anywhere, and i am unable to figure it out
from the sql wiki create table page.
I want to do this:
VTable* tblPerson = [inDatabase createTable:@"Person"];
[tblPerson createStringField:@"FirstName" maxLength:40];
[tblPerson createObjectPtrField:@"ParentPtr" target:tblPerson
onDeletion:EVOnDelete_kSetNull flags:EVFlag_kNullable];
only in a SQL statement:
query = @"CREATE TABLE Person ("
"ParentPtr objectptr, " //how indicate target, on delete, flags
in sql???
" FirstName string (40))";
[mDatabase sqlExecute:query];
I realize this is probably in the archives, but there is no quick way
to search the list archives right now, so if anyone knows it off-hand
I would sincerely appreciate it...
thanks,
Dave
More information about the Valentina
mailing list