ADO Problem 
Author Message
 ADO Problem

Hi,

    I am using Access 2000 Database.I have used ADO in my
Project. i am using the following code to store the data
into the table. But some times, the data insertion wast
successful. Its not Always. Can you please specify the
reason.

Thanks,

Chakri

    1) Method One

     private rsCustomer as ADODB.Recoredset

     set rsCustoemr = new ADODB.Recordset

     rsCustomer.open SQL,cnn,adOpenKeyset,adLockOptimistic

     rsCustomer.AddNew
     rsCustomer.Fields(0).value = somevalue
     rscustomer.Update

    2) Method 2

     SQLCompound = "INSERT INTO Customers values  
(somevalue)"

      cnn.Execute SQLCompound



Sat, 26 Nov 2005 18:37:31 GMT  
 ADO Problem
Hi Chakri,

What do you mean when you say "But some times, the data insertion wast
successful"? Do you get any error message?

--
Val Mazur
Microsoft MVP


Hi,

    I am using Access 2000 Database.I have used ADO in my
Project. i am using the following code to store the data
into the table. But some times, the data insertion wast
successful. Its not Always. Can you please specify the
reason.

Thanks,

Chakri

    1) Method One

     private rsCustomer as ADODB.Recoredset

     set rsCustoemr = new ADODB.Recordset

     rsCustomer.open SQL,cnn,adOpenKeyset,adLockOptimistic

     rsCustomer.AddNew
     rsCustomer.Fields(0).value = somevalue
     rscustomer.Update

    2) Method 2

     SQLCompound = "INSERT INTO Customers values
(somevalue)"

      cnn.Execute SQLCompound



Sun, 27 Nov 2005 20:18:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. This ought to be simple (ADO problem)

2. ADO problem

3. ADO problems with NumericalDecimalSeparator

4. ADO Problem

5. ado problems

6. Oracle OLE DB - Provider and ADO - Problem with Unicode

7. Getting data from Excel to VB using ADO problem

8. ADO Problem Updating number field to Null

9. Weird ADO problem...

10. Inserting new records using ADO - problem??

11. ADO problem

12. ADO problem with Add's/delete/updates

 

 
Powered by phpBB® Forum Software