return 1;
}
if(mysql_real_connect (
connection, /* pointer to connection handler */
NULL, /* host to connect, default localhost*/
NULL, /* user name, default local user*/
NULL, /* password, default none*/
"itsodb", /* database name*/
0, /* port */
NULL, /* socket */
0 /* flags*/
) == NULL)
{
/* handle error */
return 1;
}
if(mysql_close (connnection)==NULL)
{
/* handle error */
return 1;
}
exit(0);
}
Figure 7 4 shows a similar task using DB2 CLI. It shows the initialization
tasks, which consists of: the allocation and initialization of the environment
and connection handlers; creation of the connection; transaction processing;
and finally termination of the connection and deallocation of the handlers.
Chapter 7. Application porting
201
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved