P
Peter Krikelis
Hi,
I wrote a class in the same namespase as my whole project
and in few forms I am trying to use methods that are
implemented in that class. In one form it works perfectly
and when I am trying to call methods in other forms this
error is generated:
" An unhandled exception of
type 'System.NullReferenceException' occurred in
namespace.exe
Additional information: Object reference not set to an
instance of an object. "
public class myClass()
{
public myClass(){}
public void addRecord(string[] a,
System.Data.OleDb.OleDbDataAdapter dAdapter,
System.Data.DataSet dataSet, string dtName)
{
--> System.Data.DataRow newRo = dataSet.Tables
[dtName].NewRow
...
}
}
Error is generated at the line specified by -->
Plese tell me what I am doing wrong
Thanks.
Pete
I wrote a class in the same namespase as my whole project
and in few forms I am trying to use methods that are
implemented in that class. In one form it works perfectly
and when I am trying to call methods in other forms this
error is generated:
" An unhandled exception of
type 'System.NullReferenceException' occurred in
namespace.exe
Additional information: Object reference not set to an
instance of an object. "
public class myClass()
{
public myClass(){}
public void addRecord(string[] a,
System.Data.OleDb.OleDbDataAdapter dAdapter,
System.Data.DataSet dataSet, string dtName)
{
--> System.Data.DataRow newRo = dataSet.Tables
[dtName].NewRow
...
}
}
Error is generated at the line specified by -->
Plese tell me what I am doing wrong
Thanks.
Pete