Update problem! 
Author Message
 Update problem!

I would like to update certain record in my Access database (through ODBC).
Can anyone tell me some general way how it should be done? I used this
procedure:

    pRecordset->Edit();
.........................
// here I put all the values into the attributes of recordset
.........................
    pRecordset->Update();

But, my program hangs on the Edit() function! It throws an exception and
tells me that my Recordset is read-only. In fact, it stops in the MFC line
of code:
ASSERT(m_hstmt != SQL_NULL_HSTMT);
 How can I change my recordset to be able to update some data? Thanks in
advance.

    Milovan



Wed, 23 Jul 2003 07:46:04 GMT  
 Update problem!

show us your pRecordset->Open(???) function !

Quote:

> I would like to update certain record in my Access database (through ODBC).
> Can anyone tell me some general way how it should be done? I used this
> procedure:

>     pRecordset->Edit();
> .........................
> // here I put all the values into the attributes of recordset
> .........................
>     pRecordset->Update();

> But, my program hangs on the Edit() function! It throws an exception and
> tells me that my Recordset is read-only. In fact, it stops in the MFC line
> of code:
> ASSERT(m_hstmt != SQL_NULL_HSTMT);
>  How can I change my recordset to be able to update some data? Thanks in
> advance.

>     Milovan



Sat, 26 Jul 2003 00:14:38 GMT  
 Update problem!
My mistake! Sorry. Some Visual C++ files were corrupted. Everything now
works o.k.! Thanks, anyway!!!

    Milovan


Quote:

> show us your pRecordset->Open(???) function !

> > I would like to update certain record in my Access database (through
ODBC).
> > Can anyone tell me some general way how it should be done? I used this
> > procedure:

> >     pRecordset->Edit();
> > .........................
> > // here I put all the values into the attributes of recordset
> > .........................
> >     pRecordset->Update();

> > But, my program hangs on the Edit() function! It throws an exception and
> > tells me that my Recordset is read-only. In fact, it stops in the MFC
line
> > of code:
> > ASSERT(m_hstmt != SQL_NULL_HSTMT);
> >  How can I change my recordset to be able to update some data? Thanks in
> > advance.

> >     Milovan



Sat, 26 Jul 2003 07:06:49 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. UPDATE problem

2. Pro*C Cursor-Update problem

3. MS ACCESS97 Multiple Table Join - Edit/Update Problems

4. CDaoRecordset::Update Problem

5. CDaoRecordset::Update Problems

6. ADO update problem

7. CRecordset::Update problem

8. Empty string Update problem!

9. 'Hard Question' Update Problem

10. OLE DB From VC++ 6.0 Delayed Update Problem on Insert

11. CRecordset Update Problem

12. Insert and update problem after changing db

 

 
Powered by phpBB® Forum Software