LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL execute syntax failure

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.

0 Kudos
Message 1 of 5
(1,504 Views)

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.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 5
(1,497 Views)

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.

0 Kudos
Message 3 of 5
(1,495 Views)

@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. 🙂

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 5
(1,461 Views)

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.

 

 

0 Kudos
Message 5 of 5
(1,440 Views)