I am having a problem with my sql query in c#, basically it\'s inline query with parameters, but when I run it it tells me that parameter 1 or parameter 2 is not there
That is just all kinds of ugly. This could be a lot simpler (even though I'm not sure what SqlHelper does:
using(SqlConnection conn = new SqlConnection(connString))
{
conn.Open();
SqlCommand command = new SqlCommand(InsertStmtUsersTable, conn);
command.CommandType = CommandType.Text;
command.Parameters.Add(new SqlParameter("username", userNameString));
command.Parameters.Add(new SqlParameter("password", passwordString));
command.Parameters.Add(new SqlParameter("email", emailString));
command.Parameters.Add(new SqlParameter("userTypeId", userTypeId));
command.Parameters.Add(new SqlParameter("memberId", memberId));
// Rest of your Parameters here
var result = (int)command.ExecuteScalar();
}