In ASP 2.0
I have an access database, with a table named comments whose primary key is
an integer field named ID, and two string fields names Comment1 and
Comment2.
I am trying to use a QueryStringParameter to update my table. This all
should be simple SQL, but I am having a problem.
If possible please suggest some code to help me with this C# code-behind.
When I run
int FileIDNum = 2;
QueryStringParameter queryStr = new QueryStringParameter("ID", "FileIDNum");
AccessDataSource1.SelectParameters.Add(queryStr);
AccessDataSource1.UpdateCommand = "UPDATE Comments SET Comment1='Billy',
Comment2='Bob' WHERE ID=?";
AccessDataSource1.Update();
I get the following error message:
Server Error in '/XML_2' Application.
No value given for one or more required parameters.
I also get a message that FileIDNum has been initialized, but is not used.
Thanks in advance for you help,
Jim