#include "stdafx.h" #include "TdkException.h" #include "TdkAccessConDescriptor.h" #include "TdkPersistenceService.h" #include "TeDBConnectionsPool.h" #include "TeDbConnection.h" void main(int argc, char* argv[]) { try { //Instancia um descritor da base Access a ser aberta. TdkAccessConDescriptor desc( "teste.mdb" ); //Connect the database and insert the driver int the pool std::string sDbDesc = desc.getDbKey(); TeDBConnectionsPool::instance().getDatabase( sDbDesc ); int dbPoolIndx = TeDBConnectionsPool::instance().getDBConnectionIndx( sDbDesc ); //Registering default factories TdkObjectFactory::defaultFactoriesRegistration(); /* CONECTA COM O BANCO */ //Define the theme global id TdkObjectGID themeGID("1", _TDK_THEME, dbPoolIndx); //The theme object TdkTheme theme(themeGID); if(TdkPersistenceService::loadObject(&theme) == true) cout << "Tema carregado com sucesso.\nNome do Tema: " << theme.name(); else cout << "Tema nao foi achado.\nTema id procurado: "<