Re: ADO and DELETE Statement



Well, I am doing this in Navision (Dynamics-NAV) using the MS ActiveX
Data Access lib. I have looked at all kinds of properties on the
connection object, nothing indicated an error status (same values,
regardless of success or failure).

I dont see how it could.
It is up to the provider to signal to ADO that the SQL has failed in some
way. And if the provider raises no error, how will ADO know? What you can
get back from Action queries is the number of rows affected.
That is one of the parameters of the Command object.

Note also, it is not an error if DELETE failed to delete rows because the
WHERE clause meant no rows qualified.

You also said


It is basically reading a record, posting a purchase order
and if the order posted successfully, I delete the record. So if it is
not deleted (for whatever reason), the purchase receipt is posted
twice.


That last part seems wrong. Why not record on the database that you posted
successfully?
The receipt won't be sent twice as you check for its existence.
You need to get to the bottom of why a small % of deletes fail.

Stephen Howe



.



Relevant Pages

  • Re: 1N5822 diodes in XE1541 ... not working
    ... > I used those diodes and had no success. ... C64 didn't recognize any device. ... > Only twice it hanged during "searching for $" and the PC hanged too. ...
    (comp.sys.cbm)
  • Verizon Fios Jamming
    ... The Verizon Fios Powersupply jam's all Short-wave reception in the house. ... called them twice no success. ...
    (rec.radio.shortwave)
  • Re: Junk E-mail Reporting Tool for Outlook
    ... Revo O C wrote: ... I wish I had even your lack of success with it. ... and ran the installation (twice) and I have never even seen the new ...
    (microsoft.public.outlook)
  • Re: Lon Bronson Band Gigs
    ... recent months and cannot remember that he's tried that particular joke ... without success at least twice before. ... How can you say he's unsuccessful, when this entire thread is about ...
    (alt.vacation.las-vegas)
  • Re: Lon Bronson Band Gigs
    ... recent months and cannot remember that he's tried that particular joke ... without success at least twice before. ... It's only about him in the Masarsky sense of serving as a human ...
    (alt.vacation.las-vegas)