#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 view global id TdkObjectGID viewGID("1", _TDK_VIEW, dbPoolIndx); //The view object TdkView view(viewGID); //If the view is in cache copy the view data, otherwise loads the view from the //database and add to cache. if ( TdkPersistenceService::loadObject(&view) == true ) cout << "View carregada com sucesso.\nNome da View: "<