10-19-2012 07:29 AM
Hello all,
Suddenly i encountered one strange problem in asynchronous call to rentrant VI, I have a reentrant VI which will read the data from TCP & write to the database,Now i have two method to implement this.
#1. Using property & invoke node(Image is attached).
#2 . Using asynchronous call(Image is attached).
In both the method opening of database is same but problem is, in method 1 everything is working fine but in method 2 path of database is going wrong. I opted for 2nd methos because LAbVIEW suggests this.
Can anybody tell me where is going wrong
10-19-2012 09:19 AM
What is the issue? That the path to the DB.mdb is different?
I understand, that you are using the same subVI for both approaches. Correct?
What is wrong with the path to DB.mdb in version 2?
Norbert
10-19-2012 09:48 AM
It's not the classic problem of "My path works in LV but not in compiled .exe"?
When using Db's i like to use .UDL files for connection info, i tend to get less problems with them and it's easy to change database connections.
If you're using a Strict VI-ref, why not connect it to a property node and get the path that way? 😉
/Y
10-19-2012 10:50 PM
Hi Norbert_B,
In the method 1 data of the database is valid but in method 2 path is not correct. Its saying not a valid path
10-19-2012 10:50 PM - edited 10-19-2012 11:17 PM
Hi Yamaeda,
Actually this my normal & effiecient way to access database in .exe also. for mdb file i always like to avoid the udl file as this is extra (Redundant). I am using relative path for accessing database.
Can you please explain how can i implement this. a snapshot will be great. Only database path is going wrong(i hope you know this)
10-22-2012 02:17 AM
Who says that the path is invalid? The Open Database function from the Database Connectivity Toolkit?
If so, what IS the path (use probe/path indicator/popup dialog)?
Norbert
10-22-2012 03:28 AM
Hi Ranjeet,
Asynchronous calls can't be made on reentrant VIs. It just does not make sense because you don't know which reentrant instance of the VI is created/run, and when it is.
I guess this is the very reason of why it does not work. Also, asynchronous calls must have a 0x80 or 0x100 option (when opening the reference) to be properly run.
Best regards,
Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.
10-22-2012 03:54 AM
Eric,
you are correct with your observation regarding reentrancy. What i wonder is, that the OP seems to make it run with option 0x8 and NOT getting an error. So i am really confused since this should not be possible....
So i presume that the screenshots are showing old/invalid code.
Norbert
10-25-2012 04:20 AM
hi Norbert_B,
I am saying that path is invalid.I got this output thats why i am facing this problem. I just added in path indicatorf after application directory. Please check.If you want i will send the snapshot also
10-25-2012 04:28 AM
HI Eric.M,
You said ,
Asynchronous calls can't be made on reentrant VIs. It just does not make sense because you don't know which reentrant instance of the VI is created/run, and when it is.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
please tell me why this application path directory is showing invalid path if i am calling my VI asynchronously.
And one more thing i think that both the method is for parallel execution of same subvi.
But in help file its mentioned that asychronously calling a vi is faster than.