Hello Ben, I am not sure if anybody else has seen this, but I just noticed
it. I was looking at the code that you pasted/* Copy of code */strDelSQL =
"DELETE * FROM [Status] WHERE ((Status.ID) = " & item &")"
adoConn.Execute(strDelSQL)This is what I would do differently1. Take out the
first set of quotes before DELETE2. Actually, Just copy the below
code:strDelSQL = DELETE * FROM Status WHERE ID = " &
IDadoConn.Execute(strDelSQL)Hi Ben,
have a look at this page:
http://support.microsoft.com/support/kb/articles/Q183/0/60.ASP
80004005 errors. see if any of them could be the problem.
If not paste up your adoConn DB connection code as it is obviously something
to do with the connection.
Angie
** If everything seems to be going well, you have obviously overlooked
something **
Phill W. <P.A.Ward@open.ac.uk> wrote in message
news:9hc7li$ldd$1@yarrow.open.ac.uk...
> Ben,
>
> Can't remember, but does Access support Referential Integrity?
> That is, can you set up one table with Key values that are used in
another?
> And can you set up relationships between the two to, say, prevent deletion
> of the 'parent' Key record unless all the 'child' records have been
deleted
> beforehand?
>
> HTH,
> Phill W.
>
> "Ben Nave" <bennave@consolenergy.com> wrote in message
> news:1fb2799c.0106261136.6c859a5f@posting.google.com...
> > I'm trying to create a page that will delete an entry from a Microsoft
> > Acess database that I have created. The chunk of code that I'm having
> > problems with is:
> > strDelSQL = "DELETE * FROM [Status] WHERE ((Status.ID) = " & item &
> > ")"
> > adoConn.Execute(strDelSQL)
> >
> > the adoConn line returns and error when you load the web page that
> > says:
> > Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> >
> > [Microsoft][ODBC Microsoft Access Driver] Could not delete from
> > specified tables.
> > I've checked out the SQL statement in Access and it works just fine in
> > that. item is the Primary Key number that I got from a form on a
> > previous page. I've tried doing a Response.Write(strDelSQL) and it
> > does put the number in the statement correctly and that number does
> > correspond to the row that I'm trying to delete. Anyone have any
> > ideas for me?!? Please cc your response to bennave@consolenergy.com
> > as I don't check the list frequently
> > Thanks in advance!
> > -B
>
>