Subject | Re: [firebird-support] text blob field as parameter in where |
---|---|
Author | Ivan Prenosil |
Post date | 2004-06-08T09:34:24Z |
> I'm working with short transactions, and i want to be sure no other userThen just use default (snapshot) transaction mode.
> changed the blob field in the meantime. My UPDATE statement has to return
> exactly one effected row.
You can't update record that was changed by other transaction
after your transaction started (you will get update conflict error,
after which you need to start new transaction).
i.e. this should be enough:
> > >>UPDATE MyTableIvan
> > >>SET MemoField = :MemoField
> > >>WHERE (UniqueField = :Old$UniqueField)
----- Original Message -----
From: "Robert" <rjm@...>
To: "firebird-support" <firebird-support@yahoogroups.com>
Sent: Monday, June 07, 2004 10:35 PM
Subject: Re: [firebird-support] text blob field as parameter in where
> >>Executing the next statement gives me SQL error -902 Internal error.
> > >>
> > >>UPDATE MyTable
> > >>SET MemoField = :MemoField
> > >>WHERE (UniqueField = :Old$UniqueField) AND (MemoField = :Old$MemoField)
> > >>
> > > Is not supported by firebird. You can't put a blob field in "where".
> > > ...
> > You could try (MemoField containing :Old$MemoField) if this is specific
> eno=
> > ugh.
> Thanks for the suggestion.
> But it is not specific (waterproof) enough for me.
> I'm working with short transactions, and i want to be sure no other user
> changed the blob field in the meantime. My UPDATE statement has to return
> exactly one effected row.
>
> BTW is it possible to make the error message more specific, f.e. "Blob field
> not allowed in WHERE clause"?
>
> Bye
> Robert