From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Database Data in a file .ini

Hello,

 

I just wanted to know if it is possible to do something like:

 

[1633] //Assembly Part Number

 

CURRENT1_SEARCHED=(The value in the database, at table X, column X, case X)

CURRENT2_SEARCHED=(The value in the database, at table Y, column Y, case Y)

 

Nothing more, I am looking for it to test the card, and if they want to change the "test current" like "after 10 test calculate an average and put it in database" it can be a problem to change the value manually... I did all the code except this part so I hope it is possible haha.

 

Oh and I have to attach a Sub-VI, please say me if there is no other way than use 2 .ini file in this conditions. That's not really important anyway.

 

Bets Regards,

Robin.

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

You could use a single ini file and then just have multiple sections.

 

But even if you want to use the two files, no need for the case structure.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 6
(3,124 Views)

Hello Crossrulz,

 

I prefer use 1 .ini fileand stay with the case structure. That's what my program do now and I think it is ok for it now but thanks it give me the idea. 😉

 

Hm well except the call of the database data in a .ini I have another problem and I don't understand why it worked before I started my 9.5 version and now it don't and I changed nothing about the database and the way to communicate with it...

 

- The error code is attached

 

I have got this problem at the start with this database, saying a varchar can not be converted to date/time.

When I try it manually in "SOUS_VI_DATABASE_vs9..5" it works, the format transmitted is "%d-%m-%y %H:%M:%S" in manually when I use

"10-10-10 10:10:10" it works, but if I launch the program from my main VI it say I have a convert error in my Sub-VI. Is there a way to transform a string to date/time? I mean real date/time format to communicate "the date of execution of the card" to the database? Should I ask to change the format of the data in the database into nvarchar?

 

Best Regards,

Robin.

 

 

 

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

Hello,

 

here is the solution for my second problem, using SQL server code and use "getdate()" then I don't use "Execution date" but it looks like it is ok for my bosses.

 

Well anyone knows about data called in .ini? Probably the last thing that I can not do alone, after it I just have to end with some details, so I hope that's possible

 

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

Hello,

 

Anyone know the limit of a .ini file in LabVIEW? If someone have good documents, better than:

 

http://zone.ni.com/reference/fr-XX/help/371361L-0114/lvconcepts/fileio_configuration_formats/

http://zone.ni.com/reference/fr-XX/help/371361K-0114/lvconcepts/fileio_configuration_files/

 

That say more about the possibility on .ini files then send it here please

 

Best regards,

Robin

 

 

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

Hello, I have found this https://support.microsoft.com/en-us/kb/210073

 

Looking for something like:

 

[currentsearched.txt]

[1630]

 

CURRENT1_PROG_SEARCHED="Parameters12V_Prog_IccType_A" at "line 32" Float Width 3

CURRENT1_BLANK_SEARCHED="Parameters12V_Blank_IccType_A" at "line 32" Float Width 3

CURRENT2_PROG_SEARCHED="Parameters3V3_Prog_IccType_A" at "line 32" Float Width 3

CURRENT2_BLANK_SEARCHED="Parameters3V3_Blank_IccType_A" at "line 32" Float Width 3

 

[1631] ...

 

Where should I find help on this?

 

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