Ibm Data Server DB2 Bedienungsanleitung Seite 276

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 298
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 275
262 DB2 Deployment Guide
/* disconnect from the database */
printf("\n Disconnecting from the database %s...\n", dbname);
cliRC = SQLDisconnect(hdbc);
}
/* free connection handle & environment handle */
cliRC = SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
cliRC = SQLFreeHandle(SQL_HANDLE_ENV, henv);
}
A.2 PHP
Example A-2 shows the application used to demonstrate the deployment of the
DB2 PHP application.
Example: A-2 Sample PHP application
<?php
/* A sample php application.
Use this program to test connection to a database.
Database connectivity information is read as command line arguments.
Give arguments in the following order:
hostname port_number database_name user password
Run the application as following:
php itso_phpapp.php hostname port_number database_name user password
*/
# Varifying the number of command line arguments.
if($argc != 6) {
printf(" ERROR: incorrect command line arguments.\n Use hostname
port_number database_name user_name password\n", $argv[0]);
exit(1);
}
# Creating dsn from command line arguments.
$dsn = "HOSTNAME=" . $argv[1] .
";PORT=" . $argv[2] .
";DATABASE=" . $argv[3] .
";PROTOCOL=TCPIP" .
";UID=" . $argv[4] .
";PWD=" . $argv[5];
print "Trying to establish connection...\n";
Seitenansicht 275
1 2 ... 271 272 273 274 275 276 277 278 279 280 281 ... 297 298

Kommentare zu diesen Handbüchern

Keine Kommentare

Swisher LS67526S manuals

Owner’s manuals and user’s guides for Log splitters Swisher LS67526S.
We providing 1 pdf manuals Swisher LS67526S for download free by document types: User Manual






More products and manuals for Log splitters Swisher

Models Document Type
LS11534 User Manual   Swisher LS11534 User's Manual, 24 pages
LS5527S User Manual   Swisher LS5527S User's Manual, 9 pages