IBM Support

Using the TSM ODBC Driver with Visual Basic

Question & Answer


Question

How to use the Tivoli Storage Manager (TSM) ODBC driver with Microsoft Visual Basic?

Answer

The ADO Data Control that comes with Microsoft Visual Basic 6.0 can be used with the TSM ODBC driver to access the TSM server. The steps below provide a simple example of how to display a TSM database table. This procedure assumes a familiarity with using Visual Basic 6.0.

1. Create a new "Standard EXE" project.

2. Add the following components to the toolbox:

o Microsoft ADO Data Control 6.0 (SP4) (OLEDB)
o Microsoft DataGrid Control 6.0 (SP5) (OLEDB)

3. Select the ADO Data Control from the toolbox, then draw a control on the
form.

4. Set the following properties for the ADO Data Control:

o (Name): Adodc1
o ConnectionString: DSN=yourdsn;UID=youradminid;PWD=xxxxx
o RecordSource: SELECT * FROM NODES

NOTE: Adodc1 is the default name for the control.

yourdsn = a valid ODBC data source name.

youradminid = a valid TSM administrative ID.

xxxxx = your TSM administrative password.

This example displays the records from the NODES table. The RecordSource "SELECT" statement can be modified to display whatever data you wish. However, it is recommended that one follows these procedures as written in order to verify basic functionality.

5. Select the DataGrid Control from the toolbox, then draw a control on the form.

6. Set the following properties for the DataGrid Control:

DataSource: Adodc1 (this is the default name for the control created in steps 3 and 4 above)

7. Run the project. The information from the NODES table should appear in the DataGrid control.

[{"Product":{"code":"SSGSG7","label":"Tivoli Storage Manager"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Client","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Supported Versions","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Document Information

Modified date:
17 June 2018

UID

swg21104296