LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel access of database

It was Brian who mentioned that he wrote his own version of this VI, however it should look something like this. You might want Brian's if he's willing to post it as he's probably tested it more than I have. The problem lies in the way that Microsoft implements the locks on their database, they don't provide much detail but the basic idea is that there is a minimum delay between locks which is getting exceeded.
0 Kudos
Message 11 of 15
(853 Views)
Parker-

Here is my VI. I'm not sure what you mean by remote system. If you mean a network database, than you can just put the file dsn on the network, and use that to open the connection. I don't think that I set things any differently than you did for security.

Brian
0 Kudos
Message 12 of 15
(646 Views)
Ryan and Brian,

Thanks for the VIs. I have yet to look at them. Before I do that I just have a slight concern. If I manage to incorporate your VI into my program, the program that will READ from the database this would mean that it will retry until a successful connection is made.

However, the main program that is logging data into the database, a TestStand sequence will still run into error once the other program connects to the database.

Also, it would be best if I modify only the program that reads from the database, not the TestStand program.

I am not sure but does OS play a part. I tested my applications with both of them in a local machine running Win 2K and I had no problem. I tried run
ning them in an actual condition using a system running on Win 2K while the other system running on Win XP.

I also did receive an error before when the program tries to make connection and it sounds like an OS error. Here it is and it still comes out once in a while.


http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000E8D50000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=collating+sequence&USEARCHCONTEXT_QUESTION_S=0
0 Kudos
Message 13 of 15
(646 Views)
This is an edited version of my previous post. Sorry I didn't read through it before posting.

Thanks for the VIs. I have yet to look at them. Before I do that I just have a slight concern. If I manage to incorporate your VI into my program, the program that will READ from the database will retry until a successful connection is made.

However, the TestStand program that is logging data into the database, will still run into error once the other program connects to the database.

Also, it would be best if I modify only the program that reads from the database, not the TestStand program.

I am not sure but does OS play a part. I tested my applications with both of them in a local machine running Wi
n 2K and I had no problem. I tried running them in an actual condition using a system running on Win 2K while the other system running on Win XP and this is where I ran into problems.

I also did receive an error before when the program tries to make connection and it sounds like an OS error. Here it is and it still comes out once in a while.


http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000E8D50000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=collating+sequence&USEARCHCONTEXT_QUESTION_S=0
0 Kudos
Message 14 of 15
(646 Views)
You'd need to implement something similar in TestStand, I'm not a TestStand expert, but I think there is a database sequence that you could modify to do something similar to what we did in LV. Just toss a label into it, check the result of whichever step actually connects to the DB and then loop back to the label until it works.

Also, one other thing which it might be neccessary to thing about... I'm not sure how Access implements locking, presumably if it allows multiple users it must do it by record, thus it's possible you'd need to do the same process (retry until the error goes away) for other DB operations than just the open.

Not sure what difference the OS might make, perhaps different version
s of the drivers between LV and the database.
0 Kudos
Message 15 of 15
(646 Views)