Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dataset has been lost
Message
From
05/01/2007 15:31:12
 
 
To
05/01/2007 13:59:24
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:
01182962
Views:
16
Something with your parameters maybe?

~~Bonnie


>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.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform