Building Visual Basic .NET applications

Db2® products provide a bldapp.bat batch file for compiling and linking Db2 Visual Basic .NET applications. This file is located in the sqllib\samples\.NET\vb directory along with sample programs that can be built with this file. The batch file takes one parameter, %1, for the name of the source file to be compiled (without the .vb extension).

About this task

This task will take you through the basic steps of building a Visual Basic .NET application using bldapp.bat with the DbAuth sample file.

Procedure

To build the program, DbAuth, from the source file, DbAuth.vb, enter:
bldapp DbAuth
To ensure you have the parameters you need when you run the executable, you can specify different combinations of parameters depending on the number entered:
  1. No parameters. Enter just the program name:
       DbAuth
  2. One parameter. Enter the program name plus the database alias:
       DbAuth <db_alias> 
  3. Two parameters. Enter the program name plus user ID and password:
       DbAuth <userid> <passwd>
  4. Three parameters. Enter the program name plus the database alias, user ID, and password:
       DbAuth <db_alias> <userid> <passwd>
  5. Four parameters. Enter the program name plus server name, port number, user ID, and password:
       DbAuth <server> <portnum> <userid> <passwd>
  6. Five parameters. Enter the program name plus database alias, server name, port number, user ID, and password:
       DbAuth <db_alias> <server> <portnum> <userid> <passwd>

What to do next

To build and run the LCTrans sample program, you need to follow more detailed instructions given in the source file, LCTrans.vb.