LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

make the DB Connectivity TS much faster!

The VIs "DB Tools Fetch Recordset Data.vi" and "DB Tool Select Data.vi" of the
Database Connectivity Toolset have the great disadvantage that they are very,
very slow.
National Instrument is aware of this problem and writes in the KnowledgeBase
document ID 28IDHE52 with the title "Why Is the Database Toolset Slow in
Returning Table Data?": (you can find this article under www.ni.com/support):

If you still wish to return the entire contents from a large table at once,
you can use the methods from the example named Read All Data from the
LabVIEW > Examples > database > DatabaseEx.llb. The subVIs used in this
example were written to use the least number of resources and return the
data as a 2D array of strings. Although it is very
efficient, this method of
reading data is not used elsewhere in the Database Connectivity Toolset,
because it has two limitations:
1. The data returned in the Read All Data example is in the form of a 2D
array of strings...
2. The method used in the Read All Data example in unable to interpret NULL
values. If any item in the returned recordset contains a NULL, an error
is returned and no data is read.

This is true, BUT only a slight modification of the "DB Tools Fetch Table
Data.vi" VI, that is used in the "Read All Data" example, make it possible
to avoid these limitations! After this modification this VI returns the same
2D array of database variants as the "DB Tools Fetch Recordset Data.vi" and
"DB Tool Select Data.vi", but is much, much faster!!

Send me an email and I will email the modified version to everybody who is
interested directly.

Robert
0 Kudos
Message 1 of 16
(4,230 Views)
Hi Robert,

Let me express my thanks for sharing this on both info-LabVIEW and here.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 16
(4,228 Views)
Thanks for sharing this Robert.
I would like to have a copy of the modified version.

Have a nice day,
David -- dmarien@ford.com

PS: This might be a dumb question, but where do I find your e-mail address on this board?
0 Kudos
Message 3 of 16
(4,228 Views)
I just ran into the same slowdown problem. Can I get a copy of your VI that handles the Null cases?

mailto:michael@mmwis.com


Michael Aivaliotis
VI Shots LLC
0 Kudos
Message 4 of 16
(4,228 Views)
Hey David!

Nice to meet you here 🙂

Regards
Peter
0 Kudos
Message 5 of 16
(4,228 Views)
hello robert

Could I please get a copy of this code as well!!!

adam.walker@jenway.com

Adam
0 Kudos
Message 6 of 16
(4,228 Views)
hello robert

Could I please get a copy of this code as well!!!

adam.walker@jenway.com

Adam
0 Kudos
Message 7 of 16
(4,228 Views)
I would like a copy of this as well!

joe.zoller@picolight.com
0 Kudos
Message 8 of 16
(4,228 Views)
Come to think of it, the NI board has an attachment feature that you can also use to distribute your code, although if you don't wish unregulated distribution, I can certainly sympathize.
0 Kudos
Message 9 of 16
(4,228 Views)
I would like to have a copy of the modified version.
Thanks!
0 Kudos
Message 10 of 16
(4,228 Views)