Hello Everyone!
Im trying to do something a little unconventional (at least according to the information I was able to find about it…), and Im trying to build a library that will update an Access database with real-time information about the instrument for an equipment dashboard.
Im having trouble setting the values of the database though. I am able to hardcode the values to be updated, but that really kneecaps the utility of my library. I need my SQL query to accept variable values, but I can’t seem to get the syntax right. Im not even sure if it’s possible.
For example, i have a .mdb file ‘Database1.mdb’ with a table 'Table1" and 1 column ‘AssayStep’ that Ive successfully connected to.
I am able to modify the database with command:
UPDATE Table1 SET AssayStep = (inputValueFromMainMethod) WHERE ID = 1
where inputValueFromMainMethod is a string variable passed in from the calling method.
If I replace that variable with a hardcoded string value, it seems to work, but I get a ‘missing required parameters’ error if I try to use the variable (I have also tried containing it in square & curly brackets - no good.).
I even went as far as trying to build out my query by concatenating a string variable, but it didnt like that at all either. If anyone has ideas or examples, you’d be a hero!