no value given for one or more required parameters - error

  • Thread starter Jon S via DotNetMonster.com
  • 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");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top