Update query with multiple variables on ACCESS

Hello@All,

I got a Problem to Update an ACCESS Standalone DB with the “Execute Non Query”

I want to update one Record with two variables, but I got an Exception every time when I start the bot.

My Quey: "UPDATE ARCH SET COLUMN1 = " + FIELD2 + " WHERE COLUMN2 = " + FIELD1 + “;”

The Exception I got everytime is that I have a Syntax Problem


I know that is not a big problem to do this query but I cannot find the wrong part in my query :frowning:

Can anybody help me on this?

Thank you in advance :slight_smile:

Hey Guys,

I solved this Problem the correct Query is:

" UPDATE Archiv SET Vorgangsnummer = " + FIELD2 + " WHERE FallIdent = " + “”"" + FIELD1 + “”"" + “;”

Please keep in mind that VB compares String variables with 4 quotation marks :smiley:

Have a nice day

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.