If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Using SELECT... FOR UPDATE on INFORMIX SE 7.1

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-28-03, 01:34
tabacaru tabacaru is offline
Registered User
 
Join Date: Jan 2003
Posts: 9
Using SELECT... FOR UPDATE on INFORMIX SE 7.1

I read in help about SELECT... FOR UPDATE, but I don't understand if I can use out of a store procedure. I need this instruction for locking a row. Is there any possibility to lock - unlocka a row?
Reply With Quote
  #2 (permalink)  
Old 01-28-03, 04:23
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
SELECT FOR UPDATE can only be used in ESQL/C.

The latest versions of SE are able to lock rows, in 7.1, you can only use the following sql:
LOCK TABLE. UNLOCK TABLE.
Why would you want to explicitely lock a row?
I would recommend to upgrade to the latest version of IDS. This database server contains all feauture you 'll like...
__________________
rws
Reply With Quote
  #3 (permalink)  
Old 01-28-03, 12:57
tabacaru tabacaru is offline
Registered User
 
Join Date: Jan 2003
Posts: 9
Quote:
Originally posted by Roelwe
SELECT FOR UPDATE can only be used in ESQL/C.

The latest versions of SE are able to lock rows, in 7.1, you can only use the following sql:
LOCK TABLE. UNLOCK TABLE.
Why would you want to explicitely lock a row?
I would recommend to upgrade to the latest version of IDS. This database server contains all feauture you 'll like...
Unfortunately I MUST Use INFORMIX SE 7.1 (I must integrate an ERP procedure developed with Informix C-ISAM with some client server). Because the access to a record is made from my client-server procedure and from a terminal application, I want to lock a record. Even the terminal application make a LOCK on record.
Thanks for your response !
Reply With Quote
  #4 (permalink)  
Old 01-29-03, 02:10
eherber eherber is offline
Registered User
 
Join Date: Aug 2002
Location: Bonn/Germany
Posts: 152
My memories from Informix-SE are from a long time ago.

But as far as I remember you can have databases with
transactions.
If your database has transactions, you might open a
transaction (begin work) and then make a dummy update
to this individual row.

This will place an exclusive lock on the row as long as
your transaction stays open (no commit, no rollback).

HTH.

Eric
--
IT-Consulting Herber
WWW: http://www.herber-consulting.de
Email: eric@herber-consulting.de

***********************************************
Download the IFMX Database-Monitor for free at:
http://www.herber-consulting.de/BusyBee
***********************************************
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On