-
In this part of the lib I'm speaking of that : https://docs.pocoproject.org/current/Poco.Data.ODBC.html Here is the ref to the original function with the same signature in the Windows ODBC API
An example of code, (just set a valid Connexion String, of course) #include <iostream>
#include <Poco/Data/SessionFactory.h>
#include <Poco/Data/ODBC/Connector.h>
using namespace Poco::Data;
void main() {
try {
ODBC::Connector::registerConnector();
Session session{ SessionFactory::instance().create(ODBC::Connector::KEY, "Driver={IBM i Access ODBC Driver};SYSTEM=192.168.0.10;DBQ=BASENAME;UID=user;PWD=passwd") };
if (session.isConnected()) {
StatementImpl *hstmt = session.createStatementImpl();
ODBC::SQLTables(hstmt, NULL, 0, NULL, 0, NULL, 0, NULL, 0);
}
}
catch (const Poco::Exception& err) {
std::cerr << "Error thrown: " << err.displayText() << "\n";
}
} Resulting to the message:
|
Beta Was this translation helpful? Give feedback.
See POCO Data User Guide