Kbase P101571: Error "Database <"Name"> already connected" when using the Report Builder Runtime Engine
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  07/03/2005 |
|
Status: Unverified
FACT(s) (Environment):
Windows
SYMPTOM(s):
Report Builder
Getting error when using Report Builder Engine
Database "<name>" already connected
Using the PRORE Report Engine
Using the PRINTRB interface to generate the report
Other PCs can generate the report correctly
Problem only occurs on 1 PC
CAUSE:
Database connection parameters were present in the default STARTUP.PF file located in DLC. All Progress processes access this file on start-up. Therefore when the Report Builder Runtime Engine (PRORE32.EXE) attempted to make the connection to the database as part of PRINTRB, it found that a database with the same logical name was already connected.
FIX:
Option #1
Specify the database connection parameters somewhere other than the default STARTUP.PF file located in DLC.
For example, use a separate .PF file for the database connection parameters and specify this via the -pf parameter.
Option #2
Ensure that the logical name of the database saved in the report is different from that logical name of the database being connected to in the STARTUP.PF file. Alter the report and re-save it.
Option #3
Change the PROSTARTUP parameter, stored in the PROGRESS.INI file or the Windows Registry, dynamically before calling the Report Builder Runtime Engine. PROSTARTUP can be used to change the location of the default STARTUP.PF file. Using this method, you can specify a separate STARTUP.PF file to reference that does not contain the database connection parameters. This can be achieved in a manner similar to the following:
/* Sample code */
DEFINE VARIABLE newStartupPF AS CHARACTER INIT "E:\startup.pf" NO-UNDO.
PUT-KEY-VALUE SECTION "Startup" KEY "PROSTARTUP" VALUE newStartupPF.
/* Code to call Report Builder Runtime Engine here */
PUT-KEY-VALUE SECTION "Startup" KEY "PROSTARTUP" VALUE "".
Please note that this method is not recommended. If the PC or application were to crash after the first PUT-KEY-VALUE statement and before the second PUT-KEY-VALUE statement then the wrong location for the default STARTUP.PF file would be indicated. This could cause problems when starting the application after recovering from the crash as the value would not have been reset.