LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

to put variables in sql request?!

Solved!
Go to solution

Hi,

How i can to put variables in sql request?!

1lab.png

Thank youu for your help.

0 Kudos
Message 1 of 7
(3,306 Views)
Solution
Accepted by topic author imadouino

Example_VI.png

Format Into String

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 7
(3,279 Views)

This is exactly what I was looking for
Thank youuuuu

0 Kudos
Message 3 of 7
(3,276 Views)

 

I'm sorry to disturb you but, why I get commas instead of points in the result?

labv.png

0 Kudos
Message 4 of 7
(3,265 Views)
Solution
Accepted by topic author imadouino

LabVIEW uses your regional number formatting settings from Window. 

 

For instance your Windows is set to French, then  you use a "," (comma) as number decimal separator instead of a period that you would get if you used English (US).

 

0 Kudos
Message 5 of 7
(3,243 Views)
Solution
Accepted by topic author imadouino

Its better to use bound parameters if your SQL library supports it.  String formatting may work for "input 4"="jcarmody", but will fail for "jcarmody's".  Even worse is "jcarmody');drop table Banc2".

Message 6 of 7
(3,239 Views)
Solution
Accepted by topic author imadouino

@drjdpowell wrote:

[...]Even worse is "jcarmody');drop table Banc2".


Oh. Yes. Little Jimmy Tables, we call him.

 

exploits_of_a_mom

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 7 of 7
(3,224 Views)