Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2016-10-20
3
Medium Priority
?
43 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 51

Accepted Solution

by:
Gustav Brock earned 1000 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 1000 total points (awarded by participants)
ID: 41853039
CommandBuilder require primary key. Check if "Seniors" table has a PK.
0
 
LVL 51

Expert Comment

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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

721 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