on 2005 Mar 29 11:07 AM
Hello,
I'd like to know how I can update a User Table to have a field value set to null.
I tried
oTable.UserFields.Fields.Item("U_MyField").Value = nothing
oTable.UserFields.Fields.Item("U_MyFied").Value = System.DBNull.Value
oTable.UserFields.Fields.Item("U_MyFied").Value = Null
but none of them works
my field can be numeric, string, date, I need to update it to be sure it's null (not 0 or "" or 1900-01-01)
Thanks for your help
Sébastien
Sebastien,
Try
oTable.UserFields.Fields.Item("U_MyField").Value = ""
It sets Date values to NULL.
Miki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found it for string, it's String.Empty
Hi Sébastien,
Right now I am facing the same problem.
String.Empty doesn't set a null value in the database, it makes it empty, it is not the same. System.DBNull.value doesn't work at all.
Is there a possibility to set a null value in a field through DI ???
Eddy
Hi,
I am working with a system table with a userfield. I update the userfield through the DI as following:
object.UserFields.Field.Item("<field>").Value = string.Empty
When I look at my table with the query analyser the field value is not null, it is just empty.
And when I do a selection query with "where <field> is not null, I get the record as result.
I believe you but I don't understand the difference of my case and yours. Should it be a difference between a systemtable with a userfield instead of a usertable?? Or version, I working in SAP 2004A PL18...
greets,
Eddy
User | Count |
---|---|
101 | |
8 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.