UPDATE query example


	//----- DO QUERY -----
	Command1 = new System.Data.SQLite.SQLiteCommand(Connection1);
	Command1.CommandText = @"UPDATE tblBookLanguages SET
								LanguageText = @LanguageText,
								LanguageImage = @LanguageImage
							WHERE LanguageId = @LanguageId";			
	Command1.Parameters.AddWithValue("@LanguageText", LanguageText);
	if (LanguageImage.Length > 0)
		Command1.Parameters.AddWithValue("@LanguageImage", LanguageImage);
	else
		Command1.Parameters.AddWithValue("@LanguageImage", DBNull.Value);
	Command1.Parameters.AddWithValue("@LanguageId", LanguageId);
				
	Command1.ExecuteNonQuery();

 

Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published.