Solved

SQL Updates

Posted on 2000-04-24
3
132 Views
Last Modified: 2010-05-02
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
Comment
Question by:scotts27
  • 2
3 Comments
 
LVL 54

Expert Comment

by:nico5038
ID: 2743984
Try:
UPDATE ImportCheck SET ImportCheck.[CheckStatus] = true;

Nico
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 50 total points
ID: 2743993

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
 

Expert Comment

by:jsimonh33
ID: 2744386
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question