OracleDataTable Problem

OracleDataTable Problem

Postby 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"] = "x.yl@z.w";
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"] = "x.yl@z.w";
DataTable _changes = odtMail.GetChanges(DataRowState.Modified);
if (_changes.Rows.Count > 0)
{
odtMail.Update();
odtMail.Connection.Commit();
}
gute
 
Posts: 2
Joined: Mon 06 Aug 2007 06:55
Location: Sweden

Postby Alexey » Mon 06 Aug 2007 07:46

Please provide me with your table definition.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby gute » Mon 06 Aug 2007 19:39

Can you give an mailaddress where I can send you code and tables definitions?
gute
 
Posts: 2
Joined: Mon 06 Aug 2007 06:55
Location: Sweden

Postby Alexey » Tue 07 Aug 2007 06:00

Sure. Send it to alexeyi at crlab dot com.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for Oracle