With the IBM® Database Add-Ins for Visual Studio, you can define OLE DB table functions that access OLE DB data sources and extract data from them. You can use the IBM OLE DB Table Function Designer to create an OLE DB table function. With the designer, you can optionally create a DB2 table that contains the OLE DB table function data, and a DB2 view for the table function.
Prerequisite: The IBM OLE DB Table Function Designer uses table functions that are provided by the DB2 database engine. Before you create your first OLE DB table function, you must enable the use of these functions.
To create an OLE DB table function:
The IBM OLE DB Table Function Designer opens.
Note: You must specify information for fields that are in the Table Function view and the Function Data view.
For detailed information about the fields in the designer views, see IBM OLE DB Table Function Designer.
The table function definition script is run and the table function is created in the database.
The table function is shown in the Functions folder of your DB2 data connection in the Server Explorer. If you selected the option to create a DB2 table from the OLE DB data, the table is created and is shown in the Tables folder of your data connection. If you selected the option to create a DB2 view for the table function, the view is created and is shown in the Views folder of your data connection.
You can run an OLE DB table function in the same way that you run a DB2 SQL function.
Developing OLE DB Table Functions | OLE DB Table Functions | Running Procedures or Functions