hello everybody
i'm newbie in C#, and i have a big problem that i can't resolve on my own.
the situation is i have these:
and here comes my big question:
how can i pass this row to an other form, where the user can change the client's datas, and then pass back to this form's dataset, so i can update it in the database. but it's very very important to do this the least memory allocation.
can anybody help me with this?
regards
i'm newbie in C#, and i have a big problem that i can't resolve on my own.
the situation is i have these:
Code:
public partial class frmClients : Form
{
public SQLiteDataAdapter daClients;
public DataSet DS=new DataSet();
public int rowID;
...
// on form_load daClients gets the datas from the database
// and then get a new dataset, because we don't wanna display all the columns in a DataGrid
DataSet dsListed=new DataSet();
SQLiteDataAdapter daC = new SQLiteDataAdapter("select id,companycode as Code, name as Name, deleted as Deleted from clients", daClients.SelectCommand.Connection);
// popultae the DataGrid with, filtred by the FieldName
daC.Fill(dsListed,"clients");
dataGrid1.SetDataBinding(dsListed, "clients");
// I have a method to determinate the selected ID, using the DataGrid1.CurrentRowIndex, and passing to the rowID the "id" column's value
// so until thIs it works everything fine, if i hit an update button with the following code,
daClients.Update(DS);
// it updates the database
// i understood everything until this point
// i can access the client's data by DS.Tables["clients"].Rows[rowID]
}
how can i pass this row to an other form, where the user can change the client's datas, and then pass back to this form's dataset, so i can update it in the database. but it's very very important to do this the least memory allocation.
can anybody help me with this?
regards