Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 2nd, 2006, 02:25 PM
kim kim is offline
Registered User
Join Date: Mar 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default update sql

i use this code to update the data in my databae , but i get error

this is the code

Private Sub StokBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StokBindingNavigatorSaveItem.Click

    End Sub

The error

System.InvalidOperationException was unhandled
  Message="Voor het bijwerken is een geldige UpdateCommand vereist wanneer een DataRow-verzameling wordt doorgegeven met gewijzigde rijen."
       bij System.Data.Common.DbDataAdapter.UpdatedRowStatusE rrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
       bij System.Data.Common.DbDataAdapter.UpdatedRowStatus( RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
       bij System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
       bij System.Data.Common.DbDataAdapter.UpdateFromDataTab le(DataTable dataTable, DataTableMapping tableMapping)
       bij System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
       bij Cataloog.Database1DataSetTableAdapters.stokTableAd apter.Update(stokDataTable dataTable) in C:\Documents and Settings\kim\Mijn documenten\Visual Studio 2005\Projects\Cataloog\Cataloog\Database1DataSet.D esigner.vb:regel 742
       bij Cataloog.stok.StokBindingNavigatorSaveItem_Click(O bject sender, EventArgs e) in C:\Documents and Settings\kim\Mijn documenten\Visual Studio 2005\Projects\Cataloog\Cataloog\stok.vb:regel 6
       bij System.Windows.Forms.ToolStripItem.RaiseEvent(Obje ct key, EventArgs e)
       bij System.Windows.Forms.ToolStripButton.OnClick(Event Args e)
       bij System.Windows.Forms.ToolStripItem.HandleClick(Eve ntArgs e)
       bij System.Windows.Forms.ToolStripItem.HandleMouseUp(M ouseEventArgs e)
       bij System.Windows.Forms.ToolStripItem.FireEventIntera ctive(EventArgs e, ToolStripItemEventType met)
       bij System.Windows.Forms.ToolStripItem.FireEvent(Event Args e, ToolStripItemEventType met)
       bij System.Windows.Forms.ToolStrip.OnMouseUp(MouseEven tArgs mea)
       bij System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       bij System.Windows.Forms.Control.WndProc(Message& m)
       bij System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
       bij System.Windows.Forms.ToolStrip.WndProc(Message& m)
       bij System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
       bij System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
       bij System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       bij System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
       bij System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       bij System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
       bij System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
       bij System.Windows.Forms.Application.Run(ApplicationCo ntext context)
       bij Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
       bij Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
       bij Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[] commandLine)
       bij Cataloog.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:regel 81
       bij System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       bij System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       bij Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
       bij System.Threading.ThreadHelper.ThreadStart_Context( Object state)
       bij System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
       bij System.Threading.ThreadHelper.ThreadStart()

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
C# Sql dynamic update N4th C# 2005 0 December 20th, 2006 09:05 AM
Update SQL problem Teon ASP.NET 1.0 and 1.1 Basics 5 September 19th, 2005 09:55 AM
SQL update records topshed Classic ASP Components 5 September 9th, 2003 09:48 AM
how do I execute an SQL update chrisangus@btinternet.com VB How-To 1 June 22nd, 2003 06:50 AM
Update sql dhborchardt Classic ASP Databases 1 June 10th, 2003 10:06 AM

All times are GMT -4. The time now is 08:23 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.