nulls

How to architect DAL for WebService exposure?

We have a highly specialized DAL which sits over our DB. Our apps need to use this DAL to correctly operate against this DB. The generated DAL (which sits on some custom base classes) has various 'Rec' classes (Table1Rec, Table2Rec) each of which represents the record structure of a given table. Here is a sample Pseudo-class... Public...

Updating, Foreign Key Constraints and nulls

I am generating a data template in C#. With the help of the good people on this wonderful site, I've managed to take care of almost every issue. This should be the last problem. Because it's a template I'm working on, I want every field in the table, including nulls. I was helped on how to update nulls by adding (object)this.field ?? DBN...

SQL Date pattern for dates that user may not know all the information

You system allows new users to register and enter their wedding date. Being a purist, I wanted to store this as a date. After user interviews, it was clear that the reality differs from this approach. Users are often not sure of the day or the month, and wish to store partial dates, so "June 2009" or "sometime in 2012". Does anyone know...

SQL: how to know if a field has "Allow nulls" checked or not checked by SQL command

Hi, I want to know which table's field are required or not required so I have to get "Allow nulls" state. How to do that? ...

SQLDataReader: Dealing with null values

Some tables I am dealing with have null values and are throwing errors. So far ive tried a few solutions to deal with the nulls with no success. Here are the code samples from my efforts so far; If (r("datemodified").Equals(DBNull.Value)) Then datemodified = String.Empty Else datemodified = (...

How to remove nulls from byte array?

For some reason, the byte array output of BeginReceive fills up with nulls and then the data. BeginReceive: AsyncResult = connectSocket.BeginReceive(RecvBuffer2, 0, RecvBuffer2.Length, SocketFlags.None, OnDataRe...