Editing a field in and ADO record set 
Author Message
 Editing a field in and ADO record set
My application has a tree view built from redords in an ADO record set.
I want the user to be able to click on a node, and either add a record
or edit a record.  How do I do this?  The tree part seems to work fine,
but I'm getting nothing but greif from VB6 trying to edit or add
records.  The books and help system are wothless so far.

Thanks for any  h e l p f u l  responses.



Fri, 07 Dec 2001 03:00:00 GMT
 Editing a field in and ADO record set

Can you show us some of the code which is causing you grief?

Quote:

> My application has a tree view built from redords in an ADO record set.
> I want the user to be able to click on a node, and either add a record
> or edit a record.  How do I do this?  The tree part seems to work fine,
> but I'm getting nothing but greif from VB6 trying to edit or add
> records.  The books and help system are wothless so far.

> Thanks for any  h e l p f u l  responses.



Fri, 07 Dec 2001 03:00:00 GMT
 Editing a field in and ADO record set
Abdrew,
   Here is the code (sub) you requested.  Thanks for any help.

'   This procedure is called when the user clicks on the Rename menu
' item.
Private Sub mnuNetRename_Click()
  '   Declare local variables
  Dim NewNetworkName As String

  '   Request the new name from the user.  Don't allow edit of node.
  'The reason edit is not allowed is that I would have to use another
  'complex procedure to get the key press and verify it was from the
  'network node.  Where is getchar() when you need it?
  NewNetworkName = InputBox("Enter the new  network name.")
  treNode.Text = NewNetworkName  ' Update the tree display.

  '   Update the name in the database
  rs.CursorType = adOpenKeyset
  rs.LockType = adLockOptimistic
  '   Update the current record's "SubName" field with the new name.
  rs.Fields("SubName") = NewNetworkName
  rs.Update

End Sub

Quote:

> Can you show us some of the code which is causing you grief?


> > My application has a tree view built from redords in an ADO record set.
> > I want the user to be able to click on a node, and either add a record
> > or edit a record.  How do I do this?  The tree part seems to work fine,
> > but I'm getting nothing but greif from VB6 trying to edit or add
> > records.  The books and help system are wothless so far.

> > Thanks for any  h e l p f u l  responses.



Sat, 08 Dec 2001 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Converting from ADO Record Sets to a ADO.NET record set object

2. dynmaic ado Record Set field

3. Setting Repeating Fields from found record set in another database

4. Editing a record from TQuery data set

5. Cancel editing changes for a set of records

6. ADO, Record Set Positioning - SQL - Browse Records

7. TAB setting in Edit fields

8. Setting Values - Drop Down Edit Field

9. Editing Recordset Fields set from a Command

10. Edit Record using ADO?

11. editing records to a .csv file using ADO

12. VB6 and ADO: can't edit record


 
Powered by phpBB® Forum Software