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 > Is it possible to pause a procedure?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-21-08, 05:50
sbnc77 sbnc77 is offline
Registered User
 
Join Date: Jul 2008
Posts: 1
Is it possible to pause a procedure?

Hi Everybody!

I wonder if it's possible to pause for a while a procedure.

The reason is that I have a procedure with two "insert" statements. Although this inserts are registered in the right order in the db, sometimes when i do a "select" (while the procedure is running) I get the second one instead the first, as if the second insert was done before the first.

If i do the first insert and I wait some time, then I get this new record if I look up for them. Then I do the second insert, and I get the second. I'd like to simulate this behaviour in my procedure: wait some seconds between inserts.

I thought in a "commit" instruction, but my database is not transactional, so it's not possible to use it, isn't it?

I also think about to introduce, between the first insert and the second, other sql in order to waste time, but I'd like to know if there is other and smart solution.

Thx in advance!
Reply With Quote
  #2 (permalink)  
Old 08-12-08, 02:37
mberni mberni is offline
Registered User
 
Join Date: Aug 2008
Posts: 1
use system command

why not insert a system command like

system "sleep 5";

to wait 5 seconds.
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