G
Guest
Hi
I have the following hardcoded the following (only the relevant code is
shown),
to populate a datagrid. The data loads into the grid as expected
private void LoadData()
{
//THIS CODE WORKS FINE - within this eventhandler
and the dataset and dataadapter are availible in the intellisense
// Dataset dsModify = New Dataset();
// SqlDataAdapter daModify = new SqlDataAdapter();
}
private void btnModify_Click(object sender, System.EventArgs e)
{
//Accept user changes
// PROBLEM - the dsModify and daModify are not availible in intellisense
to allow modifications to be pushed through to the database
// Errors generated are :
1) The type or namespace daModify could not be found
are you missing a using directive or an assembly reference"
2) The name dsModify does not exist in the <class>.<form>
}
I have attempted to put the following code into the public class of the form
private System.Data.SqlClient.SqlDataAdapter daModify
and get an error saying that daModify is never used - however it is used in
LoadData()
Any assistance would be appreciated
Thanks
Christopher
I have the following hardcoded the following (only the relevant code is
shown),
to populate a datagrid. The data loads into the grid as expected
private void LoadData()
{
//THIS CODE WORKS FINE - within this eventhandler
and the dataset and dataadapter are availible in the intellisense
// Dataset dsModify = New Dataset();
// SqlDataAdapter daModify = new SqlDataAdapter();
}
private void btnModify_Click(object sender, System.EventArgs e)
{
//Accept user changes
// PROBLEM - the dsModify and daModify are not availible in intellisense
to allow modifications to be pushed through to the database
// Errors generated are :
1) The type or namespace daModify could not be found
are you missing a using directive or an assembly reference"
2) The name dsModify does not exist in the <class>.<form>
}
I have attempted to put the following code into the public class of the form
private System.Data.SqlClient.SqlDataAdapter daModify
and get an error saying that daModify is never used - however it is used in
LoadData()
Any assistance would be appreciated
Thanks
Christopher