[AccessD] OT - Deleting a row in an excel named range using ADO

MarkH markH at bitgen.co.uk
Sat Apr 26 11:15:17 CDT 2003


That works fine but leaves a blank row within the range... I can delete
blank rows fairly easilly from the range but it would be nice if there
was a method that did it in one go like when you delete a record in
Access...

Thanks again

Mark

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of MarkH
Sent: 26 April 2003 17:10
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] OT - Deleting a row in an excel named range using
ADO


Thanks Gustav... I'll try it out like you say...

Mark

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: 25 April 2003 16:34
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] OT - Deleting a row in an excel named range using
ADO


Hi Mark

> I have a named range in Excel (XP) and am able to add and edit records

> within it easilly using ADO. However, when I try and delete a record I

> get run time error -2147217887 and a message saying "Deleting data in
> a linked table is not supported by this ISAM."

> If I run "rs.Supports(adDelete)" it returns true???

I believe the error message is true.

You have to empty the rows of the range in a manner like this:

   With rst
     .MoveFirst
     While Not .EOF
       .Edit
       For Each fld In .Fields
         fld.Value = Null
       Next fld
       .Update
       .MoveNext
     Wend
   End With

/gustav

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
 

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
 



More information about the AccessD mailing list