hi guys its me again, im trying to start a connection to an oracle database (11g) i have in my computer. The thing is i really dont know how to do it, even though i ve read the threads here in this forum with no luck...
here is the information i have:
problem4.jpg
here is the code:
db.setDatabaseName("XE");
db.setUserName("KillGabio");
db.setPassword("killlll");
db.setHostName("global-0cbe695d");
db.setPort(1521);
if (db.open ()){
if( !query.exec("SELECT * FROM TABLE_PRODUCTOS") )
qDebug() << query.lastError();
else
qDebug( "Selected!" );
return true;}
else{
QMessageBox::critical(0, qApp
->tr
("Cannot open database"),
qApp->tr("Unable to establish a database connection.\n"
"Llamar a Agus.\n\n"
return false;
}
db = QSqlDatabase::addDatabase ("QOCI");
db.setDatabaseName("XE");
db.setUserName("KillGabio");
db.setPassword("killlll");
db.setHostName("global-0cbe695d");
db.setPort(1521);
if (db.open ()){
QSqlQuery query (db);
if( !query.exec("SELECT * FROM TABLE_PRODUCTOS") )
qDebug() << query.lastError();
else
qDebug( "Selected!" );
return true;}
else{
QMessageBox::critical(0, qApp->tr("Cannot open database"),
qApp->tr("Unable to establish a database connection.\n"
"Llamar a Agus.\n\n"
"Click Cancel to exit."), QMessageBox::Cancel);
return false;
}
To copy to clipboard, switch view to plain text mode
and finally the error i get:
NOD32 protected [MSAFD Tcpip [TCP/IP]]NOD32 protected [MSAFD Tcpip [UDP/IP]]NOD32 protected [MSAFD Tcpip [RAW/IP]]NOD32 protected [RSVP UDP Service Provider]NOD32 protected [RSVP TCP Service Provider]Selected!
i disabled nod32 but no luck i dont know what it.
Thank u all in advance and im trying to learn
Bookmarks