Full Database Path

GVProgress

New Member
Does anyone know of any command or a way to get a full path of a database through a progress program?
SEARCH function with database name will not work since my Database folder is not in propath.
 
That depends on how you connected to it.

But, yes, if you connected with a relative path then you are correct. On the other hand that would be easy enough to detect and amend...

Or you could take a look at:

Code:
for each _fileList no-lock:
  display _fileList-Name.
end.
 
@Tom, can you help me please? I have multiple database connected and I am trying to get the full pathname of each database. I ran the FOR EACH statement in your example but I only get the first DB connected. How do I get the rest of the DBs?
 
@ Tom,

I got the response from PROGRESS and I thought it might help others if I share the code here. So here you go.

/** This code will go through all connected PROGRESS databases and return the physical database full path **/

DEFINE VARIABLE iCount AS INTEGER NO-UNDO.
DEFINE VARIABLE Fullname AS CHARACTER NO-UNDO.

DO iCount = 1 TO NUM-DBS:
CREATE ALIAS DICTDB FOR DATABASE VALUE(LDBNAME(iCount)).
RUN temp\GetCurrentlySelectedDatabaseFullPathName.p (OUTPUT fullname).
MESSAGE fullname
VIEW-AS ALERT-BOX INFO BUTTONS OK.
DELETE ALIAS DICTDB.
END.

/** temp\GetCurrentlySelectedDatabaseFullPathName.p should contain this code **/
DEFINE OUTPUT PARAMETER cFullPathName AS CHARACTER.
FIND DICTDB._fileList WHERE DICTDB._fileList._fileList-Name MATCHES "*.db".
ASSIGN cFullPathName = DICTDB._fileList._fileList-Name.
 
Back
Top