Page 1 of 1

Preservation and restoration of the computing environment

Posted: Wed Aug 01, 2012 11:51 pm
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.

Re: Preservation and restoration of the computing environmen

Posted: Thu Aug 02, 2012 5:31 am
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).

Re: Preservation and restoration of the computing environmen

Posted: Thu Aug 02, 2012 10:11 am
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.

Re: Preservation and restoration of the computing environmen

Posted: Thu Aug 02, 2012 11:55 am
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++.

Re: Preservation and restoration of the computing environmen

Posted: Thu Aug 02, 2012 9:09 pm
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).

Re: Preservation and restoration of the computing environmen

Posted: Thu Aug 02, 2012 9:12 pm
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

Re: Preservation and restoration of the computing environmen

Posted: Thu Aug 02, 2012 9:27 pm
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.