Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot get UPDATE blnValue = False in ADO to work

Status
Not open for further replies.

JBG

Programmer
Oct 22, 2001
99
US
I have an Acces 2000 dataase set up with an ADO connection to another Access 2000 database.

I am trying to get a very simply SQL statement to work:

Code:
 m_objCon.Execute "UPDATE tblControl " & _
 " SET  Match = False WHERE ControlID = " & varCIDarray(x)

Each time I run it, I get "Syntax error in Update Statement."

Yet, I can run:

Code:
 m_objCon.Execute "UPDATE tblControl " & _
 " SET  blnIsLocked = False WHERE ControlID = " & varCIDarray(x)

with no problem, the only difference being the field that I am trying to update.

Both fields are identical in properties.

Any help would be greatly apprceiated. I am stumped.

JBG
 
Is Match a boolean? If Match was a reserved word, it would need [] If Match is text then try "0" or numeric try 0

m_objCon.Execute "UPDATE tblControl " & _
" SET [Match] = False WHERE ControlID = " & varCIDarray(x)
 
Another possibility is the value in the array is NULL on the Match update.
 
Thanks for the replies. match is indeed a boolean.

I have tried everything mentioned...except [] around the field, Duh on my part. Ill get back with a reply asap (and the value is the array is not null when I have tried to execute the statemnt).

Again, thanks...
JBG
 
YES! [] worked!

Stared right at it forever and it did not fall into place.

Thanks....

JBG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top