LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic SQL (maps), how to query?

Solved!
Go to solution

hi everyone, i'm trying to use the Automatic SQL (maps) instead of the Explicit SQL and it's very easy to write and read from the database just writing the column name and binding it... but... how can i do query with this type of connection?

 

for example i have a table with

- DateTime

- Result (OK, KO)

and i want to get only the OK value within a date.

 

With Explicit SQL i would have done

 

 

SELECT * FROM [TableName] WHERE DateTime BETWEEN #2016-03-01 00.00.00# AND #2016-03-02 00.00.00# AND WHERE Result = OK

but how to do it with the Automatic SQL (maps)?

thank you

Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer
0 Kudos
Message 1 of 8
(4,541 Views)

Hello holly,

 

Did you write some LabVIEW code which does this operation?

 

Kind regards,

 

Pep

0 Kudos
Message 2 of 8
(4,527 Views)

pep, please note that we are here in the CVI board: people are not supposed to know graphical programming Smiley Wink



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 8
(4,521 Views)

Ops, it's my fault.

Anyway, if he can provide us some code we can better help him to solve the issue.

 

Kind regards.

0 Kudos
Message 4 of 8
(4,519 Views)

hi pep91, i haven't problem with my code it's only a question if it's possible to do some query using the "Automatic SQL (maps)"

Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer
0 Kudos
Message 5 of 8
(4,499 Views)
Solution
Accepted by topic author holly7787

Hi holly,

 

is this document useful? http://zone.ni.com/reference/en-XX/help/370502D-01/cvisqlref/usingautosqlmaps/

 

Kind regards.

0 Kudos
Message 6 of 8
(4,495 Views)
After the program maps all the columns, call DBActivateMap to construct the SQL SELECT statement, execute the statement, and bind the columns to the variables.

 

after reading this i think it's impossible. thank you 

Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer
0 Kudos
Message 7 of 8
(4,489 Views)

Glad I could help you, not so happy that you cannot do it.

 

Kind regards.

 

pep

0 Kudos
Message 8 of 8
(4,486 Views)