Are there any gurus out there that might be able to help me figure this out? I keep throwing this exception in C#, but everything that I can see seems to be correct. Here is the code
public bool Insert(loginBLL u)
{
bool isSuccess = false;
SqlConnection conn = new SqlConnection(myconnstrng);
try
{
String sql = "INSERT INTO customers (firstname, lastname, phone, email, address, city, state, zipcode, password, username) VALUES (@firstname, @lastname, @phone, @email, @address, @city, @state, @zipcode, @password, @username)";
SqlCommand cmd = new SqlCommand(sql, conn);
cmd.Parameters.AddWithValue("@firstname", u.firstname);
cmd.Parameters.AddWithValue("@lastname", u.lastname);
cmd.Parameters.AddWithValue("@phone", u.phone);
cmd.Parameters.AddWithValue("@email", u.email);
cmd.Parameters.AddWithValue("@address", u.address);
cmd.Parameters.AddWithValue("@city", u.city);
cmd.Parameters.AddWithValue("@state", u.state);
cmd.Parameters.AddWithValue("@zipcode", u.zipcode);
cmd.Parameters.AddWithValue("@password", u.password);
cmd.Parameters.AddWithValue("@username", u.username);
conn.Open();
int rows = cmd.ExecuteNonQuery();