Export SQL question

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Jun 13 08:41:42 CDT 2007


On 13/6/07 4:33 PM, "Bart Pietercil" <bart.pietercil at gmail.com> wrote:

Hi Bart,

> Hi List, Ruslan
> 
> This is the result of an SQL dump for a table:
> 
> CREATE TABLE "tbl_modules" (
> "module_name" VARCHAR (2044)  NOT NULL,
> "module_description" VARCHAR (2044)  NOT NULL,
> "module_seqnr" VARCHAR (2044)  NOT NULL,
> "objptr_proj_lang_id" ULONG  NOT NULL INDEXED,
> "uniq_seqnr" LONG METHOD ('CONCAT(objptr_proj_lang_id,
> module_seqnr)')  NOT NULL UNIQUE INDEXED,
> "modification_dt" DATETIME  NOT NULL,
> "creation_dt" DATETIME  NOT NULL,
> "objptr_created_by" ULONG  INDEXED,
> "objptr_modified_by" ULONG  INDEXED);
> 
> The question goes on the last two lines. As you can see on the name
> these two fields were created in VStudio as ObjectPointers with
> Deletion Control SET NULL and target table as "tbl_users"
> As I was looking for the SQL way of defining an ObjectPointer with
> deletion control "SET NULL" and did not find any info on the WIKI I
> exported an existing table.
> 
> Much to my surprise fields I created as Object Pointers (and show up
> in VStudio as Object Pointer) are exported as ULong ????
> 
> Is this an error in the export routine ?

I think if you look down into file, you will find something
    ALTER TABLE that convert them back to ObjectPtr

This Trick is required to correctly manage RecID values,
Which in the new db will be different.


> If not is this the way to create ObjectPointers with a SET NULL
> option in  deletion control ?
> 
> This would mean Valentina stores internally just the OID (seems
> reasonable), but then how does VStudio know to show it as ObjectPointer.
> 
> To confusing so my bet goes to: this is a bug.
> 
> Then the question remains: How do I in the SQL way created an
> objectpointer with deletion control setnull.
> 
> "objptr_modified_by" OBJECTPTR CONSTRAINT
> assignment_student_modified_by REFERENCES "tbl_users" ON DELETE null
> INDEXED,
> 
> This line is not accepted in VStudio (the null is an unexpected
> token)             ^^^^^
> 
> Help appreciated
> 
> TIA
> 
> Bart Pietercil
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list