Solved

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

Posted on 2016-10-20
3
15 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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now