P
Praveen
Hi,
I wanted to insert a record in to a database and then get the autonumber of
the row that is inserted using AdoDotnet.
this can be easily done in ADO like below.
TCHAR* szSQL = { _T( "select processid,identifier,emailid,statusmsg from
backgroundprocess where 1=2" ) };
/*open a recordset with the above sql*/
pRsProcessID->AddNew();
pRsProcessID->Fields->GetItem((long)1)->Value = lIdentifier;
pRsProcessID->Fields->GetItem((long)2)->Value = _tcslwr( *bsEmailID );
pRsProcessID->Fields->GetItem((long)3)->Value = szStatusMsg;
pRsProcessID->Update();
lProcessID = (long)pRsProcessID->Fields->GetItem((long)0)->Value;
What steps should I follow to achieve the same with AdoDotnet.
Thanks in advance
Praveen
I wanted to insert a record in to a database and then get the autonumber of
the row that is inserted using AdoDotnet.
this can be easily done in ADO like below.
TCHAR* szSQL = { _T( "select processid,identifier,emailid,statusmsg from
backgroundprocess where 1=2" ) };
/*open a recordset with the above sql*/
pRsProcessID->AddNew();
pRsProcessID->Fields->GetItem((long)1)->Value = lIdentifier;
pRsProcessID->Fields->GetItem((long)2)->Value = _tcslwr( *bsEmailID );
pRsProcessID->Fields->GetItem((long)3)->Value = szStatusMsg;
pRsProcessID->Update();
lProcessID = (long)pRsProcessID->Fields->GetItem((long)0)->Value;
What steps should I follow to achieve the same with AdoDotnet.
Thanks in advance
Praveen