• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

I got the following database Exception

     "Syntax error (missing operator) in query expression '( ((? IS NULL AND 0Itemno IS NULL) OR (0Itemno = ?)) AND ((? IS NULL AND 1Band IS NULL) OR (1Band = ?)) AND ((? IS NULL AND 2Taklefa IS NULL) OR (2Taklefa = ?)) AND ((? IS NULL AND 3nashat IS NULL) OR (3nashat = ?)) AND ((? IS NULL AND 4value IS NULL) OR '."      

when using the following code when update or delete a record
dest.Update(ds,"youmia");
the table youmia

0Item_no int
1Band      int
2Taklefa  int
3nashat  int
4value    double
5date    datetime

please what is the problem
0
hema3i
Asked:
hema3i
  • 2
1 Solution
 
Bob LearnedCommented:
OR '."  at the end?

Bob
0
 
sendmeblahCommented:
TheLearnedOne is correct the single quote is the cut-off to the expression.  It looks like the statement ends with and there the open parentheses at the beginning of the statement that does not look satisfied.
0
 
hema3iAuthor Commented:
but where's the problem in my c# Code i only use

dest.Update(ds,"youmia");
 
i don't write the sql statment ,does the problem in the name of the fields like
"0Item_no","4value"
0
 
Bob LearnedCommented:
Was the SQL statement generated by the wizard?  If so, there are a few bugs with the code it generates.  You will have to manually fix the SQL yourself.  

The DataAdapter uses the SQL for the DeleteCommand, InsertCommand, SelectCommand, and UpdateCommand to perform all the necessary operations for database operations.

Bob
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now