i have promblem when using bottom update, when i get data in textbox, this is my code
string uSql;
uSql = "UPDATE Material SET MaterialName='"+txNama.Text+"',MatGroupID='"+cbGroup.Text+"' WHERE MaterialID='"+txKode.Text+"'";
SqlConnection conn = new SqlConnection(connetionString);
SqlCommand comand = new SqlCommand(uSql, conn);
conn.Open();
comand.Parameters.Add(new SqlParameter("@MaterialName", SqlDbType.NVarChar, 50));
comand.Parameters["@MaterialName"].Value = txNama.Text;
comand.Parameters.Add(new SqlParameter("@MatGroupID", SqlDbType.NVarChar, 20));
comand.Parameters["@MatGroupID"].Value = cbGroup.Text;
comand.ExecuteNonQuery();
...
i don't finding statement error from program
best regards,
maartin