UPDATE missing required parameter

N

Nick

Hi there,

I'm using ADO.NET to update a table in an access database. The table
contains the following columns,

id = auto number
filename = Text
checkdate = Date/Time
data = OLE Object

I'm adding to the database and using SELECT commands successfully so no
problems there. No columns are "required" as such and what I am trying to
do is simply update 2 columns in a row with a particular ID.

My UPDATE command looks like,

"UPDATE thumbnails SET datelastmodified=@datelastmodified, data=@data
WHERE thumbnailid=@thumbnailid"

I'm adding the correct data into each parameter via the command objects
parameters.add method and all *should* be okay. But I'm being told that,

"System.Data.OleDb.OleDbException: No given for one or more required
parameters"

Am I missing something? Thanks in advance.

Nick.
 
N

Nick

Woops, please change that to
id = auto number
filename = Text
checkdate = Date/Time
data = OLE Object
"UPDATE thumbnails SET checkdate=@checkdate, data=@data WHERE id=@id"

I changed the names just to make it simpler for my message...
 

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