Philip Stears | DriveWorks

Musings of a DriveWorks Developer

 Subscribe in a reader

September 2009

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      

Archives

  • September 2009
  • June 2009
  • January 2009
  • September 2008
  • August 2008
  • January 2008
  • September 2007
  • July 2007
  • June 2007
  • April 2007

Recent Posts

  • DriveWorks New Product
  • Personal Project Launched
  • Happy New Year
  • So it begins...
  • Interesting SQL Server Related Support Ticket
  • How I Got Started in Software Development
  • Reseller Training Event
  • Twitter
  • SolidWorks World 2008 - The Aftermath
  • SolidWorks World 2008

Articles

  • QueryDataEx

Downloads

  • Dimension Renamer v2 (Setup)
  • Dimension Renamer v2 (Source)
  • DriveWorks Plug-in Tutorial

QueryDataEx

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:

  1. Download and Extract DataEx.bas:
    1. Download DataEx.zip to your desktop
    2. Right click on DataEx.zip
    3. Click "Properties"
    4. If you see a button called "Unblock", click it, otherwise, do nothing.
    5. Click "Ok"
    6. Right click on DataEx.zip again
    7. Click "Extract All..." and follow the wizard
  2. Open up the design master for your project in Microsoft Excel.
  3. Open the VBA macro editor by holding down your [Alt] key, pressing [F11] and then releasing both keys.
  4. Import the DataEx.bas file:
    1. Click the "File" menu.
    2. Click "Import File..."
    3. Browse for the DataEx.bas file wherever you downloaded it to.
    4. Click "Open"
  5. Close the VBA editor, and save your design master.
  6. 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. 
  7. 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.

Categories

  • 64-bit
  • Current Affairs
  • DriveWorks
  • DriveWorks Extensibility
  • DriveWorks Live
  • DriveWorksXpress
  • Microsoft .NET
  • SolidWorks

Twitter Updates

    follow me on Twitter

    Links

    • My Personal Blog
    • My DriveWorks Blog
    • MSDN Home Page
    • SolidWorks - 3D Mechanical Design and 3D CAD Software
    • DriveWorks - Rules Based Design Automation for SolidWorks

    DriveWorks Blogs

    • Maria Sarkar
    • Glen Smith
    • Ian Yates
    • DriveWorks Blog

    Blogs I Read

    • Robert Bentley's Blog
      Web hosting and stuff - a great service and better support.
    • InFlow Technology
    • Sorting It All Out
    • SQL Server Performance
    • Graphics Systems SolidNotes
    • SolidWorks Blog
    • SolidWorks Community
    • Albatross!
    • Rob Mensching Openly Uninstalled
    • BCL Team Blog

    About

    Powered by TypePad