OracleDataTable Problem

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
gute
Posts: 2
Joined: Mon 06 Aug 2007 06:55
Location: Sweden

OracleDataTable Problem

Post by gute » Mon 06 Aug 2007 07:26

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();
}

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 06 Aug 2007 07:46

Please provide me with your table definition.

gute
Posts: 2
Joined: Mon 06 Aug 2007 06:55
Location: Sweden

Post by gute » Mon 06 Aug 2007 19:39

Can you give an mailaddress where I can send you code and tables definitions?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 07 Aug 2007 06:00

Sure. Send it to alexeyi at crlab dot com.

Post Reply