Last post Aug 29, 2008 03:49 AM by Pallen2412
Aug 28, 2008 03:40 PM|Pallen2412|LINK
I'm trying to run a simple update statement using ADO.NET and Access.
Here is the code in my web app:
I always get an error saying "no value specified for one or more required parameters". However, clearly I have specified the parameter values. Ive done some simple debugging and sure enough, the polldata, polltime and appkey all contain valid values.
Can someone suggest what the problem might be?
Aug 28, 2008 04:57 PM|rtpHarry|LINK
Have you given your primary key for the table anywhere?
Aug 28, 2008 06:01 PM|hans_v|LINK
It may appear that you only used 3 parameters: @poll, @time, @appid. You also added 3 parameters in the command. So if the error is 'no value specified for one or more required parameters', it must be that there's anothor unknown parameter So I think that
either f_EnablePoll, f_PollTime and/or f_AppID are not valid fieldnames in the table tbSettings?
And are you sure that this is really what you want? You don't have a WHERE clause, so all records will be updated!
Aug 29, 2008 03:49 AM|Pallen2412|LINK
Thanks for your answers, I was indeed updating a column that didnt exist! Wrong spelling of enable... Would be nice if it said invalid column name like sql server does though!
There is only ever going to be 1 row in that table so it didnt need a where clause.