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

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

Post by sheeg » Mon, 05 Nov 2001 01:43:09



I am using ADO2.5, using record binding (CADORecordBinding), I want to
insert data into a table from an object, if the table is not empty, it
won't have any problem, but if the table is empty, I can't do it, no
matter how I change to cursor type of the recordset (dynamic,
forwardonly, ...), it still wouldn't work. Is this something missing
in ADO2.5 or something I don't know?

Any one who can give me a hint will be very apprecaited!

Sheegwa

 
 
 

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. Calculation to pick rate

3. HELP: Can't add new records to an empty dynaset

4. corrupted table?

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

6. Trouble Installing SQL 6.5

7. How to add new record to an empty table

8. Named Pipes vs. TCP/IP

9. Using bound DataGrid to add new records

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

11. deleting records in a table and then adding new records

12. Joining tables / using another record's value if record doesn't exist

13. Can't Add new record after using MaskedEdit Control