BC30451: Name 'IsDBNull' is not declared.
-
Hi, I am using a code behind and am trying to test for a null value using the code below: If Not IsDBNull(objDataReader("PrimaryContactTitle")) Then txtTitle.Text = objDataReader("PrimaryContactTitle") End If If I use the code directly on the aspx page it works fine. When I use it from the code behind it throws up the error: BC30451: Name 'IsDBNull' is not declared. I have imported all what I presume are the relevant namespaces System.Data System.Data.SqlClient I would appreciate any help with this problem Thanks Lee
-
Hi, I am using a code behind and am trying to test for a null value using the code below: If Not IsDBNull(objDataReader("PrimaryContactTitle")) Then txtTitle.Text = objDataReader("PrimaryContactTitle") End If If I use the code directly on the aspx page it works fine. When I use it from the code behind it throws up the error: BC30451: Name 'IsDBNull' is not declared. I have imported all what I presume are the relevant namespaces System.Data System.Data.SqlClient I would appreciate any help with this problem Thanks Lee
Hi Lee, IsDBNull is in the Microsoft.VisualBasic namespace. Marcie http://www.codeproject.com
-
Hi Lee, IsDBNull is in the Microsoft.VisualBasic namespace. Marcie http://www.codeproject.com
Thankyou Marcie