[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

SQL Updates

Can anyone tell me what is wrong with the VERY simple SQL UPDATE statement:

BooksConnection.Execute "UPDATE ImportCheck SET CheckStatus = -1;"

I have tried a number of methods but all I can get is "No value given for a required paramter" I want to update all records and I have tried adding a where clause just for theheck of it. ame results. I am using the same connection in many other places in my code for inserts and deletes wth no errors. Checkstatus is a yes/no field in access.

Thanks.
0
scotts27
Asked:
scotts27
  • 2
1 Solution
 
nico5038Commented:
Try:
UPDATE ImportCheck SET ImportCheck.[CheckStatus] = true;

Nico
0
 
nico5038Commented:

Strange, your query does work under Access (-1 is equal to TRUE)
So I would advise to check the names used. (ImportCheck and CheckStatus)

Access is always asking for a parameter if there is a name it can't find in the mentioned table !

0
 
jsimonh33Commented:
Try dropping off the semicolon at the end. That is only required for MS Access.

I was just guessing you are Using ODBC connecting to SQL server. Are you and: What is the DataType for CheckStatus, Binary right?


Good luck.

Simon
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now