MDatabase question

Joined
Nov 11, 2008
Messages
388
Reaction score
42
Hey doods.

Does anybody know what function it is to retrieve a value from the database ?
I've had a look through the MDatabase class and there doesn't seem to be any function that could return a value from a SELECT query.

Anybody have an idea ? Or even an address ?

Any help would be much appreciated.

Regards,
Nova.
 
MDatabase only deals with executing queries, and opening and closing the connection. You'll want to look into MMatchDBMgr, there has the info you'll want.

Code:
ODBCRecordset ODBC( &m_DB.m_DB );
//The first "m_DB" is a object from the MDatabase class
//The second "m_DB" is a object from the CDatabase class (M$ class) found in the MDatabase class
char szQuery[150];

sprintf_s( szQuery, "SELECT AID FROM Account WHERE Name='%s', pszName );
ODBC.Open( szQuery );

int nRet = ODBC.Field( "Column_Name" ).AsInt();
Be careful of my code as I'm doing it from memory.
 
Last edited:
Upvote 0
Thanks Master, I just looked at the MMatchDBMgr class and it's gonna be annoying to deal with, I'll go look for the function that deals with SELECT query's, I'll write the function in ASM. Shouldn't be too hard, plus it's straight forward.

If anybody has any finds, feel free to share.
 
Upvote 0
Back