Read access to informix tables
Posted in 2000
Topics: SQL Development & Query Writing, Server Administration
i am trying to do sql query from a informix table via dbacess. However i realised that records in this table are often exclusively lock by other users when they are doing a data entry or update to the table. the sql will be unsuccessful if the table is being updated with error 107 - the record is being locked. any ideas as what can be done to the sql. i dun care what the data is prior or after commit, i just need some kind of info from the table. my sql look something like this: select sum(t_alloc),sum(t_ordr) from inventory; Thanks in advance. Danny Choo Sent via Deja.com http://www.deja.com/ Before you buy.
Suggestion, try setting your lock mode, for example
set lock mode to wait;
select ...
In article <8jrvft$qra$1@nnrp1.deja.com>, d_choo@hotmail.com says...
> i am trying to do sql query from a informix table via dbacess. However
> i realised that records in this table are often
> exclusively lock by other users when they are doing a data entry or
> update to the table. the sql will be unsuccessful if the table is being
> updated with error 107 - the record is being locked.
>
> any ideas as what can be done to the sql. i dun care what the data is
> prior or after commit, i just need some kind of info from the table.
>
> my sql look something like this:
>
> select sum(t_alloc),sum(t_ordr) from inventory;
d_choo@hotmail.com wrote:
> i am trying to do sql query from a informix table via dbacess. However
> i realised that records in this table are often
> exclusively lock by other users when they are doing a data entry or
> update to the table. the sql will be unsuccessful if the table is being
> updated with error 107 - the record is being locked.
>
> any ideas as what can be done to the sql. i dun care what the data is
> prior or after commit, i just need some kind of info from the table.
>
> my sql look something like this:
>
> select sum(t_alloc),sum(t_ordr) from inventory;
Change the query's isolation level to DIRTY READ, by adding the following
statement before your query
set isolation to dirty read;
select ....
Rudy