LabWindows/CVI SQL Toolkit for Windows 7/Vista/XP, Version 2.2

Readme File

This file contains important information about the release of the LabWindows/CVI SQL Toolkit, including installation instructions and known issues. For more information about LabWindows/CVI, refer to the LabWindows/CVI Readme or to the LabWindows/CVI Release Notes. For more information about the LabWindows/CVI SQL Toolkit, refer to the LabWindows/CVI SQL Toolkit Help.


What's New in the LabWindows/CVI SQL Toolkit
Minimum System Requirements
Installing the LabWindows/CVI SQL Toolkit
Activating the LabWindows/CVI SQL Toolkit
After Installation
Distribution of an SQL Toolkit Executable or DLL
Known Issues
Bug Fixes

What's New in the LabWindows/CVI SQL Toolkit

This section includes information about changes and enhancements in the LabWindows/CVI SQL Toolkit 2.2.

  • 64-bit support—Build and distribute 64-bit applications containing functions from the LabWindows/CVI SQL Toolkit. If you want to build 64-bit applications for the LabWindows/CVI SQL Toolkit, you must have LabWindows/CVI 2009 or later.

    For more information about creating 64-bit applications, refer to the Programmer Reference»Creating 64-bit Applications Versus 32-bit Applications book in the LabWindows/CVI Help.
  • Resource leak detection—Use the Resource Tracking window to locate potential memory leaks in your LabWindows/CVI SQL Toolkit program. To use the resource tracking feature, you must have the LabWindows/CVI Full Development System 9.0 or later.

    For more information about the Resource Tracking window, refer to the Using LabWindows/CVI»Debugging Tools»Resource Tracking Window topic of the LabWindows/CVI Help.
  • New functions—Manage unsigned 64-bit integers using the following functions: DBMapColumnToUnsignedLongLong, DBBindColUnsignedLongLong, DBPutColUnsignedLongLong, DBGetColUnsignedLongLong, DBSetParamUnsignedLongLong, and DBGetParamUnsignedLongLong.

    For more information about these functions, refer to the function panel help for each function.

Minimum System Requirements

To run the LabWindows/CVI SQL Toolkit 2.2, you must have the following items:

  • LabWindows/CVI 7.0 or later

    Note  If you want to build 64-bit applications for the LabWindows/CVI SQL Toolkit, you must have LabWindows/CVI 2009 or later.
  • Microsoft operating systems:
    • Windows 7 (32-bit and 64-bit)

      Note  National Instruments is committed to maintaining compatibility with Microsoft Windows technology changes. However, NI has become aware of a number of issues of potential significance regarding Microsoft Windows 7. To learn how Windows 7 affects your use of NI products, visit and enter the info code windows7.
    • Windows Vista (32-bit and 64-bit)
    • Windows XP (32-bit)

Installing the LabWindows/CVI SQL Toolkit

You can install all of your LabWindows/CVI products—including the LabWindows/CVI SQL Toolkit—using the LabWindows/CVI Platform DVD. You can find installation and activation instructions for the LabWindows/CVI SQL Toolkit in the LabWindows/CVI Release Notes, which are available in your LabWindows/CVI software kit.

If you are installing from the LabWindows/CVI SQL Toolkit CD, complete the following steps to install the LabWindows/CVI SQL Toolkit:

Note  When you install the LabWindows/CVI SQL Toolkit, your user account must have administrator privileges.

  1. Insert the LabWindows/CVI SQL Toolkit CD into the CD drive. If the CD does not run automatically, open Windows Explorer, right-click the CD drive icon, and select AutoPlay.
  2. On installation startup, the National Instruments LabWindows/CVI SQL Toolkit screen appears. Click Install NI LabWindows/CVI SQL 2.2 Toolkit.
  3. In the User Information panel, enter your name and organization and the serial number found on your Certificate of Ownership card. LabWindows/CVI uses this serial number when you run the NI Activation Wizard. Select Install this product for evaluation if you want to install the LabWindows/CVI SQL Toolkit for an evaluation period.
  4. Continue to follow the instructions on the screen.

Activating the LabWindows/CVI SQL Toolkit

The first time you launch LabWindows/CVI after installing the LabWindows/CVI SQL Toolkit, you are prompted to activate the toolkit. Complete the following steps to activate the LabWindows/CVI SQL Toolkit.

  1. Select the Automatically activate through a secure Internet connection option and click Next. Your computer must be connected to the Internet for this option to work. If you do not have Internet access on your computer, refer to the LabWindows/CVI Release Notes.
  2. The Serial Number option is populated with the number you entered during installation. Click Next.
  3. Fill in the necessary information and click Next.
  4. Check the option if you would like to receive a confirmation email of your activation and click Next.
  5. After a brief moment, you should receive a message indicating whether the LabWindows/CVI SQL Toolkit has been activated or not. Enter or verify your serial number. Click Next.
  6. Continue to follow the instructions on the screen.
  7. When you successfully activate, click Finish. LabWindows/CVI displays a window indicating when this license expires.

For more information about activation, refer to the LabWindows/CVI Release Notes.

After Installation

  • You can find example programs in the following location:
    • LabWindows/CVI 8.1.1 and Earlier—Examples are located in \Program Files\National Instruments\CVIx.x\samples\sql.
    • LabWindows/CVI 8.5 and Later—On Windows 7/Vista, examples are located in \Users\Public\Documents\National Instruments\CVI\samples\sql. On Windows XP, example programs are located in \Documents and Settings\All Users\Documents\National Instruments\CVI\samples\sql.
    Note  As of April 2010 there is no official Microsoft driver for Access databases on 64-bit computers. Because of this, the LabWindows/CVI SQL Toolkit is unable to register the CVI SQL Samples data source that many of the included example programs use. New 64-bit compatibile Access drivers will be available when Microsoft releases Office 2010. The example programs work correctly when you run them in 32-bit mode.

    Once you obtain and install a 64-bit Access driver, complete the following steps to ensure that the SQL examples that use samples.mdb work correctly.
    1. In the Control Panel, select Administrative Tools»Data Sources (ODBC).
    2. Select the System DSN tab and click the Add button to launch a dialog box that lists drivers.
    3. Select the driver you installed and click Finish to launch a dialog box in which you can select a data source name and database.
    4. Enter CVI SQL Samples as the Data Source Name and select the example database located at \Users\Public\Documents\National Instruments\CVI\samples\sql\samples.mdb.
    5. Click the OK button.
  • If you plan to use the SQL Toolkit with an external compiler, a library file for the current compatible external compiler is in the Program Files\National Instruments\Shared\CVI\Extlib directory.

Distribution of an SQL Toolkit Executable or DLL

Refer to the Distributing an SQL Toolkit Executable or DLL topic in the LabWindows/CVI SQL Toolkit Help for information about distributing SQL Toolkit applications.

Known Issues

  • The Microsoft Access ODBC drivers that ship with ADO 2.0 and 2.1.x incorrectly update MEMO field values with NULL for all records if the value of the first record written is not specified. A bug for this problem was reported to Microsoft. This behavior does not occur when using the Microsoft Access OLE-DB Provider.
  • You must include cvi_db.h before any other LabWindows/CVI includes.
  • If multiple threads in your application use this toolkit, you must call DBInit before you call any other toolkit function.
  • Using the LabWindows/CVI SQL Toolkit in multiple threads will not work when using Microsoft Access or any of the Microsoft Jet based drivers with version 3.50 or earlier because the Jet components are not multithread safe.
  • Starting with LabWindows/CVI SQL Toolkit 2.0, functions that return statement or connection handles now return the error code instead of zero if the function fails. You can use DBSetBackwardCompatibility to force these functions to return 0 on failure. You also can use DBSetBackwardCompatibility to force DBColumnType to return one of the eight types supported by LabWindows/CVI SQL Toolkit 1.x instead of the actual type.
  • Starting with LabWindows/CVI SQL Toolkit 2.0, the DBSources, DBDatabases, DBTables, DBIndexes, DBPrimaryKeys, and DBForeignKeys functions now return different fields. You must correct bindings for each of these functions.
  • ADO cannot close a statement if there are unsaved changes to a record. You can call DBCancelRecordChanges to cancel the changes. The most common use of DBCancelRecordChanges is to cancel changes when DBPutRecord fails.
  • Some ODBC drivers update all identical records when you change one record. This action occurs when the driver does not support the features required for positioned updates and must use a query based update.
  • In some cases where ADO 2.0 returned the empty string "", ADO 2.1.x and ADO 2.5 return NULL. This change is common in attribute functions such as DBGetStatementAttribute and DBGetConnectionAttribute.
  • If you delete the last record in a recordset, ADO 2.0 and 2.5 position the cursor at EOF. ADO 2.1.x positions the cursor on the last undeleted record. If you delete the last record within a fetch loop, 2.1.x fetches the last undeleted record again the next time through the loop.
  • Some ADO providers and ODBC drivers allow you to fetch deleted records in the current recordset until you close the recordset. Because ADO 2.1.x sets the cursor to the previous undeleted record when you delete a record, a fetch loop that finds and deletes record can attempt to delete a deleted record and cause an error.
  • ODBC drivers are not required to support the command timeout attribute. When you attempt to set the timeout attribute, ADO 2.0 ignores the error, but ADO 2.1.x and 2.5 report an unknown error.
  • For Access Users—The Access ODBC driver and Access OLE/DB provider, also called the Jet OLE/DB provider, are available from Microsoft. The Access OLE/DB provider provides faster performance.
  • For Btrieve Users—The Btrieve driver might experience problems if the Btrieve Microkernal Engine communication buffer size is smaller than the Btrieve driver Array Size attribute. You can increase the communication buffer size with the BTI Database Setup Utility. You can decrease the array size option when you configure a data source using the ODBC Btrieve Setup dialog or when passing a connection string.
  • For INFORMIX Users—Some INFORMIX error messages may contain more than one error. It is unclear whether all errors displayed will be valid.
  • For INGRES Users—SQL functions may appear to hang unless the following line is present in the CONFIG.ING file: ING_SET=SET LOCKMODE SESSION WHERE READLOCK=NOLOCK
  • For Text Users—When encountering an invalid file, you may receive too many or duplicate errors.

Bug Fixes

The following items are the IDs and titles of the bugs fixed between the LabWindows/CVI SQL Toolkit 2.1 and 2.2. For a list of bug fixes in previous releases, refer to

ID Fixed Issue Has Run-Time Impact?
207895 The GD/GDT/GL/GLT/GT and [US] format strings return incorrect and improperly terminated strings from date/time fields. Yes
207817 DBBind/Map/Put/GetCol functions return incorrect times for format strings that have AM/PM in date/time fields. Yes
161601 DBGetColLongLong code truncates values to INT_MAX. Yes
207900 The \ format string does not return the correct output. Yes
206582 The DBCreateTableFromMap function chooses the wrong data types for float and double values on SQL Server. Yes
207683 DBCreateTableFromMap fails on SQL Server when using a char data type in the map. Yes
126143 64-bit integer parameters in SQL function panels use the wrong data type. No


© 1995–2010 National Instruments Corporation. All rights reserved.

Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.

National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.


CVI, LabVIEW, National Instruments, NI,, the National Instruments corporate logo, and the Eagle logo are trademarks of National Instruments Corporation. Refer to the Trademark Information at for other National Instruments trademarks.

The mark LabWindows is used under a license from Microsoft Corporation. Windows is a registered trademark of Microsoft Corporation in the United States and other countries.

Other product and company names listed are trademarks or trade names of their respective companies.


For patents covering the National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at