Re: Row cannot be located for updating

From: Hans van Leth (hans.v.l)
Date: 01/06/04


Date: Tue, 6 Jan 2004 15:22:15 +0100

Hi Brian,

thanks for taking the time to answer.

It is a simple table I am trying to update, not a join.

The insert/update trigger pulls information from other tables and populates
some fields of the table being inserted/updated which makes for ADO to not
being able to find the just inserted record back.
The solution I was hoping to find was to inform ADO which field(s) are the
key to the table. I know this is possible, but cannot find out how this is
done from D7. Without this, ADO will default to taking *all* fields as the
key and stuff these in the SQL WHERE clause it constructs on the fly.

Thanks again for any clues (if any!).

Hans van Leth.

"Brian Bushay TeamB" <BBushay@Nmpls.com> schreef in bericht
news:vn6kvvgu7hp7vddua6fsv3i2a2lprkq7gc@4ax.com...
>
> >I've read some time ago in this NG (I believe) that you can limit the ADO
> >where statement construct by informing the ADO recordset about this
primary
> >key (or rather: dropping the other fields). I have searched this NG and
also
> >Tamarack but cannot find this message anymore.
> ADO has a Unique Table property to specify the table from a Join that gets
> updated.
> Also in your Trigger add
> Set Nocount On
> at the begriming of the trigger.
>
>
> --
> Brian Bushay (TeamB)
> Bbushay@NMPLS.com



Relevant Pages

  • Re: Error with Insert/Update stored procedure in VB6
    ... (I use Dataenvironment). ... >> that trigger. ... > I tried to reproduce it by passing a string where the insert/update ... > What ADO version are you using, or what database library if not ADO? ...
    (microsoft.public.vb.bugs)
  • Re: Trigger performance
    ... Trigger should not normally return result sets. ... INSERT/UPDATE trigger, because the same validations has to be performed. ... This may be due to that in earlier versions of SQL Server, @@rowcount did ... you cannot handle multirow updates in this case. ...
    (microsoft.public.sqlserver.programming)
  • Re: ADO + SQL-Server + Defaultwerte
    ... Ich kann ja bei ADO allgemein auch einen String mit einem SQL-Statement ... Der Trigger reagiert auf Updates und die zu ... behandelndeRowwirdanhand einer vorher auf dem Client ...
    (microsoft.public.de.vb.datenbank)
  • Re: Multiuser application
    ... You should call AdoConnection.BeginTrans before doing insert/update and do ... do AdoConnection.RollbackTrans from the exception handler. ... Other use see the changes when you have commited the transaction. ... > ADO Objects. ...
    (borland.public.delphi.database.ado)
  • Re: Triggers - SQL 2K
    ... that with the info your trigger produces. ... "Dave Cook" wrote in message ... i.e. the stored procedure that executed a insert/update. ... > I have some invalid records appearing in my database under a certain user ...
    (microsoft.public.sqlserver.programming)