Error inserting data from textbox to sql database in c# -
when try insert value textbox database, values not being updated in database. newly inserted rows temporarily available, after inserting when use select query rows, new rows available. when close solution , open again, newly insert rows gone. table in database explorer not updated. here code. string connectionstring = @"data source=.\sqlexpress;attachdbfilename=|datadirectory|\database1.mdf;integrated security=true;user instance=true"; string na = textbox1.text; int ag = int.parse(textbox2.text); string ci = textbox3.text; using (sqlconnection connection = new sqlconnection(connectionstring)) { using (sqlcommand insertcommand = connection.createcommand()) { insertcommand.commandtext = "insert address(name,age,city) values (@na,@ag,@ci)"; insertcommand.parameters.addwithvalue("@na", na); ...