ODBC database problem
-
Hi all I am using a database application program using ODBC with MS Access as the database. While navigating through the database,it is missing a particular row. my code look like this m_rs.Open( CRecordset::snapshot, _T( "SELECT * FROM DAUArinc717Frame2" ) ); m_rs.Move( Index ); for(i=0;i<128;i++) { data = (BYTE)strtoul( m_edit2, 0, 16 ); str.Format("%d",data); m_rs.Edit(); m_rs.m_Data = str; m_rs.Update(); m_rs.MoveNext(); b2 = strtoul( m_edit2, 0, 16 )>> 8; str.Format("%d",b2); m_rs.Edit(); m_rs.m_Data = str; m_rs.Update(); m_rs.MoveNext(); } I am updating to the database, the values read from the GUI.In this process when i==3,in that particular location in my database(row==264),it is skipping without updating and is moving to the next row. Please help me.. Thanks in advance Regards Deepu
-
Hi all I am using a database application program using ODBC with MS Access as the database. While navigating through the database,it is missing a particular row. my code look like this m_rs.Open( CRecordset::snapshot, _T( "SELECT * FROM DAUArinc717Frame2" ) ); m_rs.Move( Index ); for(i=0;i<128;i++) { data = (BYTE)strtoul( m_edit2, 0, 16 ); str.Format("%d",data); m_rs.Edit(); m_rs.m_Data = str; m_rs.Update(); m_rs.MoveNext(); b2 = strtoul( m_edit2, 0, 16 )>> 8; str.Format("%d",b2); m_rs.Edit(); m_rs.m_Data = str; m_rs.Update(); m_rs.MoveNext(); } I am updating to the database, the values read from the GUI.In this process when i==3,in that particular location in my database(row==264),it is skipping without updating and is moving to the next row. Please help me.. Thanks in advance Regards Deepu
Deepu Antony wrote:
In this process when i==3,in that particular location in my database(row==264),it is skipping without updating and is moving to the next row.
So does
Update()
throw an (CDBException
) exception?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Deepu Antony wrote:
In this process when i==3,in that particular location in my database(row==264),it is skipping without updating and is moving to the next row.
So does
Update()
throw an (CDBException
) exception?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Thanks for the reply. it is working now.I didn't changed anything.Sometimes it happens like that. Don't know the exact reason