LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ODBC connection using ADO --> fluctuations while putting a record

Hi there,

I access a local database via ADO and ODBC. If I measure the time, a record needs to be put into the database (in loop), there are strange fluctuations. Averaged a record needs 75ms to be put into the db with an average deviation of 5ms.

If I rightclick into my frontpanel in order that a selection dialogue appears, the average time, a record needs falls to 1-3ms.

I have already tried to modify the process priorities, with no noticeable success!

Has someone an idea, what a probable reason might be?? Or knows someone, if the same fluctuations appear with the LabVIEW DB Connectivity Toolkit????

Thanks a lot,
Marc
0 Kudos
Message 1 of 3
(2,323 Views)
Hello Marc,

I made a quick test with one of the examples that come with the LabVIEW Database Connectivity Toolkit. In a loop I repeatedly called the command
insert into inserttable (querytype, device, numsamples) values ('sql query', 'mydevice', 1872)
writing data to an Access database. The time I need for one iteration is varying slightly with an average rate of 2 or 3 ms. This rate is not influenced by rightclicking and opening context menus.

But since the Database connectivity toolset is using ADO as well I guess the problem is not to be found in the database access itself but somewhere else.

I find it strange that you say the loop time is increasing if you are opening a context menu. Are you stopping any processes by rightclicking that? What processes could that be? This would be the only explanaition I can think of right now. Are you using a lot of frontpanel objects? I would advice to have a look at your VI performance to see in which SubVIs use most processing time.
Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 2 of 3
(2,306 Views)
thanks for testing it with the db connectivity toolkit... that day i made a lot of tests what it could be but nothing was able to improve the situation... then i had the brilliant idea to restart labview and since the point in time i also had average write times of 2-3 ms...

the problem occured just one more time and disappeared after restarting labview... maybe i forgot to close a lot of references :-\\ but if i let the whole frame run in a loop (tested that for about 2 hours) (connection open --> recordset open --> write 100 recordsets --> recordset close --> connection close) it doesn't seem that my code has any problems with references or memory holes...

i'm excited if i or someone else can point out, what the problem is...

cheers, marc
0 Kudos
Message 3 of 3
(2,298 Views)