Building a Windows DLL for ODBC Applications [Part 3]

    By: Paul Vero on Mar 01, 2014

    This article completes the "Building a Windows DLL for ODBC Applications" series. By the end of this article, you'll have gained all the details you'll need to write your own utility libraries for ODBC API applications.

    In this concluding article, we’ll cover some aspects of what we can do in msdev and then build a test application to demonstrate some of the odbcutil library capabilities. We’ll end it by going through the steps to add a new function to the library and use it in a test application. In this test application, I follow a consistent pattern for my code flow to make it efficient in terms of the development and readability.

    The main concept to keep in mind is we will eliminate repetitive code so we can focus more on the nature of our application. Things like error handling, simple result set processing and anything else we can do to make our job easier are included in the library. For example, if the SQLTables() ODBC API function is called, it’s nice to create a function to handle the bindings. Whenever you need to call SQLTables again, there is no need to add the binding code, just call your function from the odbcutil library.

    File Version
    When we build a library into a Windows DLL, it’s useful to obtain the file version directly from the DLL properties. Recall from part 1, a function can print out the odbcutil DLL version for debug purposes. There’s also a convenient way to get this version from the DLL. We start out in our odbcutil_demo project we created in part 2 and add a resource file. In this file, we will work with the version section.


    Login to read the article. Not a member? Create a free account!

    Released: March 1, 2014, 8:10 pm | Updated: May 7, 2014, 10:11 am
    Keywords: ASE Developer Article | Technical Journal | ASE | ASE ODBC Driver | Design | Development | ODBC | Windows DLL




    Copyright © 2014 ISUG-TECH. All Rights Reserved
    All material, files, logos and trademarks within this site are copyright their respective organizations

    Terms of Service - Privacy Policy - Contact the Help Desk