lock problem on Informix

I'm migrating a multi-user application from 4GL to powerbuilder 8.
The database is Informix Dynamic Server Version 7.31. -- On-Line -- .

I've this problem:
when i use
SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
the sqlca give me an ok so i think that the row is in lock mode, but when I
try the same select from another pb application, or from 4gl, the db don't
tell me that there is a lock on the record.

Otherwise if i try the same sql statement on 4gl and then I try in pb, the
SQLCA tell me that there is a lock on the record.

Now i want to put a lock like 4gl on the record: how can i do that?

Thank u in advance,


Michele Favretto



0
Michele
2/10/2003 10:54:27 AM
sybase.powerbuilder.database 9855 articles. 2 followers. Follow

7 Replies
793 Views

Similar Articles

[PageSpeed] 6
Get it on Google Play
Get it on Apple App Store

Perhaps your PowerBuilder transaction object sqlca.AutoCommit setting
is causing this problem?

On Mon, 10 Feb 2003 11:54:27 +0100, "Michele Favretto"
<mfavretto@ateikon.com> wrote:

>I'm migrating a multi-user application from 4GL to powerbuilder 8.
>The database is Informix Dynamic Server Version 7.31. -- On-Line -- .
>
>I've this problem:
>when i use
>SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
>the sqlca give me an ok so i think that the row is in lock mode, but when I
>try the same select from another pb application, or from 4gl, the db don't
>tell me that there is a lock on the record.
>
>Otherwise if i try the same sql statement on 4gl and then I try in pb, the
>SQLCA tell me that there is a lock on the record.
>
>Now i want to put a lock like 4gl on the record: how can i do that?
>
>Thank u in advance,
>
>
>Michele Favretto

0
NOSPAM_matthew_chest
2/10/2003 1:46:33 PM
SQLCA.AutoCommit = false


"Matthew Chestnut" <NOSPAM_matthew_chestnut@hotmail.com> ha scritto nel
messaggio news:3e47ad0f.672406@forums.sybase.com...
> Perhaps your PowerBuilder transaction object sqlca.AutoCommit setting
> is causing this problem?
>
> On Mon, 10 Feb 2003 11:54:27 +0100, "Michele Favretto"
> <mfavretto@ateikon.com> wrote:
>
> >I'm migrating a multi-user application from 4GL to powerbuilder 8.
> >The database is Informix Dynamic Server Version 7.31. -- On-Line -- .
> >
> >I've this problem:
> >when i use
> >SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
> >the sqlca give me an ok so i think that the row is in lock mode, but when
I
> >try the same select from another pb application, or from 4gl, the db
don't
> >tell me that there is a lock on the record.
> >
> >Otherwise if i try the same sql statement on 4gl and then I try in pb,
the
> >SQLCA tell me that there is a lock on the record.
> >
> >Now i want to put a lock like 4gl on the record: how can i do that?
> >
> >Thank u in advance,
> >
> >
> >Michele Favretto
>


0
Michele
2/10/2003 2:35:37 PM
In powerbuilder, can not know the database is locked or not and can not set
lock mode.

How about using the statement

SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
Update table_name set column_name = column_name where pk = :variable ;

This statement will force a lock to the row.




"Michele Favretto" <mfavretto@ateikon.com> ���g��l��s�D
:13SdaWP0CHA.59@forums.sybase.com...
> I'm migrating a multi-user application from 4GL to powerbuilder 8.
> The database is Informix Dynamic Server Version 7.31. -- On-Line -- .
>
> I've this problem:
> when i use
> SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
> the sqlca give me an ok so i think that the row is in lock mode, but when
I
> try the same select from another pb application, or from 4gl, the db don't
> tell me that there is a lock on the record.
>
> Otherwise if i try the same sql statement on 4gl and then I try in pb, the
> SQLCA tell me that there is a lock on the record.
>
> Now i want to put a lock like 4gl on the record: how can i do that?
>
> Thank u in advance,
>
>
> Michele Favretto
>
>
>


0
samuel
2/11/2003 1:30:44 AM
thank u for the answers.
the dummy update works fine but i must do 2 thing for 1 result.
1. update
2. select values
too expensive!
If there aren't any other solution i do this one, but i hope to fix my
problem.


"samuel" <tfhkcyt@taifuji.com> ha scritto nel messaggio
news:sgiTq$W0CHA.59@forums.sybase.com...
> In powerbuilder, can not know the database is locked or not and can not
set
> lock mode.
>
> How about using the statement
>
> SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
> Update table_name set column_name = column_name where pk = :variable ;
>
> This statement will force a lock to the row.
>
>
>
>
> "Michele Favretto" <mfavretto@ateikon.com> ���g��l��s�D
> :13SdaWP0CHA.59@forums.sybase.com...
> > I'm migrating a multi-user application from 4GL to powerbuilder 8.
> > The database is Informix Dynamic Server Version 7.31. -- On-Line -- .
> >
> > I've this problem:
> > when i use
> > SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
> > the sqlca give me an ok so i think that the row is in lock mode, but
when
> I
> > try the same select from another pb application, or from 4gl, the db
don't
> > tell me that there is a lock on the record.
> >
> > Otherwise if i try the same sql statement on 4gl and then I try in pb,
the
> > SQLCA tell me that there is a lock on the record.
> >
> > Now i want to put a lock like 4gl on the record: how can i do that?
> >
> > Thank u in advance,
> >
> >
> > Michele Favretto
> >
> >
> >
>
>


0
Michele
2/11/2003 9:02:36 AM
Using datastore can avoid lock problem , datastore and datawindow
check the lock by itself.

Using embed sql statement , the dummy lock is the best solution,
ADO and ODBC, also , using dummy lock let you use
different database and no need to change SQL statement.


"Michele Favretto" <mfavretto@ateikon.com> ���g��l��s�D
:dzcCn8a0CHA.176@forums.sybase.com...
> thank u for the answers.
> the dummy update works fine but i must do 2 thing for 1 result.
> 1. update
> 2. select values
> too expensive!
> If there aren't any other solution i do this one, but i hope to fix my
> problem.
>
>
> "samuel" <tfhkcyt@taifuji.com> ha scritto nel messaggio
> news:sgiTq$W0CHA.59@forums.sybase.com...
> > In powerbuilder, can not know the database is locked or not and can not
> set
> > lock mode.
> >
> > How about using the statement
> >
> > SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
> > Update table_name set column_name = column_name where pk = :variable ;
> >
> > This statement will force a lock to the row.
> >
> >
> >
> >
> > "Michele Favretto" <mfavretto@ateikon.com> ���g��l��s�D
> > :13SdaWP0CHA.59@forums.sybase.com...
> > > I'm migrating a multi-user application from 4GL to powerbuilder 8.
> > > The database is Informix Dynamic Server Version 7.31. -- On-Line -- .
> > >
> > > I've this problem:
> > > when i use
> > > SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
> > > the sqlca give me an ok so i think that the row is in lock mode, but
> when
> > I
> > > try the same select from another pb application, or from 4gl, the db
> don't
> > > tell me that there is a lock on the record.
> > >
> > > Otherwise if i try the same sql statement on 4gl and then I try in pb,
> the
> > > SQLCA tell me that there is a lock on the record.
> > >
> > > Now i want to put a lock like 4gl on the record: how can i do that?
> > >
> > > Thank u in advance,
> > >
> > >
> > > Michele Favretto
> > >
> > >
> > >
> >
> >
>
>


0
samuel
2/11/2003 11:04:16 AM
samuel wrote:
> Using datastore can avoid lock problem , datastore and datawindow
> check the lock by itself.
> 
> Using embed sql statement , the dummy lock is the best solution,
> ADO and ODBC, also , using dummy lock let you use
> different database and no need to change SQL statement.
> 
> 
> "Michele Favretto" <mfavretto@ateikon.com> ���g��l��s�D
> :dzcCn8a0CHA.176@forums.sybase.com...
> 
>>thank u for the answers.
>>the dummy update works fine but i must do 2 thing for 1 result.
>>1. update
>>2. select values
>>too expensive!
>>If there aren't any other solution i do this one, but i hope to fix my
>>problem.
>>
>>
>>"samuel" <tfhkcyt@taifuji.com> ha scritto nel messaggio
>>news:sgiTq$W0CHA.59@forums.sybase.com...
>>
>>>In powerbuilder, can not know the database is locked or not and can not
>>
>>set
>>
>>>lock mode.
>>>
>>>How about using the statement
>>>
>>>SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
>>>Update table_name set column_name = column_name where pk = :variable ;
>>>
>>>This statement will force a lock to the row.
>>>
>>>
>>>
>>>
>>>"Michele Favretto" <mfavretto@ateikon.com> ���g��l��s�D
>>>:13SdaWP0CHA.59@forums.sybase.com...
>>>
>>>>I'm migrating a multi-user application from 4GL to powerbuilder 8.
>>>>The database is Informix Dynamic Server Version 7.31. -- On-Line -- .
>>>>
>>>>I've this problem:
>>>>when i use
>>>>SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
>>>>the sqlca give me an ok so i think that the row is in lock mode, but
>>
>>when
>>
>>>I
>>>
>>>>try the same select from another pb application, or from 4gl, the db
>>
>>don't
>>
>>>>tell me that there is a lock on the record.
>>>>
>>>>Otherwise if i try the same sql statement on 4gl and then I try in pb,
>>
>>the
>>
>>>>SQLCA tell me that there is a lock on the record.
>>>>
>>>>Now i want to put a lock like 4gl on the record: how can i do that?
>>>>
>>>>Thank u in advance,
>>>>
>>>>
>>>>Michele Favretto
>>>>
>>>>
>>>>
>>>
>>>
>>
> 
> 
Hi,

use
EXECUTE IMMEDIATE "SET ISOLATION ..." USING SQLCA ;
(DIRTY READ, COMMITTED READ, ...)
just before your Selects.

Another Problem could be caused by ANSI Transactions (ODBC) vs. 
Informix-Database with logs.
Since I work with several COMMIT WORKs (to close the implicit open 
transaction, release all locks and start a new transaction) just bevor 
my dw.retrieves I no longer have problems with "unexpected" locks.

Hope this helps
Frank
no problems

0
Frank
2/23/2003 11:21:51 AM
"Frank Mickler" <frank-mickler@versanet.de> ha scritto nel messaggio
news:VOX7fEz2CHA.262@forums.sybase.com...
> samuel wrote:
> > Using datastore can avoid lock problem , datastore and datawindow
> > check the lock by itself.
> >
> > Using embed sql statement , the dummy lock is the best solution,
> > ADO and ODBC, also , using dummy lock let you use
> > different database and no need to change SQL statement.
> >
> >
> > "Michele Favretto" <mfavretto@ateikon.com> ���g��l��s�D
> > :dzcCn8a0CHA.176@forums.sybase.com...
> >
> >>thank u for the answers.
> >>the dummy update works fine but i must do 2 thing for 1 result.
> >>1. update
> >>2. select values
> >>too expensive!
> >>If there aren't any other solution i do this one, but i hope to fix my
> >>problem.
> >>
> >>
> >>"samuel" <tfhkcyt@taifuji.com> ha scritto nel messaggio
> >>news:sgiTq$W0CHA.59@forums.sybase.com...
> >>
> >>>In powerbuilder, can not know the database is locked or not and can not
> >>
> >>set
> >>
> >>>lock mode.
> >>>
> >>>How about using the statement
> >>>
> >>>SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
> >>>Update table_name set column_name = column_name where pk = :variable ;
> >>>
> >>>This statement will force a lock to the row.
> >>>
> >>>
> >>>
> >>>
> >>>"Michele Favretto" <mfavretto@ateikon.com> ���g��l��s�D
> >>>:13SdaWP0CHA.59@forums.sybase.com...
> >>>
> >>>>I'm migrating a multi-user application from 4GL to powerbuilder 8.
> >>>>The database is Informix Dynamic Server Version 7.31. -- On-Line -- .
> >>>>
> >>>>I've this problem:
> >>>>when i use
> >>>>SELECT column_name FROM table_name WHERE pk = :variable FOR UPDATE;
> >>>>the sqlca give me an ok so i think that the row is in lock mode, but
> >>
> >>when
> >>
> >>>I
> >>>
> >>>>try the same select from another pb application, or from 4gl, the db
> >>
> >>don't
> >>
> >>>>tell me that there is a lock on the record.
> >>>>
> >>>>Otherwise if i try the same sql statement on 4gl and then I try in pb,
> >>
> >>the
> >>
> >>>>SQLCA tell me that there is a lock on the record.
> >>>>
> >>>>Now i want to put a lock like 4gl on the record: how can i do that?
> >>>>
> >>>>Thank u in advance,
> >>>>
> >>>>
> >>>>Michele Favretto
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >
> >
> Hi,
>
> use
> EXECUTE IMMEDIATE "SET ISOLATION ..." USING SQLCA ;
> (DIRTY READ, COMMITTED READ, ...)
> just before your Selects.
>
> Another Problem could be caused by ANSI Transactions (ODBC) vs.
> Informix-Database with logs.
> Since I work with several COMMIT WORKs (to close the implicit open
> transaction, release all locks and start a new transaction) just bevor
> my dw.retrieves I no longer have problems with "unexpected" locks.
>
> Hope this helps
> Frank
> no problems
>

I've no problem with unespected locks,
I just use EXECUTE IMMEDIATE "SET ISOLATION DIRTY READ" USING SQLCA ;
I'm worry about set lock on records that I'm reading for manage concurrency


thank's
bye
Michele



0
Michele
2/25/2003 10:29:00 AM
Reply:

Similar Artilces:

Powerbuilder 7.0 database locking problem
We used the default SQLCA transaction object to connect to our database. We open a sheet window which displays data in a read only datawindow. This sheet window in turn, opens a response window which edits the data that is display on the sheet window. The data is changed via an inbeded SQL statement. The problem is that transaction object will not allow the SQL statement to run. Some kind of locking internal to the transaction object is locking the SQL statement. The database is not locked since it can be edited using a difference connections. We where wondering if there is a me...

Powerbuilder 7.0 database locking problem
We used the default SQLCA transaction object to connect to our database. We open a sheet window which displays data in a read only datawindow. This sheet window in turn, opens a response window which edits the data that is display on the sheet window. The data is changed via an inbeded SQL statement. The problem is that transaction object will not allow the SQL statement to run. Some kind of locking internal to the transaction object is locking the SQL statement. The database is not locked since it can be edited using a difference connections. We where wondering if there is a me...

connectivity problems from PB to informix database using informix client SDK
Hello, I have installed informix client sdk version 2.81. I tested thru the informix i login demo and I am able to connect. I tried to set my db profile thru powerbuilder. I select db profile menuoption from powerbuilder. WE I got the list of all the databases type available, I selected IN9-informix-v9 and then selected new. I get the following error message box "The procedure entry point InfxRegsqlHostsEx2 could not be located in the dynamic library iregt07b.dll". If anyone can hep me with this problem , I will be grateful. Thanks This might be caused if the ...

Database Lock Problem
Hi All, I just realized that once a while there is a module which need to operate non stop for 18 hours a day once a while will have this "SQL Error - Failed to insert into XXX Table". Once we close the window and open again it will become normal again. There is nothing wrong in the coding. So we suspect it could be the table lock that it either failed to commit or still waiting for the acknowledgement to commit. So once we close the window, it will auto commit and when open again, everything becomes normal. I also know that the client company network is pretty slow. So...

Problem Informix-PowerBuilder
This is a problem occurs only if you use international settings different from English (American), in particular if you have (Italian) Salve, mi chiamo Benedetti Federico e sono un programmatore italiano. Volevo segnalarvi il seguente problema: SITUAZIONE INIZIALE Ho un server AS-400 con IBM-Aix versione 4 sul quale � intallato INFORMIX-SE versione 7. Sto sviluppando un applicazione gestionale con PowerBuilder versione 6.51 in Windows che legge e scrive dati sul server Informix. Ho installato Informix SDK versione 2.5 ed ho creato il mio profilo di connessione. PROBLEM...

Problem Informix-PowerBuilder
This is a problem occurs only if you use international settings different from English (American), in particular if you have (Italian) Salve, mi chiamo Benedetti Federico e sono un programmatore italiano. Volevo segnalarvi il seguente problema: SITUAZIONE INIZIALE Ho un server AS-400 con IBM-Aix versione 4 sul quale � intallato INFORMIX-SE versione 7. Sto sviluppando un applicazione gestionale con PowerBuilder versione 6.51 in Windows che legge e scrive dati sul server Informix. Ho installato Informix SDK versione 2.5 ed ho creato il mio profilo di connessione. PROBLEM...

I use informix database ,I want to know how to get the server time on informix server in powerbuilder
Try to use CURRENT in embedded SQL for select one row, f.e. datetime ldt_cur time lt_cur string ls_time SELECT CURRENT INTO :ldt_cur FROM systables WHERE tabid = 1 ; lt_cur = Time(ldt_cur) // or use ls_time = String(ldt_cur, 'hh:mm:ss') HTH Alex select current date into :ldtDateTime from SomeTable ; ...

Powerbuilder connectivity problem with INFORMIX
I want to connect one informix server to powerbuilder 7.0 through informix client.The problem is after giving all the connection parameters i am getting the following error sqlcode -761 and the message is "INFORMIXSERVER does not match either DBSERVERNAME OR DBSERVERALIASES. please help me to resolve this issue. ...

PowerBuilder and Informix connection problem
Hello, i am a PowerBuilder developer, and i have some problems at conecting to an Informix database without an ODBC interface. Currently i am using PowerBuilder Enterprise 5 with Informix Online 5 and the Intersolv ODBC drivers pack. Last week i tried to be connected to an Informix database without the ODBC drivers, using the native support for Informix 5 provided by PowerBuilder, but i had some problems. If i try to be connected to a database with no transactions defined, i can be connected very easy and the performance is very good, but when i try to be connected to a database with ...

Informix: Exclusive lock on database
I’ve tried to convert a BDE application to DBX. With BDE it was possible to send and execute the following statement on the server: database <database_name> exclusive; The same statement when sent in dbx application results an error message: "Cannot use database commands in an explicit database connection." I'm unable to find a way to make dbx connection exclusive. Is there any way to do so? What component are you using to send the command? Csaba Meszaros wrote: > I’ve tried to convert a BDE application to DBX. > > With BDE it was possible...

Informix table lock problem
Greeting, While in the PowerBuilder Database Painter Using Informix.7X Drivers I'm getting a select error when using Data Manipulation because PB 6.5 leaves a lock on the system tables. Does anyone know of a fix for this?(Other than committing manually) Thanks in advance, Todd Nirenstein I'm not sure about your problem, but it's posible that you have your tables in lock page mode, this mode locks all the tables that are in the same page as yours. You have to put your tables to lock row mode. This only lock the row you modify. The syntax is: alter table tab...

Powerbuilder database configuration problem
Recently I was given some source code that uses a Sybase SQL Anywhere database as its back end. I can view the source code but if I try and go into a data window Powerbuilder is not connecting to this database, rather I believe it trys to go to the Powerbuilder example database. The database that corresponds to the source code mentioned was not originally created on my machine. How can I configure Powerbuilder to recognize a database that was not originally created on that machine? Thanks in Advance. What you want to do is configure an ODBC datasource for that database...

Problems with PowerBuilder and Informix connection
Hello, i am a PowerBuilder developer, and i have some problems at conecting to an Informix database without an ODBC interface. Currently i am using PowerBuilder Enterprise 5 with Informix Online 5 and the Intersolv ODBC drivers pack. Last week i tried to be connected to an Informix database without the ODBC drivers, using the native support for Informix 5 provided by PowerBuilder, but i had some problems. If i try to be connected to a database with no transactions defined, i can be connected very easy and the performance is very good, but when i try to be connected to a database with ...

PB8 database locking problem
We just migrated from PB6.5 and are now running PB8.0.1 with ASA7.0.3.2082. I have a stored procedure that 1) declares a cursor to pull from a table for a passed in key id 2) sets blocking = OFF 3) fetches from the cursor With the SAME database in PB version 6.5 it succeeds in locking the row and returns a 0. In 8.0 it declares it's already locked and returns a -1. The sqlstate being evaluated hasn't changed between versions, it is still 42W18. The other caviot is that in PB 6.5 when I set it up to make the lock already be in place when this stored procedure fires, I get...

Web resources about - lock problem on Informix - sybase.powerbuilder.database

IBM Informix - Wikipedia, the free encyclopedia
IBM Informix is a product family within IBM's Information Management division that is centered on several relational database management system ...

IBM Informix (@IBM_Informix) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Informix - News, Features, and Slideshows
Latest news, features, and slideshows on Informix from Computerworld

Informix Database Administrator / Developer
Defining Technology for Australia's IT Leaders.

Informix technology whiz bails out for Andromedia
San Francisco, CA News - View Daily Local Business News, Resources & more in San Francisco, California. Informix, the Menlo Park-based database ...

S&P Stock Reports: Informix Corp.
Revenues in the first quarter of 1997 declined over 30%, owing to sluggishness associated with product transition uncertainties stemming from ...

Informix says Oracle is "sleazy"
... A CNET article by CNET News.com Staff, . Published on January 24, 1997 12:30 PM PST. No love has ever been lost between database makers Informix ...

IBM Acquires Informix
IBM took a major step today in its effort to strengthen its software business and take down Oracle by agreeing to acquire Informix Software's ...

The Four HundredIBM Buys Other Half of Informix with Ascential Acquisition
IBM Buys Other Half of Informix with Ascential Acquisition by Timothy Prickett Morgan Four years ago, in April 2001 to be precise, IBM bought ...

IBM's Informix buya billion dollars worth of benefit?
So IBM is buying Informix Software, Informix Corp.'s database unit and the heart of the company.

Resources last updated: 12/30/2015 2:37:19 PM