Click here to Skip to main content
14,970,019 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI,

I am getting exception as syntax error for the below statement.

Dim partNums As DataRow()
partNums =BoxTable.Select("ORDER_ID =" + odrRow.Item("ORDER_ID").ToString +"RowNum<=1")


Run-time exception thrown : System.Data.SyntaxErrorException - Syntax error: Missing operand after 'RowNum' operator.	


There are 12 rows in that boxtable, i am trying to retrive only 1 row by adding ROWNUM<=1, but it's giving above run time exception.
wat's the error in the above code

Thanks In Adance.
Subhash G.
Posted
Updated 20-Sep-11 0:36am
v2
Comments
Toniyo Jackson 20-Sep-11 3:05am
   
What is the error?
subhash04573 20-Sep-11 6:37am
   
i updated my question. Can you have a look into the quey once.
hitech_s 20-Sep-11 4:13am
   
plz name the error then anyone can try or understand your problem..
subhash04573 20-Sep-11 6:37am
   
i updated my question. Can you have a look into the quey once.

1 solution

If this the exact code used and without knowing the exact error, I would say the problem is with the missing space before the AND statement in the last string.
   
Comments
subhash04573 20-Sep-11 7:01am
   
i updated my question. Can you have a look into the quey once.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900