Preservation and restoration of the computing environment

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Preservation and restoration of the computing environment

#1 Post by Eugene Lutsenko »

Whether there is a function of preservation and restoration of DAMP of the computing environment? That all open and current databases, indexes and variable memories remained and restored.

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Preservation and restoration of the computing environmen

#2 Post by Tom »

Hi, Eugene.

IMHO, there is no such thing as a single function available for this, like "SaveDump()" and "RestoreDump()". But. There are several functions you may gather for that:

SymbolInfo - creates an array with all PUBLIC or PRIVATE vars and their contenses
DbInfo - gives lots of information about the tables, from physical names to whatever you need
WorkSpaceList - creates an array with the aliases of all open tables (ideal basics to work on with DbInfo)
Table/index functions from RecNo to OrdKeyNumber give information about record pointers, open indexes and so on

Putting all that together would allow to save/restore all PRIVATEs, PUBLICs, all tables/indexes with aliases and record pointers (remember: thread local!) a.s.o. There is no way to save LOCAL vars. BTW, the simplest way to save/restore all PRIVATEs/PUBLICs is SAVE TO .. / RESTORE FROM (see docs).
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Preservation and restoration of the computing environmen

#3 Post by rdonnay »

aSave := DC_DataSave() will save everything about all databases and indexes in the current workarea to an array.

DC_DataRest( aSave ) will restore everything.

The source code for these functions is in \exp19\source\dclip1\_dcarea.prg.
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Preservation and restoration of the computing environmen

#4 Post by Eugene Lutsenko »

Many thanks to all! I think and I hope that it will be enough. It practically too most about what I asked. I am sure that everything that to me can be demanded in programming on Alaska, for a long time it was required to you and you developed the decisions, sometimes radical or general, an example of that is eXpress++.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Preservation and restoration of the computing environmen

#5 Post by Eugene Lutsenko »

Attempt of use of functions: aSave: = DC_DataSave () and DC_DataRest (aSave) wasn't successful. Writes that unresolved external symbol. I tried to include libraries, ch-files and even prg-files with these funtsiya, but the message that other functions aren't found then stands out:


D:\ALASKA\AIDOS-X>CLS

D:\ALASKA\AIDOS-X>XPP _AIDOS-X

D:\ALASKA\AIDOS-X>ALINK _AIDOS-X /PM:PM
Alaska 32-Bit Linker Version 1.90.355
Copyright (c) Alaska Software 1997-2009. All rights reserved.

_AIDOS-X.obj: error ALK2102: unresolved external symbol DC_TAGNAME
_AIDOS-X.obj: error ALK2102: unresolved external symbol DC_USEAREA
_AIDOS-X.obj: error ALK2102: unresolved external symbol DC_REUSEEXCLUSIVE
_AIDOS-X.obj: error ALK2102: unresolved external symbol DC_TABLENAME
_AIDOS-X.obj: error ALK2102: unresolved external symbol DC_DEFTRAN
_AIDOS-X.obj: error ALK2102: unresolved external symbol V_RDDNAME
_AIDOS-X.obj: error ALK2102: unresolved external symbol V_SUPERRDD
_AIDOS-X.obj: error ALK2102: unresolved external symbol V_SETEXT
ALINK: fatal error ALK4102: 8 external symbols unresolved

I can't use library #pragma ("dclip1.lib"), as I have a message that it is damaged (corrupted).

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: Preservation and restoration of the computing environmen

#6 Post by Auge_Ohr »

Eugene Lutsenko wrote:I can't use library #pragma ("dclip1.lib"), as I have a message that it is damaged (corrupted).
rebuild it, you have the Source ! look for build19_sl1.bat
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Preservation and restoration of the computing environmen

#7 Post by Eugene Lutsenko »

Everything turned out!
I in the folder with libraries had some outdate (created build19.bat).

At me perfectly it turned out to use functions: aSave: = DC_DataSave () and DC_DataRest (aSave) also was received that result which was necessary. Many thanks to Roger and everything who like my problems. And variable memories appeared to be kept in this case not necessarily, these functions it appeared enough for receiving the necessary result. Very much it was pleasant to me as accurately these functions work. They are very demanded.

Post Reply