E
Emil
I've created a very simple data base in Microsoft Access 2003. It consists
of only one table called "Students" and it contains 2 information about each
student: id-student and name.
When I try to manipulate data in database I get an error, here's a sample:
OleDbConnection connection;
connection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\\ecdl.mdb");
OleDbDataAdapter dataAdapter = new OleDbDataAdapter ("SELECT * FROM
Students",connection);
OleDbCommandBuilder commandBuilder = new OleDbCommandBuilder(dataAdapter);
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet, "Students");
DataRow dataRow = dataSet.Tables["Students"].Rows[4];
dataRow["Name"] = "Peter";
dataAdapter.Update(dataSet, "Students"); //here I get an error
connection.Close();
Console.ReadLine();
And the error is: " Any value given for one or many parameters required"
Please help
Thanks in advance
Emil
of only one table called "Students" and it contains 2 information about each
student: id-student and name.
When I try to manipulate data in database I get an error, here's a sample:
OleDbConnection connection;
connection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\\ecdl.mdb");
OleDbDataAdapter dataAdapter = new OleDbDataAdapter ("SELECT * FROM
Students",connection);
OleDbCommandBuilder commandBuilder = new OleDbCommandBuilder(dataAdapter);
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet, "Students");
DataRow dataRow = dataSet.Tables["Students"].Rows[4];
dataRow["Name"] = "Peter";
dataAdapter.Update(dataSet, "Students"); //here I get an error
connection.Close();
Console.ReadLine();
And the error is: " Any value given for one or many parameters required"
Please help
Thanks in advance
Emil