Something with unique fields V4MD

Florian Bogeschdorfer fb at memedia.de
Fri Nov 28 10:45:47 CST 2003


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??

Best regards, Florian




More information about the Valentina mailing list