no value given for one or more required parameters - error

  • Thread starter Thread starter Jon S via DotNetMonster.com
  • Start date Start date
J

Jon S via DotNetMonster.com

Hi all,

Why am I getting a 'no value given for one or more required parameters' error
when I try to fill the dataset. Below is the code I'm using and I'm getting
the error on the DASOURCE.FILL(DSSOURCE, "FIELDS"); part of the code.
objSourceConn is fine. Can anyone help?
Thank you.

string selectFromSource;
selectFromSource = "SELECT * FROM Fields WHERE ['Label name'] = '" +
drDistinctSource["Label name"].ToString() + "'";
OleDbDataAdapter daSource = new OleDbDataAdapter(selectFromSource,
objSourceConn);
DataSet dsSource = new DataSet();
daSource.Fill(dsSource, "Fields");
 
Back
Top