cancel
Showing results for 
Search instead for 
Did you mean: 

DBNull

DhirenPatel
Level 3
Hi guys, I'm just wondering if anybody has come across the DBNull issue? When returning data into a collection (via a sql query in my case), I have some null values, the problem I am facing is when I try do anything with that collection I get the "DBNull" error. Has anybody experienced this issue before? TIA
2 REPLIES 2

Anonymous
Not applicable
DBNull means that the record in the database does not contain a value. Have you tried changing your query to not output null values? something like, SELECT Field FROM Table WHERE Not(Field) is null;

John__Carter
Staff
Staff
There isn't a BP value that corresponds to DBNull, so the best policy is to avoid returning DBNull from your query. For example SELECT ColumnThatCannotBeNull1, ISNULL(ColumnThatMightBeNull, '') AS ResultThatWillNotBeNull