Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BtnSave (MM and bound) does not save
Message
De
26/04/2006 15:32:55
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
 
À
26/04/2006 14:16:13
Stan Blatti
Shelby Residential & Vocational Services
Memphis, Tennessie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01116676
Message ID:
01116822
Vues:
15
Looks like this is a SQL exception being caught by .NET

I would suggest adding a breakpoint early in the SaveDataSet() method -- and then again just before the DbDataAdapter.Update call -- to check on the data values .NET is planning to send back to SQL. If you google the error text, you'll find that there are some special conditions (aggregate functions, etc.) that can erroneously throw an exception, but I'm not sure that applies in your case.

---J

>Hi Jason:
>Thanks for the reply.
>The 3 cycles takes place on object instantiation, not the save process.
>I have tried adding code to the btnSave: either Me.Save() or dim result as
>...mmDataResult = MyObject.SaveDataSet(MyDS). In either case it runs code to check
>for broken rules on the parent and child objects, once for the btnSave event and once
>for the added code. It seems to update several fields okay but not the sql server, \
>ntext field. So I changed the field to nvarchar 300, refreshed the data links, readded
>the table to the typed dataset. But I still get the same error with no update of this field.
>Here is the error trace stack:
> at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
> at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
> at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
> at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
> at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable)
> at OakLeaf.MM.Main.Data.mmDataAccessSql.SaveDataSet(DataSet ds, String tableName, String primaryKeyName, Boolean retrieveAutoIncrementPK, IDbDataAdapter dbAdapter)
> at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName, String databaseKey, IDbDataAdapter dbAdapter)
> at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName, String databaseKey)
> at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName)
> at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(String tableName, Int32 currentRow)
> at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.Save(mmBusinessObject bizObj, String tableName)
> at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.Save(mmBusinessObject bizObj)
> at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.AskSaveChanges(mmBaseBusinessObject bizObj)
> at OakLeaf.MM.Main.Windows.Forms.mmBusinessBaseForm.AskSaveChanges()
> at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.NavigateData(mmNavigate navPosition, Boolean raiseEvents)
> at OakLeaf.MM.Main.Windows.Forms.mmBusinessBaseForm.NavigateData(mmNavigate navPosition)
> at OakLeaf.MM.Main.Windows.Forms.mmNavigationToolStrip.mmNavigationToolStrip_ItemClicked(Object sender, ToolStripItemClickedEventArgs e)
> at System.Windows.Forms.ToolStrip.OnItemClicked(ToolStripItemClickedEventArgs e)
> at System.Windows.Forms.ToolStrip.HandleItemClick(ToolStripItem dismissingItem)
> at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
> at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
> at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
> at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
> at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
> at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
> at System.Windows.Forms.ToolStrip.WndProc(Message& m)
> at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
> at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
> at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
> at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
> at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
> at System.Windows.Forms.Application.Run(Form mainForm)
> at SRVS.EvaluationSystem.AppMainEntry.Main() in C:\AppsDev\MM .Net SRVS\Employee Evaluation System VB\Employee Evaluation System VB\Main.vb:line 37
>In several other places in the app, I have replaced mmCRUD Btns with mmBtn and
>added my own code and everything works. But I wanted to see if I could get this
>mmBtnSave to work.
>Thanks!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform