Hitchhiker's Guide to VBSQL -- VBSQL vs ODBC API Data Access

Last reviewed: December 3, 1996
Article ID: Q111490
The information in this article applies to:

- Professional Edition of Microsoft Visual Basic for Windows, version 3.0

SUMMARY

If you want to use ODBC API functions instead of VBSQL data object variables for data access in Visual Basic, consider the following issues:

  • On average, the data access speed of the VBSQL API functions versus ODBC API functions is about equal. ODBC does some calls slightly faster, and VBSQL (DBLIB) does some other calls faster.
  • The VBSQL API may be slightly easier to use than the ODBC API, but is not as generic as the ODBC API.
  • If portability to C is important to you, the API calls for VBSQL are identical to the C calls -- except with C you need to bind each variable with each column, which can be tedious. The error handlers with VBSQL resemble the C language in that VBSQL implements real call-back handlers, but this is not an option with the ODBC API.

MORE INFORMATION

The VBSQL.VBX custom control file comes from the Microsoft SQL Server Programmer's Toolkit for Visual Basic.

The following guide offers further information on VBSQL:

   "Hitchhiker's Guide to VBSQL: The developer's roadmap to the Visual
   Basic Library for SQL Server," by Bill Vaughn.

   ISBN # 0-9640242-0-9
   Available in London, England, at "The PC Bookshop Ltd."

   In the rest of the world, purchase the book by sending $45 in U.S. funds
   (plus $3.84 tax if you live in Washington State) to:

      Beta V
      Book Order
      16212 NE 113th Ct,
      Redmond, WA  98052-2773
      (206) 556-9205

   C.O.D. orders to U.S. addresses are okay. Overnight C.O.D. orders are
   $63.50 in US funds. No credit card orders or purchase orders are
   accepted.

   The Third Edition covers accessing the SQL Server (Microsoft and Sybase)
   through VBSQL (DBLIB) and data access object variables in Visual Basic
   version 3.0. This is a definitive work on accessing the SQL Server from
   Visual Basic.

Open Database Connectivity (ODBC)

The greatest impact of Open Database Connectivity (ODBC) is on organizations where information is stored on a variety of dissimilar computers and databases. Under the ODBC scheme, a driver written for a specific database program, such as ORACLE, Ingres, or IBMs DB2, acts as the intermediary between the application and the database.

By using ODBC calls and the appropriate driver(s), the same application, be it a spreadsheet or an accounting package, can easily extract and manipulate information stored in a variety of databases.

ODBC-compliant applications include Microsoft Excel version 5.0 and Word version 6.0.


Additional reference words: 3.00
KBCategory: kbinterop kbprg
KBSubcategory: APrgDataODBC


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 3, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.