Subject Re: USER key word not working in fb 1.5
Author Helen Borrie
--- In firebird-support@yahoogroups.com, "Jules" <julesp@...> wrote:
>
> Hey,
>
> I have a test system running fb1.5.
>
> I am in the process of testing my 1.5 installation as we are moving
from fb 1.02
>
> I have been using the USER keyword in my fb1.02 db for years to
validate users. But now find the exact same scripts do not work in
fb1.5.
>
> I was successful in importing the isc4.gdb to the new security.fdb
and can view the users in both the o/s and using ibexpert.
>
> The error I am getting is
>
> "The cursor identified in the update or delete statement is not
positioned on a row. no current record for fetch operation"
>
> Can anyone offer a suggestion?

Well, first thing, the USER keyword still works fine in Fb 1.5,
although you also have the option of CURRENT_USER in Fb 1.5.

Secondly, the exception you are getting doesn't have anything to do
with whether the USER variable is supported or not. You're getting
this error because an operation is trying to perform some action on a
row that doesn't exist.

e.g.
update mytable
set.....
where current of aCursor

(or something encoded in your data access layer that has the same
effect)

The exception you get occurs when either there were no rows returned
to the cursor, or the cursor has moved past the last row in the set
and is positioned at "end-of-file".

USER might be involved in an incidental capacity, if the operation
were being targeted at a set conditioned by e.g.
"WHERE MY_USERNAME = USER".

./heLen