Directory: sqllib\samples\.NET\cs.
Table 1. Samples that deal with database Level database objects in Db2.
| Sample program name |
Program description |
DbAuth.cs |
How to grant/display/revoke authorities at the database level. |
DbDatAdp.cs |
How to use a DB2DataAdapter. |
DbDatMap.cs |
How to set up DataTable and DataColumn mappings. |
DbDsetCn.cs |
How to add existing constraints to a DataSet. |
DbEvent.cs |
How to handle DB2DataAdapter events. |
DbUse.cs |
How to use database objects. |
DbValue.cs |
How to obtain a single value from a database. |
Table 2. Samples that deal with table level database objects in Db2®.
| Sample program name |
Program description |
TbConstr.cs |
How to work with table constraints. |
TbInfo.cs |
How to get and set information at a table level. |
TbPriv.cs |
How to grant/display/revoke table level privileges. |
TbSel.cs |
How to select from each of: insert, update, delete. |
TbTrig.cs |
How to use a trigger on a table. |
TbUse.cs |
How to manipulate table data and connect to/disconnect from a
database. |
Table 3. Samples that deal with data type level database objects in Db2.
| Sample program name |
Program description |
DtLob.cs |
How to use the LOB data type. |
Table 4. Samples that demonstrate stored procedures in Db2.
| Sample program name |
Program description |
SpCat.db2 |
Drops and creates the procedures implemented in SpServer.cs. |
SpClient.cs |
Client program used to call the stored procedures in SpServer.cs. |
SpCreate.db2 |
Creates the external procedures implemented in SpServer.cs. |
SpDrop.db2 |
Drops the external procedures created in SpCreate.db2 for C#. |
SpReturn.cs |
Client application that calls the stored procedure EMP_DETAILS and obtains its
return value. |
SpServer.cs |
C# external code implementation of procedures created in SpCat.db2. |
EmpDetails.db2 |
CLP script that creates a stored procedure named EMP_DETAILS. |
Table 5. Samples that demonstrate user-defined functions in Db2.
| Sample program name |
Program description |
UdfCat.db2 |
Drops and creates the external UDFs implemented in UdfSrv.cs. |
UdfCli.cs |
Client application that calls the user-defined functions in UdfSrv.cs. |
UdfCreate.db2 |
Creates the external UDFs implemented in UdfSrv.cs. |
UdfDrop.db2 |
Drops the external UDFs created in udfcreate.db2 for C#. |
UdfSrv.cs |
User-defined scalar functions called by UdfCli.cs. |
Table 7. Samples that demonstrate loosely coupled transactions in Db2
| Sample program name |
Program description |
empcat.bat |
Catalogs the stored procedure EMP_DETAILS for the C# client program,
SpReturn. |
LCTrans.cs |
Demonstrates loosely coupled transactions. |
regCOM.bat |
Registers COM+ objects for the C# LCTrans program. |
RootCOM.cs |
This file is used to create a library assembly RootCOM.dll. LCTrans.cs refers
to the classes and methods that are defined in this file. |
SubCOM.cs |
This file is used to create a library assembly SubCOM.dll. LCTrans.cs refers
to the classes and methods that are defined in this file. |