Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to bind asp:CheckBox to MySql table?

Status
Not open for further replies.

ross1228

Programmer
Oct 20, 2006
14
US
We're having issues bind an asp:checkbox to a mysql table. We've got far enough to retrieve the value and set the checked value of the checkbox, but when we try to update our mysql table it say's we cannot convert from type 'bool' to type 'string'. And if we try to insert a string it say's the input type is not correct.

Any suggestions?
 
Do you get exactly the same error if the type is boolean or bit? I can't see how the conversion to a string would be a valid error from the database so it must be something in your code.

Can you provide the code to create the MySQL table, the stored procedure code for the update, and the .NET code to perform the update?


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top