LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there some approach for executing many sql (at least 2 sql) once?

As follows:

 

start transaction;

sql1;

sql2;

commit;

 

LV hava many vi for executing sql,but it occur problem when they deal with many sql once. Is there some approach for executing many sql once?

0 Kudos
Message 1 of 20
(3,077 Views)

Hi wxjshr,

what do you mean? Do you want to write to two databases at the same time? Can you explain please?

 

Mike

0 Kudos
Message 2 of 20
(3,070 Views)

As follows sql:

 

start transaction;

update table_1 set money=money-50;

update table_2 set money=money+50;

commit;

 

I want the sql block execute one time,Labsql can do that?

 

0 Kudos
Message 3 of 20
(3,060 Views)

Hi,Mike

labsql executes only one sql at one time,am I right?

Now I want labsql executes a sql block at one time .How can I do that?

Thanks!

 

 

 

 

0 Kudos
Message 4 of 20
(3,059 Views)

Hi 威海的风,

can you upload your vi? I'm don't understand what you try to do and why.

 

Mike

0 Kudos
Message 5 of 20
(3,057 Views)
11.jpgI just want to execute two sql at one time.Is there a VI can do that?
0 Kudos
Message 6 of 20
(3,053 Views)

Hi 威海的风,

what about using a loop? Is it a solution for you?

 

Mike

0 Kudos
Message 7 of 20
(3,035 Views)

Thanks , Mike!

Is there no method do that?

0 Kudos
Message 8 of 20
(3,031 Views)

Hi 威海的风,

sorry, i can't tell you if such a funtion exists. Can you explain why you need it? I'm very interested in what you try to do.

 

Mike

0 Kudos
Message 9 of 20
(3,028 Views)
I'm confused. You're already creating a command string that contains multiple SQL statements. What is the problem? What database are you using, and which driver are you using? I know that certain databases and/or drivers (e.g., MS Access and Jet) do not allow the execution of multiple SQL statements.
0 Kudos
Message 10 of 20
(3,024 Views)