怎样用ODBC链接VC++和oracle

有没有一个实例教我一下具体步骤。
2025-01-24 08:30:06
推荐回答(1个)
回答1:

http://icese.net/icetool/other/testdatabasedll.rar

//连接Access数据库
retCode=icePub_databaseConnect(DBTYPE_Access, "TEST", "", szFile, "", "", "", &m_henv, &m_hdbc);

//连接SQL Server数据库
//icePub_databaseConnect(DBTYPE_SQLServer, "sqltest", "test", "", "(local)", "sa", "", &m_henv, &m_hdbc);

//连接MySQL数据库
//icePub_databaseConnect(DBTYPE_MySQL, "TEST", "test", "", "localhost", "root", "123456", &m_henv, &m_hdbc);

//连接DB2数据库
//icePub_databaseConnect(DBTYPE_DB2, "TEST", "TEST", "", "DB2", "db2admin", "123456", &m_henv, &m_hdbc);

//连接Oracle数据库
//icePub_databaseConnect(DBTYPE_Oracle, "TEST1", "", "", "bjrocket", "system", "system", &m_henv, &m_hdbc);

可参考