Ask a Question related to ASP.NET General, Design and Development.
-
Boris Zakharin #1
Updating a DataAdapter, DataGrid after changing the database
I currently have a page which displays data in a DataGrid from a DataSet
filled by an OleDbDataAdapter. It also has buttons to carry out events which
should cause the grid contents to change (either a row is deleted or it is
changed so that the criteria of the select query no longer apply). However,
the grid does not change unless I explicitly reload the page using
Response.Redirect(Request.Url.AbsoluteUri) and I'm sure that could cause
unwanted side effects.
The current code is as follows:
oleDbConnection1.Open();
OleDbCommand cmdApp = new OleDbCommand("DELETE FROM jobs WHERE job_id =
?", oleDbConnection1);
cmdApp.Parameters.Add("job_id",
int.Parse(DataGrid1.DataKeys[e.Item.ItemIndex].ToString()));
cmdApp.ExecuteNonQuery();
oleDbConnection1.Close();
oleDbDataAdapter1.Fill(dsJobs21);
DataGrid1.DataBind();
Can anyone tell me what I'm doing wrong here?
Thanks,
Boris Zakharin
Boris Zakharin Guest
-
updating flash from a dynamically changing XML file
Creating a non-interactive status display: I want to have the flash display reflect data in a server-based XML-file. So far this is easy. But I want... -
can i use dynamic variable inside a dataadapter and bind to datagrid
Hi I want to use a sql designed in the dataadapter and I want to pass a variable so it can retrieve related data by using "WHERE" clause in the... -
Updating database records in a datagrid
In a datagrid, I read that you cannot add validation controls to the textboxes, you want to update, because they are using BoundColumns. I want to... -
Datagrid not updating database
I am using a dropdown box to query a database and populate a datagrid. Everything works except the update button. When the update button is... -
Updating database through a datagrid using checkboxes
I need to update items in a database queue, so I am attempting to write a ASP.NET utility to do this instead of the users just typing SQL. I am...



Reply With Quote

