C# Programming
09-23-2009, 04:11 PM
Please can anyone help with:-
1 How to structure the strSelect statement.
2 How to instruct the cn, da, cb, tb etc to go and get on with it.
private void btnSaveAllChangesMadeToAllLogsSoFar_Click(object sender, EventArgs e)
{
string strSelect = "UPDATE INTO dbo.tblQLs WHERE colErrByUserID = '" +
LoginForm.gb_strUserID + "' ";
SqlConnection cn = new SqlConnection(LoginForm.gb_strConnection);
SqlDataAdapter daTblQLs = new SqlDataAdapter(strSelect, LoginForm.gb_strConnection);
SqlCommandBuilder cb = new SqlCommandBuilder(daTblQLs);
cb.GetUpdateCommand();
daTblQLs.Update(gl_Dataset.ds, "tblQLs");
cn.Close();
}
Thank you for your help.
Mark
1 How to structure the strSelect statement.
2 How to instruct the cn, da, cb, tb etc to go and get on with it.
private void btnSaveAllChangesMadeToAllLogsSoFar_Click(object sender, EventArgs e)
{
string strSelect = "UPDATE INTO dbo.tblQLs WHERE colErrByUserID = '" +
LoginForm.gb_strUserID + "' ";
SqlConnection cn = new SqlConnection(LoginForm.gb_strConnection);
SqlDataAdapter daTblQLs = new SqlDataAdapter(strSelect, LoginForm.gb_strConnection);
SqlCommandBuilder cb = new SqlCommandBuilder(daTblQLs);
cb.GetUpdateCommand();
daTblQLs.Update(gl_Dataset.ds, "tblQLs");
cn.Close();
}
Thank you for your help.
Mark