add record to an empty table using RDO 2.0 and Visual basic 6.0

add record to an empty table using RDO 2.0 and Visual basic 6.0

Post by Pa » Tue, 06 Aug 2002 23:47:54



Hi

I am a newbie.

I am trying to add a record to an empty table using RDO 2.0 and Visual basic 6.0.

But I am not gettting any error and program is halted.

Here is the code I am using

   If Action.Caption = "Add" Then
        mdsBuyer.AddNew
        mdsBuyer.rdoColumns("Buyer_Code").Value = Trim(txtBuyer.Text)
        mdsBuyer.rdoColumns("Buyer_Name").Value = Trim(txtName.Text)
        mdsBuyer.Update
    End If

Private Sub Form_Load()
Dim szSql As String

    ' Open the database SQL
    szSql = "SELECT * FROM Buyer"
    Set mdsBuyer = gdbAcorns.OpenResultset(szSql, rdOpenDynamic, rdConcurRowver)
end sub

How can I check using RDO that table is empty and now to add a record.

Please help.

 
 
 

1. How to add a new record to an empty table using RDO and visual basic 6.0

Hi

I am a newbie.

I am trying to add a record to an empty table using RDO 2.0 and Visual basic 6.0.

But I am not gettting any error and program is halted.

Here is the code I am using

   If Action.Caption = "Add" Then
        mdsBuyer.AddNew
        mdsBuyer.rdoColumns("Buyer_Code").Value = Trim(txtBuyer.Text)
        mdsBuyer.rdoColumns("Buyer_Name").Value = Trim(txtName.Text)
        mdsBuyer.Update
    End If

Private Sub Form_Load()
Dim szSql As String

    ' Open the database SQL
    szSql = "SELECT * FROM Buyer"
    Set mdsBuyer = gdbAcorns.OpenResultset(szSql, rdOpenDynamic, rdConcurRowver)
end sub

How can I check using RDO that table is empty and now to add a record.

Please help.

2. Delphi 2.0 and Win95 network - *.NET files

3. How to debug stored procedures in SQL 7.0 using Visual Interdev 6.0 or Visual Basic 6.0

4. onaudit and ADTSIZE

5. ADO2.5, can't add new record to an empty table using record binding

6. Paradox 9 Review

7. Add records to an empty table - AddNewX.cpp example fails with an empty table

8. Source code of the procedures/Functions in PostgreSQL

9. using Visual FoxPro Databases in Visual Basic 6.0

10. Cannot add record to Visual Foxpro table after deleting all records in table

11. Preparing Your Visual Basic 6.0 Applications for the Upgrade to Visual Basic.NET

12. Visual Basic 6.0 Access 2.0

13. Visual Basic 6.0 Add-in