Solved

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

Posted on 2016-10-20
3
25 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
  • 2
3 Comments
 
LVL 49

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 27

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 49

Expert Comment

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

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

808 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