Something with unique fields V4MD

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Nov 28 11:57:34 CST 2003


on 11/28/03 11:45 AM, Florian Bogeschdorfer at fb at memedia.de wrote:

> Hi Ruslan,
> 
> I think we had this before and you fixed it, but somehow something is weird.
> 
> Say I have a table with some fields and one field which is unique
> kTypeString
> 
> It is indexed, unique and nullable.
> 
> Now I add a record with
> 
> set addRecordCursor = new( xtra "VCursor", GetRef(VAL[#ID]), "select
> RecID, * from "&tableName,2,1,2)
> x=addRecord(addRecordCursor, recDataList)
> .
> .
> In the list I write some fields BUT NOT TO THE UNIQUE FIELD!
> 
> Fine, all works, I can add hundres of records, of which the unique field
> will always be NULL.
> 
> Now the user takes a record enters a string in the unique field and saves
> it. Then he edits the field again and saves an empty string. The field value
> should now be "".
> 
> But after that if I try to add a new record, I get an error message "field
> is unique". Hmmm. The new record should have NULL in this specific field,
> the "old" record "" or if not changed also "NULL".
> 
> So where does the error come from?
> 
> Next I take the record where the unique field is "" and enter something else
> e.g. "test".
> 
> Now I can add records again.
> 
> Looks like a bug 4 me??

Looks strange.

I wonder, can you reproduce the same behavior simply in VAPP ?
Although I am not sure how enter in VAPP empty string.
It will consider it as NULL I think.

We need study this.


BTW, why you change it to empty string, but not to NULL?


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list