sqlexception was unhandled? [Resolved]

Posted by Sudheep.grandhe under C# on 11/10/2011 | Points: 10 | Views : 1896 | Status : [Member] | Replies : 12
Hi,

it shows the error as sqlexception was unhandled?-Must declare the scalar variable "@invoiceno".

Best,
Sudheep.



Responses

Posted by: Blessyjees on: 11/11/2011 [Member] Bronze | Points: 50

Up
0
Down

Resolved
Hi Sudheep,

I checked your code. I couldn't find any error in that code. Are you getting errors now?

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SheoNarayan on: 11/10/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
This means that your SQL statement has a parameter called "@invoiceno" that you have not added as parameter into SqlCommannd.

Look at below article and see how I have passed @autoId as parameter

http://www.dotnetfunda.com/articles/article1513-how-to-retrieve-data-from-the-database-in-aspnet.aspx

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 11/10/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

currently i am working under windows applications.your post was in asp.net

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 11/10/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi Sudheep,

Sheso's explanation is correct. so you make sure that you are passing the value of parameter through sqlcommand.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 11/10/2011 [Member] Starter | Points: 25

Up
0
Down
HI,

I am passed what ever he said again it shows the same error.

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 11/10/2011 [Member] Bronze | Points: 25

Up
0
Down
Provide your code, attach your class file and form as zip.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 11/10/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

i am unable to upload to the zip format.can you give your mail id through that i will sent to you.please do the needful.

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 11/10/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi,

You can send to blessybaby@gmail.com

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 11/10/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

just now i sent the code and class file.had you receive?

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 11/10/2011 [Member] Bronze | Points: 25

Up
0
Down
hi,

In office I can't check mail. After I reached at home, I will check and sent mail to you.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 11/10/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

thanks for that.if there is any issue in the attachments.please mail me.

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 11/11/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

it's working now.i just declare as int id1;three more issues are there in my project.can you resolve for me.if you are ready to resolve those issues i will send it in zip format.please do the needful.

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response