ret = SQLAllocHandle(SQL_HANDLE_DBC, *henv, *hdbc);
if (ret != SQL_SUCCESS)
{
/* handle error */
return 1;
}
/* connect to the database */
ret = SQLConnect(*hdbc
                     (SQLCHAR *)"itsodb2",
                     SQL_NTS,
                     (SQLCHAR *)NULL /*user*/, 
                     SQL_NTS,
                     (SQLCHAR *)NULL /* password*/,
                     SQL_NTS);
if (ret != SQL_SUCCESS)
{
/* handle error */
return 1;
}
/* disconnect from the database */
ret = SQLDisconnect(hdbc);
if (ret != SQL_SUCCESS)
{
/* handle error */
return 1;
}
/* free connection handle */
ret = SQLFreeHandle(SQL_HANDLE_DBC, *hdbc);
if (ret != SQL_SUCCESS)
{
/* handle error */
return 1;
}
/* free environment handle */
ret = SQLFreeHandle(SQL_HANDLE_ENV, *henv);
if (ret != SQL_SUCCESS)
{
/* handle error */
return 1;
}
exit(0);
}
Processing query
 Chapter 7. Application porting 
203






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

san diego web hosting

 

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