IBM DB2 Bedienungsanleitung Seite 177

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 298
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 176
Chapter 4. Deploying applications with DB2 163
Another approach is to compile and link manually from the command line. The
options used for compile and link vary depending on the platforms. A complete
reference can be found at:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.apdv
.cli.doc/doc/t0007141.html
In our demonstration, we use the manual method and build the application from
the command line. We use gcc, which is a popular compiler on many platforms
and sometimes is included in the default installation. The compile flag -m64 is
used to inform the compiler that operating system is 64-bit.
The build procedure is as follows:
1. Under the DB2 development environment, create a working folder, for
example, work.
2. Save the application code into the folder work. Our application is named
itso_cliapp.c.
3. Compile and link the application in one step:
gcc -o itso_cliapp -m64 -I/home/db2inst1/sqllib/include
-L/home/db2inst1/sqllib/lib -ldb2 itso_cliapp.c
4. Test the application by providing it with the connection information of a known
database. Required arguments include: host name, port number, database
name, user, and password.
A successful connection test is shown in Example 4-9.
Example 4-9 A successful connection using itso_cliapp
db2inst1@mensa:~/work> ./itso_cliapp mensa 50000 itso db2inst1 password
Connecting to the database itso ...
Connected to the database itso.
Disconnecting from the database itso...
In case there is any incorrect connectivity information input, the connection
might fail, and the application will return diagnostic messages as shown in
Example 4-10.
Note: Because we are using a DSN-less connection, the database that we
are connecting to does not have to be existing in local catalog directory.
Seitenansicht 176
1 2 ... 172 173 174 175 176 177 178 179 180 181 182 ... 297 298

Kommentare zu diesen Handbüchern

Keine Kommentare

Longshine LCS-844MT manuels

Manuels d'utilisation et guides de l'utilisateur pour Équipement Longshine LCS-844MT.
Nous fournissons des manuels en pdf 1 Longshine LCS-844MT à télécharger gratuitement par type de document : Manuel de l'utilisateur






Plus de produits et de manuels pour Équipement Longshine

Modèles Type de document
LCS-FS6108-B Manuel de l'utilisateur        Longshine LCS-FS6108-B User Manual [de] [en] , 40 pages
LCS-FS6116-C Manuel de l'utilisateur   Longshine LCS-FS6116-C User Manual, 7 pages
LCS-GS7104+1 Manuel de l'utilisateur   Longshine LCS-GS7104+1 User Manual [pl] [cs] [en] [de] , 8 pages
LCS-GS7105-D Manuel de l'utilisateur        Longshine LCS-GS7105-D User Manual [en] [de] [fr] , 34 pages
LCS-GS7108-D Manuel de l'utilisateur        Longshine LCS-GS7108-D User Manual [en] , 36 pages
LCS-GS8116-A Manuel de l'utilisateur        Longshine LCS-GS8116-A User Manual, 32 pages
LCS-GS8208-A V.1 Manuel de l'utilisateur   Longshine LCS-GS8208-A V.1 User Manual [en] [de] , 22 pages
LCS-GS8208-A V.2 Manuel de l'utilisateur   Longshine LCS-GS8208-A V.2 User Manual [fr] [de] , 41 pages
LCS-GS9120 Manuel de l'utilisateur   Longshine LCS-GS9120 User Manual, 9 pages
LCS-GS9428 Manuel de l'utilisateur   Longshine LCS-GS9428 User Manual, 46 pages
LCS-IR2114-D Manuel de l'utilisateur   Longshine LCS-IR2114-D User Manual [en] [de] , 53 pages
LCS-K602-A Manuel de l'utilisateur   Longshine LCS-K602-A User Manual [pl] [cs] [en] [de] , 13 pages
LCS-K916 Manuel de l'utilisateur   Longshine LCS-K916 User Manual [pl] [de] , 21 pages
LCS-KL-2716M Manuel de l'utilisateur   Longshine LCS-KL-2716M User Manual, 38 pages
LCS-PS112 Manuel de l'utilisateur   Longshine LCS-PS112 User Manual, 81 pages
LCS-US204 Manuel de l'utilisateur   Longshine LCS-US204 User Manual [de] [en] , 43 pages
LCS-WA5-45 Manuel de l'utilisateur   Longshine LCS-WA5-45 User Manual, 32 pages
LCS-WARC-N Manuel de l'utilisateur       Longshine LCS-WARC-N User Manual, 265 pages
LCS-WRN-3211 Manuel de l'utilisateur   Longshine LCS-WRN-3211 User Manual, 58 pages