ROWID when a lock is on the run

Rob Fitzpatrick

ProgressTalk.com Sponsor
OpenEdge 10 is ancient and obsolete. You should upgrade.
Ok I understant, it's planne for us to do it but not right now.
And I'm in 10.2b 0.5
The sooner you get to a modern release of OpenEdge, the better. By "modern" I mean the current release at the time of your planned upgrade, with the latest service pack (unless you have some compelling reason to do otherwise). Right now, that would be OE 11.7.3.

But until that happens, at a minimum you should install SP08. It will fix a lot of bugs and even give you a few new and useful capabilities.

Some relevant upcoming milestones (note that these are tentative and subject to change):
  • Q4 2018: 11.7.4
  • Q1 2019: 12.0
  • Q1 2019: probable retirement of 10.2B
  • Q1 2019: probable retirement of 11.6
  • Q3 2019: 12.1
 
Sorry my bad.
When you update your openedge version on your database, do you have some critical point are a way to do it;
I don't know what I need to check before doing the update in term of compatibility, ...
 

Cringer

ProgressTalk.com Moderator
Staff member
The most important step is testing. Set up a box (it can be virtual) that is as similar to your production server as possible. Save your $DLC/properties somewhere if you're using them. Upgrade OpenEdge. You'll need to convert the databases and update the VSTs etc. Recompile the environment. Test everything is working.
Of course the process gets a lot harder if you add more steps. So moving to Type II storage will need a dump and load. Moving to a new server makes some things easier, and others harder.
But above all, I can't stress this enough, test, test, test.
 
Last edited:

TomBascom

Curmudgeon
From a compatibility perspective:

The database itself is trivial to upgrade. The only potential compatibility issues with the db are when you change operating systems - if you move from "big iron" (Sun, HP, IBM) to Intel (Linux or Windows) the byte order is different so you cannot simply copy the db. You must dump & re-load.

The application code will occasionally need some changes. The most common issue is that a new keyword may have been added to the language and you might have to change a variable name in the code or something along those lines. Once in a great while a bug fix might mean that you have to fix some code that you didn't know was broken ;) Stuff like that. But 99.44% of the time the code will just recompile without any issues.

Beyond compatibility issues an upgrade cannot, by itself, magically cause your old v6 code to suddenly become a fancy .NET GUI application. Nor will it convert your old "everything is in the schema area" database into a well designed type 2 storage areas db. That all takes work. But as a first step getting to a modern release level makes it a whole lot easier to execute that project.
 

Cringer

ProgressTalk.com Moderator
Staff member
The biggest code related problem I've come across is if you are using ADM1 or ADM2 and you have customised the framework in some way. These customisations would need to be added to the upgraded version also, and those can be a little tricky to do. Other than that, as Tom says, it should, in almost all cases be a case of recompile.
 
Hi guys last question.

I used the procedure to conver a recid to a rowid. But when i do : "TO-ROWID(cRowid)" I get nothing.

So I compare my cRowid with the string value of the rowid I was aiming for and they are the same.

What can go wrong.

this is my code:
k represent the recid i get when i look on the vst tables while excecuting the search of proref = 19870
Code:
FIND FIRST mBUFFER WHERE mBUFFER.proref = "19870" EXCLUSIVE-LOCK NO-ERROR.


MESSAGE STRING(ROWID(mBUFFER))
    VIEW-AS ALERT-BOX INFO BUTTONS OK.


DEFINE VARIABLE k AS INTEGER.
DEFINE VARIABLE c AS CHARACTER FORMAT "X(18)".



DEFINE VARIABLE j AS INTEGER     NO-UNDO.

k = 3532.
DO WHILE TRUE:
    ASSIGN
        j  = k MODULO 16
        c = (IF j < 10 THEN STRING(j) ELSE CHR(ASC("A") + j - 10)) + c.
        IF k < 16 THEN
            LEAVE.
        k = (k - j) / 16.
END.

MESSAGE c
    VIEW-AS ALERT-BOX INFO BUTTONS OK.
j = 16 - LENGTH(c).
DO k = 1 TO j:
    c = "0" + c.
END.
c = "0x" + c.

IF c <> STRING(TO-ROWID(STRING(ROWID(mBUFFER)))) THEN
    MESSAGE "looser"
        VIEW-AS ALERT-BOX INFO BUTTONS OK.

ELSE
    MESSAGE "ok"
        VIEW-AS ALERT-BOX INFO BUTTONS OK.

MESSAGE STRING(TO-ROWID(STRING(ROWID(mBUFFER)))) SKIP
        STRING(TO-ROWID(c))
    VIEW-AS ALERT-BOX INFO BUTTONS OK.
c = STRING(ROWID(mBUFFER)).

FIND FIRST SDTPRA WHERE ROWID(mBUFFER) = TO-ROWID(c) NO-LOCK NO-ERROR.
IF AVAILABLE mBUFFER THEN
    MESSAGE mBUFFER.proref
        VIEW-AS ALERT-BOX INFO BUTTONS OK.
 

TomBascom

Curmudgeon
Sounds like you are continuing to pursue this really bad idea.

Also it is worse than Cringer says... RECID is per storage area - not even per table.
 

TomBascom

Curmudgeon
Unless that is somehow related to "ROWID when a lock is on the run" you should open a new thread and describe what problem is it that you are trying to solve.

For what it is worth -- I have no idea what you might mean by "data that corrupt procedure" or how that could possibly relate to a ROWID or a record lock or a procedure.
 
Sorry, I have some issue to explain myself in english.

Yeah that's it.

What I can do:
Manually I can write request to check the data.

What I wanna do know:
I wanna prompt automatically the all the field of the row defined byt the RECID/ROWID.
I don't manage to do it because I don't know how to use the string variable of the _File VST table.

Is it more clear ?

Thank you in advance
 

TomBascom

Curmudgeon
You seem to have agreed with me that you are asking a new question.

So start a new thread.

Post an example of the code that is able to manually request to check data.

Point out the part of that code which you would like to be less manual.
 
Top