Re: Delete Record - DAO to ADO



On 30 Mar 2007 22:28:26 -0700, "igendreau"
<ian_gendreau@xxxxxxxxxxxxxxxx> wrote:

You may need to carefully inspect the execution path and exactly what
error occurs. AFAIK, "can't delete it because there are related
records in another table" only occurs under one condition, and that is
a violation of referential integrity.
Create a temporary table not linked to any other table, and your code
will be able to delete records from it.

-Tom.


I know... but some of my code was realllly old and didn't work
anymore, and I have to write a bunch of new stuff for this database,
and I'm writing it in ADO, and I'd like to keep everything
consistent. Here's the crazy thing... It DID work in DAO, and if I
open the query and try deleting the record manually? It deletes
without a problem! So I am led to believe that my relationships
between tables are okay. I thought maybe it had something to do with
the way I was opening my recordset.

My recordset ("rs") opens certain records from a query called
"ShipPull". If I open the ShipPull query manually, I can delete
records, with no problems. But open it via my code, and deletes get
blocked. Any thoughts?

.



Relevant Pages

  • Re: conditional formatting in form slows down calculations
    ... >> table to see all dates and a filtered query to see recent dates. ... If I set it to open with the record source the query, ... >> endless calculating when the form opens. ...
    (microsoft.public.access.forms)
  • Re: Filtering records in a form
    ... I have one query, QrySelMainData, pulling data from TblMainData. ... Switchboard Manager to create a switchboard type menu for you. ... form as the form to open when the database opens. ... I have a database of Issues entered by my agents. ...
    (microsoft.public.access.forms)
  • Re: Query Design View is Slow to Open
    ... same query takes about 20 minutes to open in datasheet view. ... took only seconds to open in both design view and datasheet view. ... The troublesome queries are based entirely on local tables (i.e. no ... HOUSEHOLD_PersonalInfo opens slowly in design ...
    (comp.databases.ms-access)
  • Re: Opening additional (non-default) form instances
    ... I'm not completely clear about this, but I suggest you remove the parameter from the source query. ... When I first posted this question, the prompt accepted only ... When the subform opens after the Parm prompt, ...
    (microsoft.public.access.formscoding)
  • Re: Query Design View is Slow to Open
    ... My benchmark query takes about 20 minutes to open in design view. ... Each subsequent time, the query opens ... In the same database, there are many queries that open normally in ...
    (comp.databases.ms-access)