| #include "stdafx.h"
#include "db_oo4o.h"
int main(int argc, char* argv[])
{
ORA_START
ORA_CONNECT("lightbox","study","study")
ORA_QUERY("select * from 社員マスタ")
char szBuff[4096];
ORA_QUERY_LOOP
ORA_QUERY_GET("社員コード",szBuff)
printf( "%s,", szBuff );
ORA_QUERY_GET("氏名",szBuff)
printf( "%s\n", szBuff );
ORA_QUERY_END
ORA_EXECUTE("update 社員マスタ set 氏名 = 'AAA' where 社員コード = '0001'")
ORA_ERROR
printf( "%s\n", e.ErrorMessage() );
_bstr_t strError;
if ( pSession->LastServerErr != 0 ) {
strError.operator = ( pSession->LastServerErrText );
printf( "%s\n", (LPTSTR)strError );
}
if ( pDb != NULL ) {
if ( pDb->LastServerErr != 0 ) {
strError.operator = ( pDb->LastServerErrText );
printf( "%s\n", (LPTSTR)strError );
}
}
ORA_END
return 0;
}
| |