on 02-04-2005 9:55 PM
I am trying to add multiple records to a UDT using the DI API. When I add the second and subsequent records and do not specify the values for certain of the fields, they contain the old values when I add the record to the table. I tried using "" as the value but this sets the char fields to empty strings and the numeric fields to 0's. I would like to have these values be null in the DB but the statement:
tbl.UserFields.Fields.Item(k).Value = System.DBNull.Value;
Does not work. Only the following seems to work but is not what I want.
tbl.UserFields.Fields.Item(k).Value = "";
Do I have to delete and recreate the tbl object for each record?
Hi Gary,
Unfortunately you are right and found a gap:
DI API does not support setting Value back to "empty"/"null"... - except for memo fields.
I.e. the only way to get this is currently to delete / recreate the tbl object for each record - or use a SQL statement in case this is not tolerable in terms of performance.
Regards,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.