error in dataset when retreiving it from database

Posted by Saritha.rajeshkumar under C# on 4/28/2011 | Points: 10 | Views : 1228 | Status : [Member] | Replies : 2
iam trying to retreive the data from database to lables using dataset in 3tier architecture.
iam getting the error as Failed to convert parameter value from a String to a Int32.
(i.e in database i have a colum name as Percentage with datatype float.)




Responses

Posted by: Nishithraj on: 4/28/2011 [Member] Bronze | Points: 25

Up
0
Down
Whether you are converting the float to string in the code?

Mark this as answer, if it is.....

With regards
Nishithraj Narayanan

Saritha.rajeshkumar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ndebata on: 4/28/2011 [Member] Starter | Points: 25

Up
0
Down
Hi

Actually the query or stored procedure used to retrieve the dataset Is expecting an interger parameter, but while adding the parameter in data access layer you have written DbType.String , it should be DbType.Int32.



Saritha.rajeshkumar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response