Repository navigation
Expand file tree
/
Copy pathCcConfStorage.dtx
More file actions
202 lines (172 loc) · 8.48 KB
/
Copy pathCcConfStorage.dtx
File metadata and controls
202 lines (172 loc) · 8.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
@@CcConfStorage.pas
CopyCat replication suite
Copyright (c) 2005 Microtec Communications
For any questions or technical support,
contact Jonathan Neve (jonathan@microtec.fr)
@@TCcComponent
Summary:
TCcComponent is a base component allowing to interact with a TCcProvider and/or a
TCcConfigStorage.
@@TCcComponent.ConfigStorage
Summary:
Automatic storage and reloading of all the replication parameters of the
TCcComponent.
Description:
The ConfigStorage property is not compulsory. If it is used, the configuration
options of the TCcComponent are automatically filled in based on the current
record of the associated TCcConfigStorage component.In such a case, these
properties become read-only, and cannot be modified manually on the component. If
ConfigStorage is not assigned, each property must be set explicitly.<p/>
<p/>
Thus, using ConfigStorage, several replication configurations can be stored in
the same configuration file (or in the Registry), allowing a replicator
application to switch between the different available configurations in a very
simple manner.
@@TCcComponent.DBProvider
Summary:
Database provider for the component.
Description:
Every TCcComponent must have a DBProvider in order to
function correctly. The DBProvider is required in order to be
able to create all the internal database related objects
(database connections, transactions, and query objects).
See Also:
TCcProvider
@@TCcComponent.DestroyQueries
DestroyQueries is called just before changing the provider
@@TCcComponent.InitQueries
InitQueries is called when the provider is loaded, to enable the queries to be created
@@TCcComponent.SetDBProvider@TCcProvider
TCcComponent
@@TCcConfig.DestroyQueries
DestroyQueries is called just before changing the provider
@@TCcConfig.InitQueries
InitQueries is called when the provider is loaded, to enable the queries to be created
@@TCcConfigStorage
Summary:
Manages loading and saving configuration options to and from TCcReplicator and
TCcConfig.
Description:
TCcConfigStorage is designed to manage configuration options. These can be stored
in the registry or in an INI-file. TCcConfigStorage is a dataset descendant, that
defines the following fields:
<table 30c%, 10c%>
Field name Type \Description
======================= ======== ----------------------------------------------------------------
ConfigName String Name of the configuration. There may be several different
configurations in the same INI-file.
ProceduresPath String Path of the INI-file defining the list of procedures (by
default, the root directory of the general configuration
\file).
TablesPath String Path of the INI-file defining the list of tables (by
default, the root directory of the general configuration
\file).
LocalUserName String User name in the local database (see <link Replication users>).
LocalPassword String Password for the local database.
LocalSYSDBAName String SYSDBA user name for the local server.
LocalSYSDBAPassword String SYSDBA password for the local server.
RemoteUserName String User name in the local database (see <link Replication users>).
RemotePassword String Password for the remote database.
LocalCharSet String Character set for local database login.
LocalDBName String Local database path.
LocalSQLDialect Integer Local database SQL dialect.
RemoteCharSet String Character set for remote database login.
RemoteDBName String Remote database path.
RemoteSQLDialect Integer Remote database SQL dialect.
AutoReplicateFrequency Integer Auto-replication frequency (in seconds). Set to 0 for no
auto-replication.
</table>
See Also:
TCcComponent.ConfigStorage, TCcDetailDataSet.ConfigStorage
@@TCcConfigStorage.ConfigName
Summary:
Current configuration name.
Description:
ConfigName represents the configuration name of the current record. Setting
ConfigName amounts to locating a different configuration by name within the
selected configuration file.
@@TCcConfigStorage.UseRegistry
Description:
Determines whether to store the configuration in the Windows Registry or in an
INI-file.
@@TCcCustomReplicator.DestroyQueries
DestroyQueries is called just before changing the provider
@@TCcCustomReplicator.InitQueries
InitQueries is called when the provider is loaded, to enable the queries to be created
@@TCcCustomStorage.Active
Summary:
Indicates whether the dataset is open or not.
Description:
Set Active to True in order to open the dataset, or to False in order to close
it.
@@TCcCustomStorage.BeforeLoad
Fired before loading the data into the dataset (after opening).
@@TCcCustomStorage.BeforeSave
Fired before writing the data from the dataset into the INI-file or registry
(before posting).
@@TCcCustomStorage.Path
Description:
Depending on the value of UseRegistry, Path is either the path to the storage
\file, or the registry key.
@@TCcCustomStorage.Sort
Sort the dataset. The field to sort on is determined by each descendant.
@@TCcCustomStorage.UseRegistry
Description:
Determines whether to store the configuration in the Windows Registry or in an
INI-file.
@@TCcDetailDataset
Summary:
Detail dataset linked to a TCcConfigStortage component.
Description:
TCcDetailDataset is the ancestor of TCcTables and TCcProcedures. It can be linked
to a TCcConfigStorage component through its ConfigStorage, and in such a case, it
acts as a detail dataset in relation to it. In other words, the DataSet is
automatically reloaded every time the active record changes in the
TCcConfigStorage component (using the TABLES_PATH or PROCEDURES_PATH fields to
provide the file path of the INI-file).
@@TCcDetailDataset.ConfigStorage
Summary:
Allows automatic configuration loading.
Description:
The ConfigStorage property is not compulsory. If it is used, the Path property is
automatically filled in based on the current record of the associated
TCcConfigStorage component, and in such a case, Path cannot be modified manually.
If ConfigStorage is not assigned, the Path property must be set explicitly.<p/>
<p/>
Thus, using ConfigStorage, several replication configurations can be stored in
the same configuration file (or in the Registry), with different Tables and
Procedures INI-files for each one.
@@TCcProcedures
Summary:
Holds the list of procedures in the current database.
Description:
TCcProcedures is used in conjunction with TCcConfig, and provides the list of
stored procedures available in the current database, as well as the configuration
options of each one.<p/>
<p/>
This list of procedures is stored in an INI-file (or the Windows Registry) as
specified by the Path and UseRegistry properties, and loaded upon opening.<p/>
<p/>
When the associated TCcConfig component connects to the database, the list of
procedures is automatically synchronized with the procedures actually existing in
the database, but the existing entries in the INI-file are not deleted.
@@TCcReplicator.DestroyQueries
DestroyQueries is called just before changing the provider
@@TCcReplicator.InitQueries
InitQueries is called when the provider is loaded, to enable the queries to be created
@@TCcTables
Summary:
Holds the list of tables in the current database.
Description:
TCcTables is used in conjunction with TCcConfig, and provides the list of tables
available in the current database, as well as the configuration options of each
one.<p/>
<p/>
This list of tables is stored in an INI-file (or the Windows Registry) as
specified by the Path and UseRegistry properties, and loaded upon opening.<p/>
<p/>
When the associated TCcConfig component connects to the database, the list of
tables is automatically synchronized with the tables actually existing in the
database, but the existing entries in the INI-file are not deleted.
See Also:
TCcConfig.Tables