ObjectStore Active Toolkit Tutorial

Chapter 4

Creating an ODBC Data Source Using ATK

Introduction
Although OLE DB is a key component of Microsoft Corporation's Universal Data Access strategy, many applications still use ODBC as the protocol to access data sources. Therefore, it is important to be able to access an OLE DB provider from any ODBC consumer.

Software resources
To complete the exercise in this chapter, you need these software resources:
ResourceWhere to Find It
Database

odi\\ATK6.0\Examples\demodbs\carsdemo.db

ISG Navigator

ISG International Software Group at http://www.isgsoft.com or
Microsoft Corporation at http://www.microsoft.com/data/

Microsoft Access

Microsoft Corporation at
http://www.microsoft.com/access/

In this chapter
In this chapter, you access the ObjectStore Active Toolkit OLE DB provider from an ODBC-compliant reporting tool. This chapter contains the following exercise:
ExerciseDescription
Use ATK as an ODBC Data Source

Configure access to an ObjectStore database as an ODBC data source, and access it through an ODBC consumer.

Use ATK as an ODBC Data Source

Overview

To use ATK as an ODBC data source, you first access the ObjectStore Active Toolkit OLE DB provider. Next, create and access an ODBC data source.

Process

To create this application, follow these steps:

  • Configure ISG Navigator.
  • Create the ODBC data source.
  • Access the ODBC data source.

    1 Configure ISG Navigator.

    Configure ISG Navigator so it can access the ObjectStore Active Toolkit OLE DB provider:

  • Using a text editor, open \ISGNav\Def\nav.bnd.
  • In the [TDP-NAMES] section, add this line:
          CARSDEMO = OLEFS
    
    where CARSDEMO is a name that references the ATK Table Data Provider (TDP) and OLEFS is the type of data provider.

  • Add a section called [CARSDEMO] containing this line:
    TDP_CONNECT = 
    ObjectStore Active Toolkit OLE DB Provider;c:\odi\ATK6.0\Examples\demodbs\carsdemo.db
    where ObjectStore Active Toolkit OLE DB Provider is the name of the ObjectStore Active Toolkit OLE DB provider and c:\odi\ATK6.0\Examples\demodbs\carsdemo.db is the full pathname of the ObjectStore database you want to access though an ODBC consumer.

    The modified file looks like this:

    [TDP-NAMES]
    
    CARSDEMO = OLEFS
    
    [CARSDEMO]
    
    TDP_CONNECT = 
    ObjectStore Active Toolkit OLE DB provider;c:\odi\ATK6.0\Examples\demodbs\carsdemo.db
  • Save the nav.bnd file.

    2 Create the ODBC data source.

    Create a new ODBC data source that points to the carsdemo.db database through the ISG Navigator Driver/ObjectStore Active Toolkit OLE DB provider.

  • Open the Windows Control Panel and run the ODBC 32 configuration program.
  • Click Add to create a new ODBC source.
  • From the list of available drivers, select ISG Navigator Driver.

  • Enter ODIATKDEMO as the Data Source Name.
  • Enter CARSDEMO as the Default TDP Name. This is the name you specified in the [TDP-NAMES] section of the nav.bnd configuration file.

    3 Access the ODBC data source.

    Open the ATK-linked ODBC source using an ODBC consumer application, such as Microsoft Access.

  • Start Access.
  • Create a new database.
  • Select Link Tables from the Tables sheet shortcut menu; this will enable you to insert a linked table into the database.

  • Select the ODBC Databases file type.

  • On the MachineData Source sheet of the Select Data Source dialog box, choose ODIATKDEMO and click OK.

    The Link Tables dialog box appears. It lists all the data views defined in the carsdemo.db.

  • Select table1.

    Access inspects the table1 data view and retrieves the names and definitions of its columns.

  • Click OK without specifying an identifier field.

    Now you can browse table1 using Access.

  • Double-click on table1 to list its records.

    Summary

    In this chapter, you configured ISG Navigator so that you could access the ObjectStore Active Toolkit OLE DB provider. Next, you created an ODBC data source based on an ObjectStore database. Then you accessed the data source using an ODBC consumer, which displayed the data returned by its query.

    Once you have configured ISG Navigator to work with ATK, you can access the ATK OLE DB data source from any ODBC-compliant tool, such as Microsoft Access, Crystal Reports, or any other ODBC consumer.



    [previous] [next]

    Copyright © 1998 Object Design, Inc. All rights reserved.

    Updated: 05/11/99 12:00:29