Recordset: Updating a snaphot 
Author Message
 Recordset: Updating a snaphot

Hi,

I've created a snapshot recorset with the class wizard, and the data is read
from the Access database via an ODBC connection.
When I'm trying to update, an Exception occurs. Here is the code:

 try
 {

  Edit();
  m_NEXT_OCCURENCE = (m_START_DATE > currTime ? m_START_DATE: currTime);

  if( !CanUpdate( ) )
  {
   AfxMessageBox( "Unable to update the Schedule table recordset." );
   return(3);
  }
  Update();

 }

No message box is displayed (the recordset is updatable). But the call to
the Update method fails. Does anyone know why?

Thanks,

Andre



Fri, 14 Mar 2003 03:00:00 GMT  
 Recordset: Updating a snaphot

Quote:

>Hi,

>I've created a snapshot recorset with the class wizard, and the data is read
>from the Access database via an ODBC connection.
>When I'm trying to update, an Exception occurs. Here is the code:

> try
> {

>  Edit();
>  m_NEXT_OCCURENCE = (m_START_DATE > currTime ? m_START_DATE: currTime);

>  if( !CanUpdate( ) )
>  {
>   AfxMessageBox( "Unable to update the Schedule table recordset." );
>   return(3);
>  }
>  Update();

> }

>No message box is displayed (the recordset is updatable). But the call to
>the Update method fails. Does anyone know why?

By "fails" do you mean it doesn't update, or that you get an error
message?

One problem I kept running into was that you get an error if no values
are being changed.

HTH

Paul.
-------------------------------------------
Expressed opinions are usually my own.
Especially if they're any good (of course).
-------------------------------------------



Sat, 15 Mar 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. SQL/VC++ Updates: Can't update recordset

2. ADO Recordset.Update crash on a multiprocessor machine

3. UpdateType in DAO35 Recordset object methods Update() and CancelUpdate()

4. Updating a Recordset using COM

5. DAO recordset AddNew and Update

6. Not able to update large table using dynaset recordset

7. Updating records in a recordset defined by an SQL join

8. Q: DAO Recordset updates in a multiuser environment

9. update a RecordSet

10. ADO storedproc error: Updating not allowed on recordset

11. Recordset Adds/Updates Conk-out

12. how to update Recordset

 

 
Powered by phpBB® Forum Software