Directories. ActiveX Data Objects: sqllib\samples\VB\ADO
; Microsoft Transaction
Server: sqllib\samples\VB\MTS
; Remote Data Objects: sqllib\samples\VB\RDO
.
Table 1. Visual Basic ActiveX
Data Objects sample program files
Type of sample |
Sample program name |
Program description |
Client level |
cliExeSQL.bas |
How to execute SQL statements. |
Client level |
cli_Info.bas |
How to get/set client level information. |
Database level |
dbConn.bas |
How to connect/disconnect from a database. |
Database level |
dbInfo.bas |
How to get and set information at a database level. |
Database level |
dbCommit.bas |
How to control autocommit dynamically on the database
level. |
Data type level |
dtHier.bas |
How to retrieve hierarchical data. |
Data type level |
dtLob.bas |
How to get LOB data. |
Stored procedures |
spCall.bas |
How to call stored procedures. |
User-defined functions |
udfUse.bas |
How to create and work with UDTs and UDFs. |
Table 2. Visual Basic Microsoft Transaction
Server sample program files
Sample program name |
Program description |
db2com.vbp |
This Visual Basic project demonstrates updating
a database using the Microsoft Transaction Server. It creates
a server DLL used by the client program, db2mts.vbp , and
has four class modules:
- UpdateNumberColumn.cls
- UpdateRow.cls
- UpdateStringColumn.cls
- VerifyUpdate.cls
For this program a temporary table, DB2MTS , is created
in the sample database. |
db2mts.vbp |
This is a Visual Basic project for a client
program that uses the Microsoft Transaction Server to call
the server DLL created from db2com.vbp . |
LCTransTest.vbp |
This Visual Basic project demonstrates a loosely-coupled
transaction on a Db2® database. It creates
a server DLL used by the client program, main.vbp, and has one class module,
TestClass.cls . A temporary table, LCTEST, is created in the sample
database. |
main.vbp |
This is a Visual Basic project for a client
program that uses the Microsoft Transaction Server to call
the server DLL created from LCTransTest.vbp. |
Table 3. Visual Basic Remote Data
Objects sample program files
Sample Program Name |
Program Description |
Bank.vbp |
An RDO program to create and maintain data
for bank branches, with the ability to perform transactions on customer accounts.
The program can use any database specified by the user as it contains the
DDL to create the necessary tables for the application to store data. |