Why won't ADO delete record from Query.... DAO will!!! 
Author Message
 Why won't ADO delete record from Query.... DAO will!!!

What am I doing wrong. I am "testing" ADO with a little Access 97 MDB.

I set ADO Data Control to a Query in the MDB (qryTest1). This is a basic
one-to-one relationship (there is a reason I've set up the files like
this... not important here.) I use a Left join.

I set up a button with   ADOctl.recordset.delete on the click event.

The form with the ADO control and bound text boxes can display the data fine
and will let me add records. But it won't DELETE a record. Says "Can't
delete from specifed files." and dies. It looks like the error is being
generated in Access97 and the OLE DB layer is passing it on or something.

The same app. with a DAO control instead works fine.

What is going on here?????? This is driving me nuts.

Thanks,

Paul



Sat, 03 Nov 2001 03:00:00 GMT  
 Why won't ADO delete record from Query.... DAO will!!!
ANSWER: you need to use the CursorLocation property (on the ADO Data
Control)  = adUseServer

ADO is going to drive me crazy!!!

Paul

----------

Quote:

>What am I doing wrong. I am "testing" ADO with a little Access 97 MDB.

>I set ADO Data Control to a Query in the MDB (qryTest1). This is a basic
>one-to-one relationship (there is a reason I've set up the files like
>this... not important here.) I use a Left join.

>I set up a button with   ADOctl.recordset.delete on the click event.

>The form with the ADO control and bound text boxes can display the data
fine
>and will let me add records. But it won't DELETE a record. Says "Can't
>delete from specifed files." and dies. It looks like the error is being
>generated in Access97 and the OLE DB layer is passing it on or something.

>The same app. with a DAO control instead works fine.

>What is going on here?????? This is driving me nuts.

>Thanks,

>Paul



Sat, 03 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ADO: Why won't new record delete?

2. ADO: Why won't new record delete?

3. Why I cannot delete record from Query ?

4. DAO/ADO,JET3/4: Detecting if record is deleted

5. DAO/ADO,JET3/4: Detecting if record is deleted

6. Why won't it let me add records

7. Why won't this RS allow to add new record

8. Deleting Records in database won't work

9. Why won't this RS allow to add new record

10. Why won't this RS allow to add new record

11. ADO, Transaction Processing, Parameter Query, Delete Multiple Records

12. ADO Won't update records??

 

 
Powered by phpBB® Forum Software