oCommand.CommandText = cSQL ' Only add the parameters if we have some If oParameters2.Count > 0 Then For Each oDataParameter In oParameters2 oCommand.Parameters.Add(oDataParameter) Next End If oDataAdapter.SelectCommand = oCommand nResult = oDataAdapter.SelectCommand.ExecuteNonQuery()However, it happens again today. This is executed several times per day. It is the same command coming in from the same class. The error is:
Object reference not set to an instance of an object.The stack trace is:
at System.Data.ProviderBase.DbReferenceCollection.AddItem(Object value, Int32 tag) at System.Data.OleDb.OleDbReferenceCollection.Add(Object value, Int32 tag) at System.Data.ProviderBase.DbConnectionInternal.AddWeakReference(Object value, Int32 tag) at System.Data.OleDb.OleDbConnection.AddWeakReference(Object value, Int32 tag) at System.Data.OleDb.OleDbCommand.PropertiesOnCommand(Boolean throwNotSupported) at System.Data.OleDb.OleDbCommand.InitializeCommand(CommandBehavior behavior, Boolean throwifnotsupported) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at Framework.Framework.Data.SQLUpdate(String tcSQL, Boolean tlUpdate)The SQL command is:
UPDATE MagazineNETSchedule SET ModUser=0,ModDate={^2007/01/05 07:48:32},Hit=? WHERE Numero=?I just can't understand why this is happening at once and works at 99.9% of the time.