The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Are empty strings stored as nulls in the database?

Last post 05-31-2007, 3:53 PM by David.Parsons. 0 replies.
Sort Posts: Previous Next
  •  05-31-2007, 3:53 PM 2951

    Are empty strings stored as nulls in the database?

    "Are empty strings stored as nulls in the database?  In Doodads this was the case (when I was used it last year). I was just curious if this is also the case with Entity spaces or does it now store an empty string in the database on insert and updates."

    In EntitySpaces, after running the code below, and assuming the db allows nulls for the column, LastName will be an empty string and FirstName will be null.

    Code:
    Employees emp = new Employees();
    emp.LastName = "";
    emp.FirstName = null;
    emp.Save();

    David Neal Parsons
    www.entityspaces.net
View as RSS news feed in XML