11-04-2020 07:37 AM
Hey everyone! I recently started a project for my university to get a working Database up. The reason why I make this post is because I'm stuck in getting my execute to work with the query as seen in the attached png. I've looked on this forum for a day now and can't find what my issue seems to be.. Does anyone have an idea what might be wrong?
would I be able to add a date/time value to the database too with the same block? I've tested my "create entry" VI and that worked by using a string, so I was wondering if it would work if I used this VI.
11-04-2020 07:54 AM
I can see one thing wrong. You didn't attach the file. But while I have your attention, it is much better to attach your VI than a picture of one. We can't take a picture out for a test spin. 🙂
11-04-2020 07:59 AM
Hey there, sorry for not giving you the complete VI; Simply forgot to attach it with the picture. I also added a DB free block, the rest is still the same.
11-04-2020 09:50 AM - edited 11-04-2020 09:51 AM
@Woutervg wrote:
Hey everyone! I recently started a project for my university to get a working Database up. The reason why I make this post is because I'm stuck in getting my execute to work with the query as seen in the attached png. I've looked on this forum for a day now and can't find what my issue seems to be.. Does anyone have an idea what might be wrong?
would I be able to add a date/time value to the database too with the same block? I've tested my "create entry" VI and that worked by using a string, so I was wondering if it would work if I used this VI.
"would I be able to add a date/time value to the database too with the same block" - No. Update only modifies existing entries in the database. To add data you'll need to use Insert. (unless you're asking about if you can use the Execute query, in which case the answer is yes)
One good tips is to probe or create an indicator with the SQL query and run in manually in SQL manager (or equivalent) to make sure the query is functional.
I'd start with Insert queries, then Update. 🙂
11-04-2020 10:50 AM
I'm currently using a Microsoft Access Database to save my values. I can add stuff already which means that each query already has a date/time format. But with those I use the insert DB blocks that only need table, data and condition etc. I haven't used the execute command tool with that yet but the inserting works.