Consultor Eletrônico



Kbase P108268: CURRENT-VALUE/NEXT-VALUE access sequences in the wrong database
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   22/12/2008
Status: Verified

SYMPTOM(s):

CURRENT-VALUE/NEXT-VALUE access sequences in the wrong database

Connecting to multiple databases at runtime

Calling a procedure that is compiled against one database

Called procedure uses CURRENT-VALUE/NEXT-VALUE functions

Sequence taken from wrong database

Using CREATE ALIAS statement to identify which database is used by called procedure

r-code was compiled using an alias for the database references

FACT(s) (Environment):

Running from r-code
Progress 8.x
Progress 9.x
OpenEdge 10.0x
All Supported Operating Systems

CAUSE:

Bug# OE00060933

CAUSE:

During compilation, the database references will be written to the r-code. For any other operation this will be the alias name if an alias is un use, but for the sequence operations, the reference written will always be the logical database name.
This can be proven by using the DB-REFERENCES attribute of the RCODE-INFO system handle.

FIX:

Workaround:
Instead of using aliases when compiling the called procedure, use a database connection with a logical database name that matches the alias name to be used at runtime.