Kbase P139429: Getting error 1006 when trying to run code on an AppServer
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/12/2009 |
|
Status: Unverified
SYMPTOM(s):
Getting error 1006 when trying to run code on an AppServer
<program name> Database <dbname> not connected. (1006)
<program name> Database recompy132953 not connected. (1006)
The database name listed in the 1006 error is consistently changing as if it was a sequence value associated with the real database name.
FACT(s) (Environment):
PowerPC 64-bit
IBM AIX
OpenEdge 10.0B05 64-bit Service Pack
OpenEdge Category: Database
OpenEdge 10.x
CHANGE:
Code was recompiled recently.
CAUSE:
Code that is failing with the 1006 error contains a "CREATE ALIAS" statement for the database that the code is being compiled against. Example: CREATE ALIAS <alias-name> for database value(v-wllogical).
Usually, any alias that exists during the session when you compile a procedure has no effect on the resulting r-code file. When a procedure is compiled, the logical name of the database that is accessed within the procedure is put into the r-code file, not an existing alias. If a procedure accesses more than one database, all of the logical names of accessed databases are placed into the r-code file.
However, any file reference that is qualified with an alias (as opposed to a logical name) generates a new instance of the file for the compilation. This new instance causes the r-code to have the alias reference and not the logical database name reference. Subsequent unqualified references to that same file within the same block, or nested blocks, will resolve to the new alias instance following the usual rules for qualifying. Unqualified references to different files in the same database do not get the alias name, but get the logical name. Anonymous references to a file, previously referenced using the alias qualifier, in a different, non-nested block get the logical name instead of the alias name.
FIX:
Connect to a database with the desired logical name, leave all references unqualified, do not create an alias, and then compile the application. if you want to compile a procedure so that only the alias gets into the r-code file, then explicitly qualify all file references using the alias.