C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Doubt in the update query.


Posted Date: 09 Aug 2008      Total Responses: 1

Posted By: Arun Gandhi       Member Level: Gold     Points: 1


Hi I am getting this error when i execute these below lines.

uf.Getdata("Select id from itemslist where totalprice='" + name + "'", out outuserid);
sql = "Update itemslist set totalprice=('" + Convert.ToString(Convert.ToInt32((TextBox)gr.FindControl("totaltxt").Text.Trim()) * Convert.ToInt32((TextBox)gr.FindControl("qtytxt1").Text.Trim()) + "'),";
sql = sql + " qty='" +((TextBox)gr.FindControl("qtytxt1")).Text.Trim() + "' ";
sql = sql + "where ID=" + Convert.ToInt32(outuserid) + " ";

Can any one help me.

Thank you.





Responses

Author: Siva Sankari.R    09 Aug 2008Member Level: GoldRating:     Points: 3
Hi,

you just do the convert option outside of the update query
by

int a = Convert.ToInt32((TextBox);
string b = Convert.ToString(a);

and you just pass the string "b".
I think this is error resolution

regards,
Sankari.



Post Reply
You must Sign In to post a response.
Next : How to insert for button click event
Previous : accesing gridview's cell value in selectindexchanging event
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use