Anyone know how I can get the results in my .cpp file?
pSqlUnit2->m_nResultCode <-- this give a 100
how can I get the value inside a .cpp file?
example:
adsfdf.h
Code:
pSqlUnit2->Exec();
printf("ExecuteQuery Done: result: %i ACC ID: %i \n", pSqlUnit2->m_nResultCode, pSqlUnit2->m_dwAccountID );
now I want to get the sqlunit2 results inside sdgdfg.cpp
Inside
sdgdfg.cpp
I run
databaseManager.Query( hDB, new CQuery_UpdateAccountID(TEXT("DaneosIsSexy"), "1234") );
then on adsfdf.h
Code:
int ExecuteQuery(CNtlDatabaseConnection * pConnection)
{
////---------------------------------------------------------------
FIND_SQLUNIT( SP_AccountSelect, pConnection, pSqlUnit2 );
if( NULL == pSqlUnit2 )
{
return NTL_FAIL;
}
strncpy_s( pSqlUnit2->m_szUserID, m_szUserID, MAX_SIZE_USER_ID );
strncpy_s( pSqlUnit2->m_szUserPW, m_szUserPW, MAX_SIZE_USER_ID );
pSqlUnit2->Exec();
printf("ExecuteQuery Done: result: %i ACC ID: %i \n", pSqlUnit2->m_nResultCode, pSqlUnit2->m_dwAccountID );
return NTL_SUCCESS;
}