0

I'm making this UPDATE string for my acces 2007 database using excel

conn.Execute ("UPDATE newEmployees Set Firstname = 'testname1' Where Id = sID;")

sID is a number, but when I use it like this or like " & sID & " I get an error. On the other hand if I just write a number Where Id = 46 - It works just fine.

So my question is, how do I make an update string in SQL with a number variable?

1 Answer 1

2
conn.Execute ("UPDATE newEmployees Set Firstname = 'testname1' Where Id=" & sID)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.