C # is case sensitive ... Try using intellisense.
SqlDbType
Other errors may disappear if you correct the first one.
On the other hand, you will encounter connection / memory leaks without proper resource handling. Personally, I use the using statement to avoid errors.
I'm not quite sure what the "DatabaseConnector" is, maybe your own class, but you should probably use SqlConnection , or maybe SqlDatabase .
Update: I'm not sure if the DBConnector class should be singleton or factory, or both, so I just simplified my answer to avoid using it. Ask another question with details on how to create the template you are looking for and provide the DBConnector class. I think it’s possible, but I just don’t have enough information to fix what you have.
public static CONN_STR = "Data Source=lernlap;Initial Catalog=ERPSystemDB;User ID=sa;Password=sa123"; protected void btn_edit_Click(object sender, EventArgs e) { using(SqlConnection con = new SqlConnection(CONN_STR)) { con.Open(); using(SqlCommand cmd = new SqlCommand("UPDATE tbl_BinCardManager SET ItemName = @ItemName WHERE ItemNo = @ItemNo"), con) {
Chris gessler
source share