VB6 and ADO: can't edit record 
Author Message
 VB6 and ADO: can't edit record

I am making a form with an ADODC control on it, and text boxes
which are linked to a field from the ADODC control table. I have
menu items to add, save, and edit the current record. Add works
fine when I do this: adodc1.recordset.addnew. Save works fine
when I do this: adodc1.recordset.update. But it seems when I do
adodc1.recordset.edit to edit the current record, I get a compile
error.

How do I edit the current record using the ADO control?
Why doesn't the ADO control recordset property support edit?

--
http://www.***.com/ ~robertsc30/
Free HLP files for: Access 97 object reference, VB6 object
reference. Plus lots of freeware.

Help in the cure for leukemia by using Peer-to-peer computing.
http://www.***.com/



Fri, 24 Oct 2003 22:02:14 GMT
 VB6 and ADO: can't edit record

Hello Chuck
1) There is no Edit method as such

2) Try

Adodc.Recordset.Mode = ad ModeReadWrite
Adodc.Recordset..Fields(A).Value = TextA.Text
Adodc.Recordset..Fields(B).Value = TextB.Text
etc.
Adodc.Recordset..Update

HTH
Sukesh


Quote:
> I am making a form with an ADODC control on it, and text boxes
> which are linked to a field from the ADODC control table. I have
> menu items to add, save, and edit the current record. Add works
> fine when I do this: adodc1.recordset.addnew. Save works fine
> when I do this: adodc1.recordset.update. But it seems when I do
> adodc1.recordset.edit to edit the current record, I get a compile
> error.

> How do I edit the current record using the ADO control?
> Why doesn't the ADO control recordset property support edit?

> --
> http://www.crosswinds.net/~robertsc30/
> Free HLP files for: Access 97 object reference, VB6 object
> reference. Plus lots of freeware.

> Help in the cure for leukemia by using Peer-to-peer computing.
> http://www.intel.com/cure



Sat, 25 Oct 2003 12:37:29 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. D1-Oracle-Tquery-Dbgrid edit gives 'couldnt perform edit cos another user changed record

2. VB6,Access97,ADO - Update query doesn't update all records

3. VB6 ADO and Multiple Records/Single Records

4. Editing an existing record in VB6

5. Editing and deleting record from access using VB6

6. VB6 & ADO Datagrid: cannot edit fields

7. if you will promise Allahdad's swamp against cans, it will angrily depart the unit

8. problem with access- doesn't allow to edit record

9. Problem with Access - doesn't allow to edit record

10. Couldn't perform the edit because another user changed the record

11. How to force ADO to lock current record, without changing record's contents

12. Edit a record with ADO and ASP


 
Powered by phpBB® Forum Software