Dataset not updating database vb net

Close(); } protected void Grid View1_Row Editing(object sender, Grid View Edit Event Args e) { Grid View1. New Edit Index; Fill Gv(); } protected void Grid View1_Row Updating(object sender, Grid View Update Event Args e) { string text1 = ((Text Box)Grid View1. Once I checked Is Post Back in Row Updating event..

dataset not updating database vb net-13dataset not updating database vb net-60dataset not updating database vb net-76

To String() + "'"; cmd = new Sql Command(d Command , conn); conn. Edit Index = -1; Fill Gv(); } private void Bind Updated(string Query) { conn. Data Bind(); } } protected void Grid View1_Row Cancelling(object sender, Grid View Cancel Edit Event Args e) { Grid View1. ' I am marking this also as answer,,let other less understanding guys like me benefit..

Close(); Fill Gv(); } protected void Grid View1_Row Canceling Edit(object sender, Grid View Cancel Edit Event Args e) { Grid View1. Yes it is IF NOT Is Post Back, HAHAHAHA I am a more familier with VB ..missed to read that '!

Every once in awhile, you come across this exception: System.

Dear All, In Row Updating event of a Grid View I am trying to update the database picking the values of bound text Boxes in the Edit Item Templates. I confirmed update works by giving some other text vlaues instead of those retrieved from TB1, TB2, and TB3.

But Values retrieved from the tex Boxes are old values (not the newly typed in values in Edit mode) So in effect no updating is happening.

Tell me where I have gone wrong and Please suggest some ways to fix this problem. protected void Grid View1_Row Updating(object sender, Grid View Update Event Args e) { string text1 = ((Text Box)Grid View1. Open(); using (Sql Command comm = new Sql Command(Query + "SELECT * From My Table", conn)) { Sql Data Adapter da = new Sql Data Adapter(comm); Data Set ds = new Data Set(); da. Anyway I will check it and sort it out tell you Here is my defaukt1code. (may be some omissions happehed while cut/paste) //default1cs using System; using System. Edit Index = -1; Bind GV(qry); } private void Bind GV(string Query) { string connectionstring = Configuration Manager. Connection String; using (Sql Connection conn = new Sql Connection(connectionstring)) { conn. Here, when click Edit button on "C" row, and modified values from f1C to f1CXX; and in the rowupdating method, it is getting f1CXX only... I am getting some problems in the code you posted aslo. To String(); string qry = "UPDATE Mytable SET Field1 = '" + text1 + "', Field2 ='" + text2 + "', Field3 ='" + text3 + "' WHERE (IDField ='" + Wherekey + "')"; Grid View1. I checked your code, it is working very good; below example of the code I used here... Configuration; public partial class _Default1 : System. Open(); sql Cmd = new Sql Command(SQL, conn); Reader = sql Cmd. Page { Sql Connection conn = new Sql Connection (Configuration Manager. Connection String); Sql Data Adapter ad = new Sql Data Adapter(); Sql Command cmd = new Sql Command(); Data Table data Table; Sql Data Reader my Reader; protected void Page_Load(object sender, Event Args e) { Fill Gv(); } private void Fill Gv() { string SQL = null; Sql Command sql Cmd = default(Sql Command); Sql Data Reader Reader = default(Sql Data Reader); SQL = "SELECT * From My Table"; conn.