1 Replies - 10825 Views - Last Post: 19 February 2011 - 11:18 AM Rate Topic: -----

#1 Juriezelie  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 19-February 11

Edit records and Search funtions using VB6 and ADODC tools

Posted 19 February 2011 - 02:40 AM

1. How to edit a record in VB6 in (SQLyog)database?
scenario: I am trying to edit the records in database by transferring the records into specific text box and disabling the datagrid in VB6. I try to use this codes:

Private Sub cmdedit_Click()
DataGrid2.Enabled = False
Frame5.Enabled = True

Adodc1.Recordset.Fields("Division").Value = "Division.Text"
Adodc1.Recordset.Fields("School").Value = "School.Text"
Adodc1.Recordset.Fields("Location").Value = Location.Text
Adodc1.Recordset.Fields("Level").Value = Level.Text
Adodc1.Recordset.Fields("Permit").Value = Permit.Text
Adodc1.Recordset.Fields("Recognition").Value = Recognition.Text
Adodc1.Recordset.Update

When I use this code the records are deleted in datagrid bute the space provided for them are still present and additional space are provided for the new record what should I do?
2. How to make a search function using vb6 and ADODC where I can Categorize specific record?
Please help me! :)

Is This A Good Question/Topic? 0
  • +

Replies To: Edit records and Search funtions using VB6 and ADODC tools

#2 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 572
  • View blog
  • Posts: 2,985
  • Joined: 19-May 09

Re: Edit records and Search funtions using VB6 and ADODC tools

Posted 19 February 2011 - 11:18 AM

Two things. First remove the quotes around Division.Text and School.Text. Then you need to refresh your datagrid:
DataGrid2.Refresh
See if that helps you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1