Hi there
I have an error when I'm trying to insert a record into a SQL Server
Database.
The problem is inserting an integer. I have dropdownlist which displays
the CompanyName from one table and I want to insert their cmsId (an
integer) into another table. I have set the DataTextField of the
dropdownlist to be the CompanyName and the DataValueField to be their
cmsID (an integer).
I keep getting the following error message "Input string was not in a
correct format." What does this mean? It's being mistaken for a string
instead of an integer? How do I fix it?
If I hardcode the integer into the SQL statement instead of using a
parameter (see below), there is no problem at all.