?
Solved

Progress 4GL question

Posted on 2006-05-30
11
Medium Priority
?
576 Views
Last Modified: 2008-08-17
I am getting an error 247 .
does anybody know Progress 4gl?
0
Comment
Question by:ainaks25
11 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 16811811
http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html no such error

Are you talking about Informix 4GL and Informix SQL State -247 ???
0
 

Author Comment

by:ainaks25
ID: 16819285
no, my error message code is from progres app builder that i am using. this is what i have:

FOR each icsw where icsw.cono = 1
               AND icsw.pricetype = "29"
               AND icsw.arpvendno = 2196   EXCLUSIVE-LOCK,
       each icsp where icsp.cono= icsw.cono
              AND icsp.prod = icsw.prod   EXCLUSIVE-LOCK:

    display icsp.prodcat icsw.prod.
    assign icsp.prodcat = "110". -------------- assigning line code

END.

if i comment out the assign line it works fine and displays what i am looking for, but it's not working with the assign line. I know there is nothing wrong with this line bacause i was using it before. the only difference is in this case i am joining 2 table.

thanks,



0
 
LVL 62

Expert Comment

by:gheist
ID: 16820245
If you get n:m relation between icsw and iscp it locks and locks and locks and at one moment loop hits own lock.
0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 

Author Comment

by:ainaks25
ID: 16833975
how do I fix it?
without an exclusive - lock I can not change the value of icsp.prodcat  in DB.
0
 
LVL 62

Expert Comment

by:gheist
ID: 16836566
UPDATE iscw SET ... WHERE ...
0
 

Author Comment

by:ainaks25
ID: 16845435
it doesn't work like that
0
 
LVL 62

Expert Comment

by:gheist
ID: 16853244
Your 4GL tool causes deadlock. What other explanation you need ???
0
 

Author Comment

by:ainaks25
ID: 16862491
It was a problem with a propath on the server.It's fixed, my code works fine now.

0
 
LVL 62

Expert Comment

by:gheist
ID: 16865372
So you fixed yourself, ask for refund in http:/Community_Support/ or wait for moderators to come around
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 16865757
Closed, 125 points refunded.
ee_ai_construct
Community Support Moderator
replacement part #xm34
0
 

Expert Comment

by:OctavioOlguin
ID: 22247491
Hi, greetings.  I consider myself a quite good progrss developer.

Your code sets the related record to a value,  there is no a reason for the outer FOR EACH to do a exclusive-lock, since in the process there is no assingment to _icsw_ record at any point.   Even in the case that you need to update the icsw record, that is no good practice to have the outer _for each_ to make exclusive-locks, since this would lock the entire table for the cycle duration. Keeping other users from updating that table.  For your info, when you need to update BOTH tables, I recomend the folowing:

DEFINE BUFFER _b1_ FOR TABLE _outer_.
......
FOR EACH _outer_ WHERE  _some condition_ NO-LOCK
    FIND _b1_ WHERE ROWID(_b1) = ROWID(_outer_).
    ASSIGN _b1_.somefield = _some-value.
    FOR EACH _inner_ OF _outer_  NO-LOCK:         <----  If you need locking, you would like to use the same trick.
       _do some calculation_
   END.
   RELEASE _b1_.
END.

It's important that you release the _b1_ record INSIDE the loop, so you won't scalete the transaction to the block that contains this code.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: http://www.postgresql.org/ (http://www.postgresql.org/) This requires some add-o…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question