Export SQL question

Bart Pietercil bart.pietercil at gmail.com
Wed Jun 13 08:33:27 CDT 2007


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 ?

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


More information about the Valentina mailing list