}
ret = SQLEndTran( SQL_HANDLE_DBC, hdbc, SQL_ROLLBACK );     
if (ret != SQL_SUCCESS)
{
/* handle error */
return 1;
}
/* free the statement handle */
ret = SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
if (ret != SQL_SUCCESS)
{
/* handle error */
return 1;
}
For all the applications using the MySQL Connector/C++, you may want to 
consider converting them to DB2 CLI. The typical conversion process would 
remain the same as both MySQL C and MySQL C++ use the same flow of the 
program.
7.2.5  Converting MyODBC applications to DB2 UDB 
MySQL supports the ODBC database API to connect to a MySQL database 
server using the optional product called MySQL Connector/ODBC (also known 
as MyODBC). MyODBC supports ODBC at two levels: MyODBC 2.5 supports 
ODBC 2.5x and MyODBC 3.5x is a 32 bit ODBC Driver supporting ODBC 3.51 
specification.
As DB2 CLI is also based on the ODBC specification, and you can build ODBC 
applications without using any ODBC driver manager, so the application 
conversion is quite easy. All you need to do is use DB2 s ODBC driver by linking 
your application with 
libdb2
. The DB2 CLI driver also acts as an ODBC driver 
when loaded by an ODBC driver manager. DB2 CLI conforms to ODBC 3.51. 
Figure 7 6 shows the MySQL driver and DB2 ODBC driver in the ODBC 
scenario; it shows that an application written for one ODBC driver can easily be 
converted to another driver. It also shows various components involved in the 
ODBC application and how they are mapped from MyODBC to DB2 ODBC.
 Chapter 7. Application porting 
211






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