Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 37,268 times

Related Categories

Add & Remove Records

To add or remove a record from the Data Control, you simply use that AddNew and Delete methods:

Private Sub cmdAdd_Click()
     datTitles.Recordset.AddNew ' add a new record to the table
End Sub

Private Sub cmdDelete_Click()
     datTitles.Recordset.Delete ' delete current record
End Sub

James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.

Comments

  • Re: [139] Add & Remove Records

    Posted by helpmeplease on 21 Nov 2006

    Hi,
        I tried to run it but there's an error..
        The error was:
        Run time error '91':
           Object variable o...

  • Re: [139] Add & Remove Records

    Posted by Hassan Niazi on 26 Jun 2006

    Hi all,


    can we use a database on internet to add record to it if yes please tell me as soon as posible


    REGARDS 

  • .delete

    Posted by frenzie on 22 Sep 2005

    When using a foxpro table, all the .delete method does is mark the record as deleted. How do i remove the record permanently.
    My database file keeps getting a lot bigger every time my program runs, t...

  • Remove Blank Records at the Top of Text File ?

    Posted by UNNIMENON on 04 Jul 2005

    Dear All

    Please consider the below situation.

    1. There's a text file as it is extract to a table with one field(tempid).
    2. At the TOP of the table, there are few BLANK records. How to
    ...

  • does not work everytime

    Posted by praveensg on 22 May 2002

    the data control's addnew method does not work well....
    i tried the ado data control's addnew method
    the first 15 records are added at the end of the recordset
    the others at the beginning
    im still...