Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dataset has been lost
Message
From
05/01/2007 13:59:24
 
 
To
03/01/2007 13:49:05
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01181685
Message ID:
01182922
Views:
17
This is the new approach:
                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.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform