Afternoon all,
I'm pulling my hair out here, I have 2 completely seperate servers both set up with MS SQL 2008 R2. Think of them as testserver1 & testserver2. I have a test database (as far as I can tell identically) setup on them both.
Employees table consists of:
EmpID Int notnull primarykey
Branch varchar(20) null
FirstName varchar(20) null
SurName varchar(20) null
Employees Table Data consists of:
EmpID Branch FirstName Surname
1000 London Jane Doe
1001 London John Smith
1002 null Dan Brown
So, from SSMS if you execute 'SELECT * FROM Employees' you
get exactly what you'd expect:
EmpID Branch FirstName Surname
1000 London Jane Doe
1001 London John Smith
1002 null Dan Brown
Right, here is where it gets rather odd... I have a small VB.NET application I wrote which displays the above table. If i run it on testserver1 i get:
EmpID Branch FirstName Surname
1000 London Jane Doe
1001 London John Smith
1002 null Dan Brown
However if i run it on testserver2 i get:
EmpID Branch FirstName Surname
1000 London Jane Doe
1001 London John Smith
After a bit of testing testserer2 completely ignores which ever record has a 'null' branch. If I have a null value for either firstname or surname its fine with that, its only the 'Branch' field it doesn't like being 'null'.
Can anyone shed any rhyme or reason as to this odd behavour...?
Thanks
Dave