Solved

VB.net error in code while deleting ms access row.

Posted on 2016-10-20
3
36 Views
Last Modified: 2016-11-08
Dim cb As New OleDb.OleDbCommandBuilder(da)
        ds.Tables("Seniors").Rows(inc).Delete()
        da.Update(ds, "Seniors") ' I GET ERROR HERE!
        RefreshNew()
        inc = -1

Error:
 Syntax error (missing operator) in query expression '((id = ?) AND ((? = 1 AND Name IS NULL) OR (Name = ?)) AND ((? = 1 AND Amount(EGP) IS NULL) OR (Amount(EGP) = ?)) AND ((? = 1 AND Quantity IS NULL) OR (Quantity = ?)) AND ((? = 1 AND IG/N IS NULL) OR (IG/N = ?)) AND ((? = 1 AND Notes IS NULL) OR (Notes = '.
0
Comment
Question by:Steve Roseik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 50

Accepted Solution

by:
Gustav Brock earned 250 total points (awarded by participants)
ID: 41852912
You should be able to see, that the last expression is incomplete and without meaning:

    OR (Notes = '.

So correct that.

/gustav
0
 
LVL 28

Assisted Solution

by:Ark
Ark earned 250 total points (awarded by participants)
ID: 41853039
CommandBuilder require primary key. Check if "Seniors" table has a PK.
0
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 41878463
No response from questioneer.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question