Page 1 of 1

OracleDataTable Problem

Posted: Mon 06 Aug 2007 07:26
by gute
Calling update after changes to a OracleDataTable throws an NullReferenceException Message="Object reference not set to an instance of an object."

VS2005.
OraDirect .net: 3.55.23.0
Oracle 10.

Insert Example:
DataRow _row = odtMail.NewRow();
_row["EMAILADDRESS"] = "[email protected]";
odtMail.Rows.Add(_row);
DataTable _changes = odtMail.GetChanges(DataRowState.Added);
if (_changes.Rows.Count > 0)
{
odtMail.Update();
odtMail.Connection.Commit();
}

Update Example:
DataRow _row = odtMail.Rows[0];
_row["EMAILADDRESS"] = "[email protected]";
DataTable _changes = odtMail.GetChanges(DataRowState.Modified);
if (_changes.Rows.Count > 0)
{
odtMail.Update();
odtMail.Connection.Commit();
}

Posted: Mon 06 Aug 2007 07:46
by Alexey
Please provide me with your table definition.

Posted: Mon 06 Aug 2007 19:39
by gute
Can you give an mailaddress where I can send you code and tables definitions?

Posted: Tue 07 Aug 2007 06:00
by Alexey
Sure. Send it to alexeyi at crlab dot com.