|
|
|
![]() | |
|
|
|
To access the contents, click the chapter and section titles.
Visual Basic 6 Black Book
Updating A Database With ChangesAfter changing the fields in a record, you can update a database with the UpdateRecord method of the data, ADO data control, or remote data control. Lets see an example. When the user clicks the Update button in the dbmethods example were developing in this and the previous few topics, we can update the database with the new record like this: Private Sub cmdUpdate_Click() Data1.UpdateRecord End Sub Moving To The Next RecordYou can move to the next record of a database with the MoveNext method of the Recordset property of a data or ADO data control, or of the Resultset property of a remote data control. Lets see an example. When the user clicks the Next button in the dbmethods example were developing in this and the previous few topics, we can move to the next record like this: Private Sub cmdNext_Click() Data1.Recordset.MoveNext End Sub
Moving To The Previous RecordYou can move to the previous record of a database with the MovePrevious method of the Recordset property of a data or ADO data control, or of the Resultset property of a remote data control. Lets see an example. When the user clicks the Previous button in the dbmethods example were developing in this and the previous few topics, we can move to the previous record like this: Private Sub cmdPrevious_Click() Data1.Recordset.MovePrevious End Sub
Moving To The First RecordYou can move to the first record of a database with the MoveFirst method of the Recordset property of a data or ADO data control, or of the Resultset property of a remote data control. Lets see an example. When the user clicks the First button in the dbmethods example were developing in this and the previous few topics, we can move to the first record like this: Private Sub cmdFirst_Click() Data1.Recordset.MoveFirst End Sub Moving To The Last RecordYou can move to the last record of a database with the MoveLast method of the Recordset property of a data or ADO data control, or of the Resultset property of a remote data control. Lets see an example. When the user clicks the Last button in the dbmethods example were developing in this and the previous few topics, we can move to the last record like this: Private Sub cmdLast_Click() Data1.Recordset.MoveLast End Sub The Data-Bound Controls: From Text Boxes To Flex GridsAfter installing a data, remote data, or ADO data control, you can connect that control to other controls through a process called data binding. You bind controls to a data control using the data properties of the bound control. The standard bound controls and their data properties appear in Table 24.1. Using the information in that table, you can connect the listed Visual Basic controls to data controls, remote data controls, and ADO data controls.
|
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. |