LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parameter insert database connectivity

I'm currently having a little trouble getting this to work.  Below is a picture of my block diagram, it includes pretty much everything there is to know about my error. As you can see it says it has a syntax error. I'm fairly new to labVIEW but I do quite a bit of database programming. The insert statments looks correct. I would assume the error lies within the values passed into the parameters. I've tried it both with and without single quotes around the values. I would also like to note that the 2 int32 convertsion were thrown in after the error was already there. Was just running out of ideas to try. Incase you can't recognize the VI. We have an open database vi -> parameterized query -> 2 set parameters -> exec query-> free object-> free conn-> close conn. This is the exact same layout for the database connections as is in the database connectivity manual. I've already tested the connection to the database inserting a single value and that worked. For some reason now that I'm spliting the values coming out of the DAQ assistant and made it a parameterized query, it is no longer working. Any help would be great. Thanks.
 
 
0 Kudos
Message 1 of 7
(3,397 Views)
Did you try using the "'\' Codes Display" (right click on string constant) on your "INSERT INTO..." string constant to make sure there aren't any non-printable characters in the string? And can you do a screenshot to enlarge the DB VI's more?
Message 2 of 7
(3,389 Views)
When I get access to the server, I'll get you a screenshot of that stuff. The server was moved yesterday and I do not yet have remote access to it. As far as the special characters in the insert string I wouldn't believe there would be any unless they some how get added automatically. If they are is that a common issue? I'm still thinking I'm over looking something in the parameters part of the query, even though it was set up exactly like the example from the database connectivity manual.
0 Kudos
Message 3 of 7
(3,377 Views)
0 Kudos
Message 4 of 7
(3,369 Views)
[As far as the special characters in the insert string I wouldn't believe there would be any unless they some how get added automatically. If they are is that a common issue? ]
I was just making sure human error didn't creep in when the INSERT string was created. It's bit me more than once.


Have you tried hard coding some Voltage and Current values into the Set Parameter Value VI's? You might also try setting the "auto-detect parameters" in the Create Parameterized Query VI to TRUE and disconnecting the Parameters array constant. Also, check the string "Current" in the Parameter constant array (index 1), make sure there's no space at the end of the name.
Message 5 of 7
(3,354 Views)
Thanks, that sounds like a couple of good ideas. Hopefully they will get me my remote desktop access here soon so that I can try it. I'll let you know how it goes. If anyone has any other ideas keep 'em coming. Smiley Happy
0 Kudos
Message 6 of 7
(3,339 Views)
How extensively do you use the Database Connectivity Toolkit in your application? Another solution is to drop it in favor of something simpler to work with and debug. What version of LV are you working in?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 7
(3,332 Views)