|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
In the UI, there are some optional field but in the DB I want tto store NULL
instead of empty string. Do I check for empty string for these values in the business layer when I am going thru each row in the datatable for Data Validation. Thanks Empty string isn't a null value.
Yes, I guess (unless your UI controls can store null value) you would have to resort to "manual" replacament of empty strings to DBNull.Value values. -- Show quoteMiha Markic [MVP C#] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ "DK" <D*@discussions.microsoft.com> wrote in message news:DA744B2C-6B3F-4F67-9335-C363D088B954@microsoft.com... > In the UI, there are some optional field but in the DB I want tto store > NULL > instead of empty string. Do I check for empty string for these values in > the > business layer when I am going thru each row in the datatable for Data > Validation. > Thanks DK,
This is a way you can do this in the databindingevents. http://www.vb-tips.com/default.aspx?ID=c4832a2a-2b95-4ded-93d9-4deb7fa4a0b8 I hope this helps, Cor Show quote "DK" <D*@discussions.microsoft.com> schreef in bericht news:DA744B2C-6B3F-4F67-9335-C363D088B954@microsoft.com... > In the UI, there are some optional field but in the DB I want tto store > NULL > instead of empty string. Do I check for empty string for these values in > the > business layer when I am going thru each row in the datatable for Data > Validation. > Thanks |
|||||||||||||||||||||||