aliya ahmed

aliya ahmed

  • NA
  • 5
  • 0

data not inserted in sql database

Sep 24 2009 3:05 PM
hi! I am trying to insert data from textboxes in sql server 2005 database using dataset(table adapters) in c# windows application I have made two tables in my database i.e. product and country table. In country table adapter i add query of insert and execute there and its working correctly but when i m using textboxes to insert data in tables, it not works and even not giving any errors or exceptions. plz help me out! herez the code, private void button1_Click(object sender, EventArgs e) { DataSet1TableAdapters.countryTableAdapter cta = new WindowsApplication4.DataSet1TableAdapters.countryTableAdapter(); DataSet1.countryDataTable ctbl = new DataSet1.countryDataTable(); cta.Insertdata(textBox1.Text, textBox2.Text); }

Answers (5)