IBM Support

IBM i Access for Windows Toolkit - Database


The following sample programs are available to help develop applications using the IBM i Access for Windows database APIs:


ActiveX automation objects

  • vbdbauto.exe – Visual Basic sample using the database automation objects.

    This Visual Basic samples uses the database automation objects to:

    • Download an IBM i database file to an ASCII text file or to the display
    • Upload an ASCII text file to an existing database file, by appending to the file or by replacing the contents of the file.

    The IBM i Access for Windows conversion objects are also used to convert the data between IBM i and PC formats.

    ** Note: This samples requires service pack SF57098 or later in order to run.

  • vbdtasyn.exe – Visual Basic sample using low-level Data Transfer download automation objects for asynchronous transfers.

    This Visual Basic sample uses the low-level Data Transfer automation objects to perform the following:

    • Asynchronously download data from an IBM i database file
    • Asynchronously upload data to an IBM i database file
    • Display the status of an active asynchronous upload or download request
    • Cancel an active asynchronous upload or download request

    After an asynchronous request is submitted, control is immediately returned to the application without waiting for the transfer to complete. To verify this, you can clear the status list while the request is running.

    For additional sample code that demonstrates how to use the low-level Data Transfer automation objects, see the examples in the online help. To access this file, go to the Start menu and choose Programs -> IBM AS/400 IBM i Access for Windows -> IBM i Access for Windows Toolkit -> IBM i Access for Windows Toolkit -> Database -> ActiveX -> IBM i Access for Windows ActiveX Automation Objects - data transfer.

    This function is initially available in IBM i Access for Windows V5R1M0.

  • vbdtdlr.exe – Visual Basic sample using low-level Data Transfer download automation object.

    This Visual Basic sample uses the low-level Data Transfer download automation object to perform the following:

    • Download data from an IBM i database file
    • Customize how the data will be returned, through the setting of PC file type-specific properties
    • Customize the query to be performed using either Data Transfer or SQL syntax
    • Specify which user ID and password should be used for the transfer
    • Save a download transfer request which can be used from the high-level automation object, the low-level automation object, the batch Data Transfer application or the interactive Data Transfer application.
    • Load a previously saved Data Transfer download request and use its settings to transfer data using the low-level download automation object. The request could have been created using an ActiveX automation object or the Data Transfer application.

    For addition sample code, demonstrating how to use the low-level Data Transfer download automation object, see the examples in the online help. To access this file, go to the Start menu and choose Programs -> IBM AS/400 IBM i Access for Windows -> IBM i Access for Windows Toolkit -> IBM i Access for Windows Toolkit -> Database -> ActiveX -> IBM i Access for Windows ActiveX Automation Objects - data transfer.

    This function is initially available in IBM i Access for Windows V5R1M0.

  • vbdtdxfr.exe – Visual Basic sample using high-level Data Transfer download automation object.

    This Visual Basic sample uses the high-level Data Transfer automation object to perform the following:

    • Download data from an IBM i database file, using one line of code
    • Upload data to an IBM i database file, using one line of code
    • Run an existing Data Transfer request file
    • Specify user ID and password values to override the default security values when performing a database transfer

    For additional sample code that demonstrates how to use the high-level Data Transfer automation object, see the examples in the online help. To access this file, go to the Start menu and choose Programs -> IBM AS/400 iSeries Access for Windows -> iSeries Access for Windows Toolkit -> iSeries Access for Windows Toolkit -> Database -> ActiveX -> iSeries Access for Windows ActiveX Automation Objects - data transfer.

    This function is initially available in IBM i Access for Windows V5R1M0.

  • vbdtulr.exe – Visual Basic sample using low-level Data Transfer upload automation object.

    This Visual Basic sample uses the low-level Data Transfer upload automation object to perform the following:

    • Create a data file or a source file on an IBM i system
    • Append data to an existing IBM i data or source file
    • Save an upload transfer request which can be used from the high-level automation object, the low-level automation object, the batch Data Transfer application or the interactive Data Transfer application.

    For additional sample code that demonstrates how to use the low-level Data Transfer upload automation object, see the examples in the online help. To access this file, go to the Start menu and choose Programs -> IBM AS/400 iSeries Access for Windows -> iSeries Access for Windows Toolkit -> iSeries Access for Windows Toolkit -> Database -> ActiveX -> iSeries Access for Windows ActiveX Automation Objects - data transfer.

    This function is initially available in IBM i Access for Windows V5R1M0.


C/C++ APIs

  • dbapisp1.exe – C programs that demonstrate use of the Database APIs (also referred to as Optimized SQL APIs).

    This is a group of small C programs that demonstrate the use of all three categories of database APIs--Catalog, SQL, and Native Database--to do the following:

    • Retrieve information about objects (libraries, files, fields, etc).
    • Create a file, override members and use block insert to put records into the different members.
    • Add a library to the user's library list, get a library list and step through it, and look for a library on the system.
    • Use SQL APIs to query a database table.

ODBC

  • odbcsmpl.exe – C Sample Program using the IBM i Access for Windows ODBC Driver.

    This code demonstrates how to use the IBM i Access for Windows ODBC Driver to perform basic SQL tasks, including:

    • creating a table
    • inserting records into a table
    • retrieving a table name
    • retrieving a column name
    • retrieving rows from a table
    • dropping a table

Document information

More support for: Power Systems

Version: Version Independent

Operating system(s): IBM i

Reference #: T1027244

Modified date: 28 March 2018


Translate this page: