A Simple and Smart ODBC Wrapper Library | CodeGuru

A Simple and Smart ODBC Wrapper Library

Environment: Microsoft Visual C++ 6.0/SP4 ODBC 3.0 or above Microsoft Windows 95…XP Direct usage of ODBC is very complex. Anybody who tries to work with ODBC can say it. Also, ODBC is a function-level interface. It is a good universal interface, but all structured C++ applications look very horrible when plain ODBC calls are used. […]

Written By
CodeGuru Staff
CodeGuru Staff
Oct 2, 2002
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Environment:

  • Microsoft Visual C++ 6.0/SP4
  • ODBC 3.0 or above
  • Microsoft Windows 95…XP

    Direct usage of ODBC is very complex. Anybody who tries to work with ODBC can say it. Also, ODBC is a function-level interface. It is a good universal interface, but all structured C++ applications look very horrible when plain ODBC calls are used.

    I want to offer a little library, which:

    • Wraps access to ODBC into a set of classes
    • Wraps processing of ODBC and usage errors into an exception mechanism
    • Doesn’t use any external libraries, including MFC and ATL
    • Doesn’t require any special conditions to use it
    • Automates column binding operations
    • Can automate (for MSSQL server) binding of parameters
    • Can provide transparent work with LOB columns/parameters without limitation of their size
    • Has a Help file, even if this Help file is simple
    • Is freeware, open-source library
    • Supports powerful local-side cursors with indexing and modifying of cursor(insert, update, delete) are supported

    I sought such a library for some years, but I didn’t find a library that conforms to all these conditions. Because I have used ODBC in many projects, some classes were developed some time ago. Now I have refined these classes. And I hope that these classes can help somebody.

    Downloads


    Download source – ~140 Kb


    Contains sources of library and Help files.


    Download demo project – ~70 Kb


    Contains project with a demonstration of the library usage.

  • CodeGuru Logo

    CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

    Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

    Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.