LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call a Data in the database from the line number with DB Select Tool Kit.

Hello, I finally found a solution for how make what I want but I need to call the number of line, to select the data. My VI is attached. I hope it can work, I continu to look on forums to know how.

 

- For Exemple: For Assembly Number 1633 I take the data from the line 32 of 2 columns if the card is blank and 2 others if the card is prog.

 

 

0 Kudos
Message 1 of 6
(3,080 Views)

To be able to help you we need ot know how your database is structured and how you ini file looks like. 

 

Then you should get to know a little about SQL. Take a few tutorials to learn SQL. 

 

0 Kudos
Message 2 of 6
(3,049 Views)

Thanks for your answer, here are the ini file, and the new version of my Sub VI.

 

Well, I have only 3 days more in my Company in Internship, and I have learn a bit SQL and I have read some pages of a book about SQL SELECT, but that's not answering me to make a condition by a .ini file to choose the data, The condition is "WHERE OC=1633" or "AT LINE 32" when my Assembly Number is 1633. but the WHERE OC=1633 don't work, it is the method used in LabVIEW Example... It send me the name of the column

Download All
0 Kudos
Message 3 of 6
(3,047 Views)

Hm, I actually know what is my problem. In fact when I use 'Parameters.12V_Blank_IccType_A' it send me the same string.

If I use "Parameters.12V_Blank_IccType_A" it say me the column is invalid
Then I tried with an other column and it works

So the problem is "_" or "." that are not supported, how can I make it supportable? I have tried [],""" and ''...

 

I am not the creator of this Database and I do not have the right on it so I can not change the name. Thanks god I find where was the problem

 

Edit: If you know how to transform a table to string? Thanks

0 Kudos
Message 4 of 6
(3,037 Views)

How does your database look like?? 

Do you have any that you can use that can show you the current data in the databae table? 

 

I can't why you even need the .ini file for what you are trying to do.

You need to construct a SQL query based a number. 

You should end up with something like: 

SELECT [Parameters.12V_Blank_IccType_A], [Parameters.3V3_Blank_IccType_A] FROM Assemblies WHERE OC = %d

 

0 Kudos
Message 5 of 6
(3,023 Views)

Yes I have for sure.

 

I do not need it, it's because my company do not know LabVIEW so if they have to change something they are going to change this ini file, that is just to make them the work easier but I do not need it and I know how to do it with out using an ini file..

 

I am not going to use an ini file for no reason because I know how work the SQL Query and I use it to enter datas from my card test.

 

I have already find the problem, it is about special character I just need to know how to allow it.

 

0 Kudos
Message 6 of 6
(3,018 Views)