Error BD Access VB .Net. RRS feed

  • Question

  • Que tal amigos del foro de soporte, reciban un cordial saludo, resulta que tengo un formulario un datagridview desde donde quiero actualizar datos a una BD Access, cuando quiero actualizar me presenta el siguiente error:

    System.Data.OleDb.OleDbException was unhandled
      Message=Error de sintaxis en la instrucción UPDATE.
      Source=Microsoft Access Database Engine
           en System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
           en System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
           en System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
           en System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
           en System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
           en WindowsApplication1.Editar_propiedades.Button7_Click(Object sender, EventArgs e) en C:\Users\UNNUS\Desktop\Módulo de propiedades, arrendamientos y cartera\WindowsApplication1\Editar_propiedades.vb:línea 183
           en System.Windows.Forms.Control.OnClick(EventArgs e)
           en System.Windows.Forms.Button.OnClick(EventArgs e)
           en System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
           en System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
           en System.Windows.Forms.Control.WndProc(Message& m)
           en System.Windows.Forms.ButtonBase.WndProc(Message& m)
           en System.Windows.Forms.Button.WndProc(Message& m)
           en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           en System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
           en System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
           en System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           en System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
           en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
           en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
           en WindowsApplication1.My.MyApplication.Main(String[] Args) en :línea 81
           en System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
           en System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           en Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           en System.Threading.ThreadHelper.ThreadStart()

    Agradecería su ayuda, saludos.

    Thursday, February 15, 2018 5:04 AM

All replies

  • Hi Julian3334,

    Here is an English forum, please describe your issue using English.

    You just provide error message here, I can not know what you want to , can you please provide some code here and tell me where do you encounter this error message.

    It is helpful for us to analyze your issue and provide better help.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, February 15, 2018 6:16 AM
  • Julian,

    There is also a Spanish forum for VB for .Net but therefore you need a Spanish setting on your computer with these Microsoft forums so I cannot give you a link. 


    Thursday, February 15, 2018 8:52 AM
  • Hello,

    We need to see your Update command statement for the DataAdapter as the error message indicates there is a syntax issue with the UPDATE statement.

    Common issues, not having a auto incrementing primary key, invalid column names, apostrophes not escaped. But I can't tell you the issue without knowing more and you need to write your reply in English.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Thursday, February 15, 2018 11:22 AM