[Stackoverflow] [Progress OpenEdge ABL] Copy and use Progress database file at runtime

Status
Not open for further replies.
W

W0lfw00ds

Guest
I want to create a copy database in file format from the one I'm already connected to.

After creating it, I want to immediately do stuff with it (populate it, run queries etc).

Is this possible?

example.p:

Code:
/* Copy currently connected 'mydb' database into new .db file with same schema but without any database rows */
RUN copyCurrentDatabaseToNewFileBasedDatabase.p("mydb", "C:\mydatabase\mydatabase.db").

/* Disconnect from current 'mydb' database */
DISCONNECT mydb.

/* Connect to copied and empty 'mydatabase.db' database */
CONNECT VALUE("-db C:\mydatabase\mydatabase.db -H localhost -S 20000").

/* Populate the copied database with some data */
RUN populateCopyDatabase.p.

/* Perform queries on the copied and populated database */
RUN queryCopyDatabase.p.

Continue reading...
 
Status
Not open for further replies.
Top