VB.net Coding Problem
Posted on 2011-10-11
I have this set of VB code which fails if there is no data retrieved for a record in SQL. It calls an:
Object reference not set to an instance of an object.
The data(0) is an array and it works fine if their is data, but throws the error if the data is blank. How can I wrap an is nothing clause around this code to prevent errors from throwing if the data array is nothing.
Dim Cube_height As Exact.Web.UI.Controls.InputField
Cube_height = BuildFields.BuildInputField("CSItemscube_height", False, Data(0), "", False)