What is it?
QueryDataEx is an extended version of the standard QueryData macro that is used in DriveWorks implementations to get data from an ODBC-compliant database.
The extended function works in the same way as QueryData, but it has the ability to re-use connections, which basically means, if you have 8 QueryDataEx queries to the same database, instead of opening and closing 8 separate connections, only 1 will be opened which will hang around for the duration of the specification.
The end-result of this, especially with connections to server-based databases like Oracle, and MS SQL Server, is that the implementation should perform much more responsively with less delays when fetching data.
How do I use it?
QueryDataEx is not an integrated part of DriveWorks at this point in time, which means in-order to use it, you have to go through some steps:
- Download and Extract DataEx.bas:
- Download DataEx.zip to your desktop
- Right click on DataEx.zip
- Click "Properties"
- If you see a button called "Unblock", click it, otherwise, do nothing.
- Click "Ok"
- Right click on DataEx.zip again
- Click "Extract All..." and follow the wizard
- Open up the design master for your project in Microsoft Excel.
- Open the VBA macro editor by holding down your [Alt] key, pressing [F11] and then releasing both keys.
- Import the DataEx.bas file:
- Click the "File" menu.
- Click "Import File..."
- Browse for the DataEx.bas file wherever you downloaded it to.
- Click "Open"
- Close the VBA editor, and save your design master.
- Open your project DriveWorks Administrator, and change any rules that have "QueryData" to "QueryDataEx" - note that the arguments/parameters are exactly the same so you only need to change the name.
- If you use QueryDataGetNext, you can also change those to use "QueryDataGetNextEx", again, the arguments are exactly the same so you only need to change the name.
Conclusion
I know it seems like a lot of steps to use but the process is relatively quick, and going forward in DriveWorks, we will start to include this macro by default, we just wanted to make sure that you can reap the benefits now.
I'm really interested to hear about your mileage with this new QueryData macro, so please, if you find the time, drop me an e-mail and let me know how it works out for you. It would also be really great if you have any rough timing comparisons for before and after using it.