TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Administrator
Tech Writer
2.2k
1.5m
Trouble with OleDbCommand Parameters...
Mar 29 2003 1:14 PM
I can get the following to work as desired by adding a new parameter to my oledbcommand and assigning an appropriate value. [code] string strSumScalar = "SELECT SUM(extPrice) FROM mflynn_software WHERE (mfg = ?)"; [/code] However, things fall apart when I add a little complexity as follows: [code] string strSumScalar = "SELECT SUM(?) FROM mflynn_software WHERE (mfg = ?)"; [/code] I add two new parameters, to the oledbcommand, in the order in which the '?' appear in the CommandText. I assign "extPrice" to the value of the first parameter and the same value to the second parameter that worked in the sample above. When using the executeScalar() method that worked with one parameter, I get an exception error: System.Data.OleDb.OleDbException: Data type mismatch in criteria expression Any ideas on what I am doing wrong?
Reply
Answers (
1
)
Problem with passing large amount of data through Web Service
Handling null values