L
Latinneo
I receive the following error when I try to select data rows from a
data table in c# using the method DataTable.Select....
Exception:
Object reference not set to an instance of an object.
Stack:
System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. --->
System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Data.Select.FindClosestCandidateIndex()
at System.Data.Select.SelectRows()
at System.Data.DataTable.Select(String filterExpression, String
sort)
at CustomControls.SystemControl.InitializeComponent() in
C:\WebProjects\CommonProjects_Solution\CustomControls\SystemControl.cs:line
81
at CustomControls.SystemControl.OnInit(EventArgs e) in
C:\WebProjects\CommonProjects_Solution\CustomControls\SystemControl.cs:line
60
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain()
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)
The application is multi-threaded and reads the same data from
multiple threads, but no modification is made to the data. According
to the MSDN DataTable is thread-safe when reading.
This error does not always occur, it seems like there is some
threading problem with the DataTable... Has anyone experienced similar
behaviour? Any help or idea's will be really appreciated!
data table in c# using the method DataTable.Select....
Exception:
Object reference not set to an instance of an object.
Stack:
System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. --->
System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Data.Select.FindClosestCandidateIndex()
at System.Data.Select.SelectRows()
at System.Data.DataTable.Select(String filterExpression, String
sort)
at CustomControls.SystemControl.InitializeComponent() in
C:\WebProjects\CommonProjects_Solution\CustomControls\SystemControl.cs:line
81
at CustomControls.SystemControl.OnInit(EventArgs e) in
C:\WebProjects\CommonProjects_Solution\CustomControls\SystemControl.cs:line
60
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain()
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)
The application is multi-threaded and reads the same data from
multiple threads, but no modification is made to the data. According
to the MSDN DataTable is thread-safe when reading.
This error does not always occur, it seems like there is some
threading problem with the DataTable... Has anyone experienced similar
behaviour? Any help or idea's will be really appreciated!