Contents

I

Table of Contents
Part I What's New

1

Part II General Information

16

1 Overview................................................................................................................................... 16
2 Features................................................................................................................................... 21
3 Requirements................................................................................................................................... 26
4 Compatibility................................................................................................................................... 27
5 Using...................................................................................................................................
Several DAC Products in One IDE
31
6 Component...................................................................................................................................
List
31
7 Hierarchy...................................................................................................................................
Chart
33
8 Editions................................................................................................................................... 35
9 Licensing................................................................................................................................... 39
10 Getting...................................................................................................................................
Support42
11 Frequently...................................................................................................................................
Asked Questions
43

Part III Getting Started

50

1 Installation................................................................................................................................... 51
2 Migrating...................................................................................................................................
from BDE and DOA
55
3 Logging...................................................................................................................................
On To Server
56
4 Creating...................................................................................................................................
Database Objects
60
5 Retrieving...................................................................................................................................
and Modifying Data
62
6 Inserting...................................................................................................................................
Data Into Tables
65
7 Working...................................................................................................................................
With Oracle Stored Procedures
68..........................................................................................................................................................
69
Stored Procedures- General Inform ation
71
Using Stored..........................................................................................................................................................
Procedures via the TOraStoredProc Class..........................................................................................................................................................
73
Using Package
Procedures

8 Working...................................................................................................................................
With PL/SQL
74..........................................................................................................................................................
74
PL/SQL - General
Inform ation
76
Using PL/SQL..........................................................................................................................................................
via the TOraSQL Class

9 Using...................................................................................................................................
Transactions
77
10 Demo...................................................................................................................................
Projects
79
11 Deployment................................................................................................................................... 88

Part IV Using ODAC

89

1 Updating...................................................................................................................................
Data with ODAC Dataset Components
90
2 Connecting...................................................................................................................................
in Direct Mode91
3 Master/Detail...................................................................................................................................
Relationships
94
4 Data Type...................................................................................................................................
Mapping96
5 Data...................................................................................................................................
Encryption
102© 2019 Devart

IIOracle Data Access Components
6 Working...................................................................................................................................
in an Unstable Network
104
7 Disconnected...................................................................................................................................
Mode105
8 Batch...................................................................................................................................
Operations
106
9 Increasing...................................................................................................................................
Performance
110
10 Macros................................................................................................................................... 113
11 DataSet...................................................................................................................................
Manager114
12 Using...................................................................................................................................
Connection Pooling119
13 Automatic...................................................................................................................................
Key Field Value Generation
122
14 TOraLoader...................................................................................................................................
Component
122
15 TOraTransaction...................................................................................................................................
Component
123
16 TOraQueue,...................................................................................................................................
TOraQueueAdmin and TOraQueueTable Components
125
17 TOraChangeNotification...................................................................................................................................
Component
128
18 Working...................................................................................................................................
With Data
130..........................................................................................................................................................
131
BLOB and CLOB
Data Types..........................................................................................................................................................
134
Unicode Character
Data.......................................................................................................................................................... 136
Objects..........................................................................................................................................................
137
XMLTYPE Data
Type..........................................................................................................................................................
140
VARRAY DataTypeDML Array .......................................................................................................................................................... 142.......................................................................................................................................................... 143
Cursors.......................................................................................................................................................... 145
PL/SQL Tables

19 Writing...................................................................................................................................
Oracle External Procedures with ODAC
147
20 Transparent...................................................................................................................................
Application Failover Support
149
21 DBMonitor................................................................................................................................... 152
22 Writing...................................................................................................................................
GUI Applications with ODAC
153
23 Compatibility...................................................................................................................................
with Previous Versions
153
24 Oracle...................................................................................................................................
Package Wizard
154
25 Integration...................................................................................................................................
with dbForge Studio for Oracle
156
26 64-bit...................................................................................................................................
Development with Embarcadero RAD Studio XE2
160
27 Database...................................................................................................................................
Specific Aspects of 64-bit Development
165

Part V Reference

166

1 CRAccess................................................................................................................................... 168.......................................................................................................................................................... 169
Classes.........................................................................................................................................................
169
TCRCursor
Class......................................................................................................................................... 170
Members.......................................................................................................................................................... 170
Types.........................................................................................................................................................
171
TBeforeFetchProc
Procedure Reference.......................................................................................................................................................... 171
Enum erations.........................................................................................................................................................
172
TCRIsolationLevel
Enumeration.........................................................................................................................................................
172
TCRTransactionAction
Enumeration.........................................................................................................................................................
173
TCursorState
Enumeration

2 CRBatchMove................................................................................................................................... 173.......................................................................................................................................................... 174
Classes.........................................................................................................................................................
174
TCRBatchMove
Class© 2019 Devart

Contents

III......................................................................................................................................... 175
Members......................................................................................................................................... 177
Properties...................................................................................................................................
179
AbortOnKeyViol
Property...................................................................................................................................
179
AbortOnProblem
Property179
ChangedCount...................................................................................................................................
Property................................................................................................................................... 180
CommitCount Property................................................................................................................................... 180
Destination Property...................................................................................................................................
181
FieldMappingMode
Property................................................................................................................................... 181
KeyViolCount Property................................................................................................................................... 182
Mappings Property
Mode Property................................................................................................................................... 182................................................................................................................................... 183
MovedCount Property................................................................................................................................... 183
ProblemCount Property................................................................................................................................... 184
RecordCount Property................................................................................................................................... 184
Source Property......................................................................................................................................... 185
Methods................................................................................................................................... 185
Execute Method......................................................................................................................................... 186
Events...................................................................................................................................
186
OnBatchMoveProgress
Event.......................................................................................................................................................... 187
Types.........................................................................................................................................................
187
TCRBatchMoveProgressEvent
Procedure Reference.......................................................................................................................................................... 187
Enum erations.........................................................................................................................................................
188
TCRBatchMode
Enumeration.........................................................................................................................................................
188
TCRFieldMappingMode
Enumeration

3 CREncryption................................................................................................................................... 189.......................................................................................................................................................... 190
Classes.........................................................................................................................................................
190
TCREncryptor
Class.........................................................................................................................................
190
Members.........................................................................................................................................
191
Properties...................................................................................................................................
192
DataHeader Property...................................................................................................................................
192
EncryptionAlgorithm Property...................................................................................................................................
193
HashAlgorithm Property...................................................................................................................................
193
InvalidHashAction Property...................................................................................................................................
194
Passw ord Property.........................................................................................................................................
194
Methods...................................................................................................................................
195
SetKey Method..........................................................................................................................................................
195
Enum erations.........................................................................................................................................................
196
TCREncDataHeader Enumeration.........................................................................................................................................................
196
TCREncryptionAlgorithm Enumeration.........................................................................................................................................................
197
TCRHashAlgorithm Enumeration.........................................................................................................................................................
198
TCRInvalidHashAction Enumeration

4 CRVio................................................................................................................................... 198.......................................................................................................................................................... 198
Enum erations.........................................................................................................................................................
198
TIPVersion
Enumeration

5 DAAlerter................................................................................................................................... 199.......................................................................................................................................................... 200
Classes.........................................................................................................................................................
200
TDAAlerterClass......................................................................................................................................... 201
Members......................................................................................................................................... 201
Properties
Active Property................................................................................................................................... 202................................................................................................................................... 202
AutoRegister Property................................................................................................................................... 203
Connection Property......................................................................................................................................... 203
Methods© 2019 Devart

IV

Oracle Data Access Components................................................................................................................................... 204
SendEvent Method
Start Method ................................................................................................................................... 204
Stop Method ................................................................................................................................... 205......................................................................................................................................... 205
EventsOnError Event ................................................................................................................................... 206.......................................................................................................................................................... 206
Types.........................................................................................................................................................
207
TAlerterErrorEvent
Procedure Reference

6 DADump................................................................................................................................... 207.......................................................................................................................................................... 208
Classes
208
TDADump.........................................................................................................................................................
Class.........................................................................................................................................
209
Members.........................................................................................................................................
210
Properties...................................................................................................................................
211
Connection Property...................................................................................................................................
212
Debug Property...................................................................................................................................
212
Options Property...................................................................................................................................
213
SQL Property...................................................................................................................................
213
TableNames Property.........................................................................................................................................
214
Methods...................................................................................................................................
215
Backup Method...................................................................................................................................
215
BackupQuery Method...................................................................................................................................
216
BackupToFile Method...................................................................................................................................
217
BackupToStream Method...................................................................................................................................
217
Restore Method...................................................................................................................................
218
RestoreFromFile Method...................................................................................................................................
219
RestoreFromStream Method.........................................................................................................................................
219
Events...................................................................................................................................
220
OnBackupProgress Event...................................................................................................................................
221
OnError Event...................................................................................................................................
221
OnRestoreProgress Event.........................................................................................................................................................
222
TDADumpOptions Class.........................................................................................................................................
222
Members.........................................................................................................................................
223
Properties...................................................................................................................................
224
AddDrop Property...................................................................................................................................
224
CompleteInsert Property...................................................................................................................................
225
GenerateHeader Property...................................................................................................................................
225
QuoteNames Property..........................................................................................................................................................
225
Types
.........................................................................................................................................................
226
TDABackupProgressEvent Procedure Reference.........................................................................................................................................................
226
TDARestoreProgressEvent Procedure Reference

7 DALoader................................................................................................................................... 227.......................................................................................................................................................... 228
Classes.........................................................................................................................................................
228
TDAColumnClass......................................................................................................................................... 229
Members......................................................................................................................................... 229
Properties................................................................................................................................... 230
FieldType Property
Name Property................................................................................................................................... 230.........................................................................................................................................................
231
TDAColumns
Class......................................................................................................................................... 231
Members......................................................................................................................................... 231
Properties................................................................................................................................... 232
Items Property(Indexer).........................................................................................................................................................
232
TDALoaderClass......................................................................................................................................... 233
Members......................................................................................................................................... 234
Properties© 2019 Devart

Contents

V................................................................................................................................... 235
Columns Property................................................................................................................................... 235
Connection Property................................................................................................................................... 236
TableName Property......................................................................................................................................... 236
Methods
237
CreateColumns...................................................................................................................................
MethodLoad Method ................................................................................................................................... 237...................................................................................................................................
238
LoadFromDataSet
Method239
PutColumnData...................................................................................................................................
Method239
PutColumnData...................................................................................................................................
Method240
PutColumnData...................................................................................................................................
Method......................................................................................................................................... 240
Events...................................................................................................................................
241
OnGetColumnData
Event................................................................................................................................... 242
OnProgress Event................................................................................................................................... 242
OnPutData Event.........................................................................................................................................................
243
TDALoaderOptions
Class......................................................................................................................................... 243
Members......................................................................................................................................... 244
Properties...................................................................................................................................
244
UseBlankValues
Property.......................................................................................................................................................... 244
Types.........................................................................................................................................................
245
TDAPutDataEvent
Procedure Reference.........................................................................................................................................................
245
TGetColumnDataEvent
Procedure Reference.........................................................................................................................................................
246
TLoaderProgressEvent
Procedure Reference

8 DAScript................................................................................................................................... 246.......................................................................................................................................................... 247
Classes.........................................................................................................................................................
248
TDAScript
Class.........................................................................................................................................
249
Members.........................................................................................................................................
250
Properties...................................................................................................................................
252
Connection Property...................................................................................................................................
252
DataSet Property...................................................................................................................................
253
Debug Property...................................................................................................................................
253
Delimiter Property...................................................................................................................................
254
EndLine Property...................................................................................................................................
254
EndOffset Property...................................................................................................................................
255
EndPos Property...................................................................................................................................
255
Macros Property...................................................................................................................................
256
SQL Property...................................................................................................................................
256
StartLine Property...................................................................................................................................
256
StartOffset Property...................................................................................................................................
257
StartPos Property...................................................................................................................................
257
Statements Property.........................................................................................................................................
258
Methods...................................................................................................................................
259
BreakExec Method...................................................................................................................................
259
ErrorOffset Method...................................................................................................................................
260
Execute Method...................................................................................................................................
261
ExecuteFile Method...................................................................................................................................
261
ExecuteNext Method...................................................................................................................................
262
ExecuteStream Method...................................................................................................................................
262
MacroByName Method.........................................................................................................................................
263
Events...................................................................................................................................
264
AfterExecute Event...................................................................................................................................
264
BeforeExecute Event...................................................................................................................................
265
OnError Event.........................................................................................................................................................
265
TDAStatement Class.........................................................................................................................................
266
Members© 2019 Devart

VI

Oracle Data Access Components......................................................................................................................................... 267
Properties................................................................................................................................... 268
EndLine Property................................................................................................................................... 268
EndOffset Property................................................................................................................................... 268
EndPos Property
Omit Property ................................................................................................................................... 269................................................................................................................................... 269
Params Property
Script Property................................................................................................................................... 270
SQL Property ................................................................................................................................... 270................................................................................................................................... 271
StartLine Property................................................................................................................................... 271
StartOffset Property................................................................................................................................... 271
StartPos Property......................................................................................................................................... 272
Methods................................................................................................................................... 272
Execute Method.........................................................................................................................................................
273
TDAStatements
Class......................................................................................................................................... 273
Members......................................................................................................................................... 273
Properties................................................................................................................................... 274
Items Property(Indexer).......................................................................................................................................................... 275
Types.........................................................................................................................................................
275
TAfterStatementExecuteEvent
Procedure Reference.........................................................................................................................................................
275
TBeforeStatementExecuteEvent
Procedure Reference.........................................................................................................................................................
276
TOnErrorEvent
Procedure Reference.......................................................................................................................................................... 277
Enum erations.........................................................................................................................................................
277
TErrorAction
Enumeration

9 DASQLMonitor................................................................................................................................... 277.......................................................................................................................................................... 278
Classes.........................................................................................................................................................
279
TCustomDASQLMonitor
Class.........................................................................................................................................
279
Members.........................................................................................................................................
280
Properties...................................................................................................................................
281
Active Property...................................................................................................................................
281
DBMonitorOptions Property...................................................................................................................................
282
Options Property...................................................................................................................................
282
TraceFlags Property.........................................................................................................................................
283
Events...................................................................................................................................
283
OnSQL Event.........................................................................................................................................................
284
TDBMonitorOptions Class.........................................................................................................................................
284
Members.........................................................................................................................................
284
Properties...................................................................................................................................
285
Host Property...................................................................................................................................
286
Port Property...................................................................................................................................
286
ReconnectTimeout Property...................................................................................................................................
287
SendTimeout Property..........................................................................................................................................................
287
Types
.........................................................................................................................................................
287
TDATraceFlags Set.........................................................................................................................................................
288
TMonitorOptions Set.........................................................................................................................................................
288
TOnSQLEvent Procedure Reference..........................................................................................................................................................
289
Enum erations.........................................................................................................................................................
289
TDATraceFlag Enumeration.........................................................................................................................................................
290
TMonitorOption Enumeration

10 DBAccess................................................................................................................................... 290.......................................................................................................................................................... 294
Classes296
EDAError.........................................................................................................................................................
Class......................................................................................................................................... 296
Members......................................................................................................................................... 297
Properties© 2019 Devart

ContentsVII................................................................................................................................... 297
Component Property................................................................................................................................... 298
ErrorCode Property.........................................................................................................................................................
298
TCRDataSourceClass......................................................................................................................................... 299
Members.........................................................................................................................................................
299
TCustomConnectDialog
Class......................................................................................................................................... 299
Members......................................................................................................................................... 300
Properties................................................................................................................................... 301
CancelButton Property................................................................................................................................... 302
Caption Property
302
ConnectButton...................................................................................................................................
Property................................................................................................................................... 303
DialogClass Property................................................................................................................................... 303
LabelSet Property...................................................................................................................................
304
Passw ordLabel
Property................................................................................................................................... 304
Retries Property...................................................................................................................................
305
SavePassw ord
Property................................................................................................................................... 305
ServerLabel Property................................................................................................................................... 305
StoreLogInfo Property...................................................................................................................................
306
UsernameLabel
Property......................................................................................................................................... 306
Methods................................................................................................................................... 307
Execute Method
307
GetServerList ...................................................................................................................................
Method.........................................................................................................................................................
308
TCustomDAConnection
Class......................................................................................................................................... 308
Members......................................................................................................................................... 311
Properties
312
ConnectDialog...................................................................................................................................
Property
312
ConnectString ...................................................................................................................................
Property................................................................................................................................... 314
ConvertEOL Property................................................................................................................................... 315
InTransaction Property................................................................................................................................... 315
LoginPrompt Property................................................................................................................................... 316
Options Property................................................................................................................................... 317
Passw ord Property................................................................................................................................... 318
Pooling Property
319
PoolingOptions...................................................................................................................................
Property................................................................................................................................... 319
Server Property................................................................................................................................... 320
Username Property......................................................................................................................................... 320
Methods
322
ApplyUpdates ...................................................................................................................................
Method322
ApplyUpdates ...................................................................................................................................
Method323
ApplyUpdates ...................................................................................................................................
MethodCommit Method................................................................................................................................... 323................................................................................................................................... 324
Connect Method................................................................................................................................... 325
CreateSQL Method................................................................................................................................... 325
Disconnect Method................................................................................................................................... 326
ExecProc Method................................................................................................................................... 328
ExecProcEx Method................................................................................................................................... 329
ExecSQL Method................................................................................................................................... 330
ExecSQLEx Method...................................................................................................................................
331
GetDatabaseNames
Method...................................................................................................................................
332
GetKeyFieldNames
Method...................................................................................................................................
333
GetStoredProcNames
Method...................................................................................................................................
333
GetTableNames
Method...................................................................................................................................
334
MonitorMessage
MethodPing Method ................................................................................................................................... 335...................................................................................................................................
335
RemoveFromPool
Method© 2019 Devart

VIII

Oracle Data Access Components................................................................................................................................... 336
Rollback Method...................................................................................................................................
336
StartTransaction
Method......................................................................................................................................... 337
Events...................................................................................................................................
338
OnConnectionLost
Event
OnError Event ................................................................................................................................... 338.........................................................................................................................................................
339
TCustomDADataSet
Class......................................................................................................................................... 339
Members......................................................................................................................................... 347
Properties................................................................................................................................... 351
BaseSQL Property................................................................................................................................... 351
Conditions Property................................................................................................................................... 352
Connection Property................................................................................................................................... 352
DataTypeMap Property
Debug Property................................................................................................................................... 353................................................................................................................................... 353
DetailFields Property................................................................................................................................... 354
Disconnected Property................................................................................................................................... 354
FetchRow s Property................................................................................................................................... 355
FilterSQL Property................................................................................................................................... 355
FinalSQL Property................................................................................................................................... 356
IsQuery Property................................................................................................................................... 356
KeyFields Property................................................................................................................................... 357
MacroCount Property................................................................................................................................... 358
Macros Property................................................................................................................................... 359
MasterFields Property
359
MasterSource ...................................................................................................................................
Property................................................................................................................................... 360
Options Property................................................................................................................................... 362
ParamCheck Property................................................................................................................................... 363
ParamCount Property................................................................................................................................... 363
Params Property................................................................................................................................... 364
ReadOnly Property...................................................................................................................................
364
RefreshOptions
Property365
Row sAffected...................................................................................................................................
PropertySQL Property ................................................................................................................................... 365................................................................................................................................... 366
SQLDelete Property................................................................................................................................... 367
SQLInsert Property................................................................................................................................... 368
SQLLock Property
368
SQLRecCount ...................................................................................................................................
Property................................................................................................................................... 369
SQLRefresh Property................................................................................................................................... 370
SQLUpdate Property................................................................................................................................... 371
UniDirectional Property......................................................................................................................................... 371
Methods................................................................................................................................... 375
AddWhere Method................................................................................................................................... 376
BreakExec Method...................................................................................................................................
377
CreateBlobStream
Method................................................................................................................................... 378
DeleteWhere Method................................................................................................................................... 378
Execute Method................................................................................................................................... 378
Execute Method................................................................................................................................... 379
Execute Method................................................................................................................................... 380
Executing Method................................................................................................................................... 380
Fetched Method................................................................................................................................... 381
Fetching Method................................................................................................................................... 381
FetchingAll Method................................................................................................................................... 382
FindKey Method................................................................................................................................... 382
FindMacro Method................................................................................................................................... 383
FindNearest Method© 2019 Devart

Contents

IX................................................................................................................................... 384
FindParam Method................................................................................................................................... 384
GetDataType Method
385
GetFieldObject...................................................................................................................................
Method...................................................................................................................................
386
GetFieldPrecision
Method................................................................................................................................... 386
GetFieldScale Method...................................................................................................................................
387
GetKeyFieldNames
Method................................................................................................................................... 388
GetOrderBy Method................................................................................................................................... 388
GotoCurrent Method
Lock Method ................................................................................................................................... 389
389
MacroByName...................................................................................................................................
Method390
ParamByName...................................................................................................................................
Method................................................................................................................................... 391
Prepare Method
392
RefreshRecord...................................................................................................................................
Method................................................................................................................................... 392
RestoreSQL Method................................................................................................................................... 393
SaveSQL Method................................................................................................................................... 394
SetOrderBy Method................................................................................................................................... 394
SQLSaved Method
UnLock Method................................................................................................................................... 395......................................................................................................................................... 395
Events................................................................................................................................... 396
AfterExecute Event................................................................................................................................... 397
AfterFetch Event...................................................................................................................................
397
AfterUpdateExecute
Event................................................................................................................................... 398
BeforeFetch Event...................................................................................................................................
398
BeforeUpdateExecute
Event.........................................................................................................................................................
399
TCustomDASQLClass......................................................................................................................................... 399
Members......................................................................................................................................... 401
Properties
403
ChangeCursor...................................................................................................................................
Property................................................................................................................................... 403
Connection Property
Debug Property................................................................................................................................... 404................................................................................................................................... 404
FinalSQL Property................................................................................................................................... 405
MacroCount Property................................................................................................................................... 405
Macros Property................................................................................................................................... 406
ParamCheck Property................................................................................................................................... 406
ParamCount Property................................................................................................................................... 407
Params Property................................................................................................................................... 408
ParamValues Property(Indexer)................................................................................................................................... 408
Prepared Property
409
Row sAffected...................................................................................................................................
PropertySQL Property ................................................................................................................................... 409......................................................................................................................................... 410
Methods................................................................................................................................... 411
Execute Method................................................................................................................................... 411
Execute Method................................................................................................................................... 412
Execute Method................................................................................................................................... 412
Executing Method................................................................................................................................... 413
FindMacro Method................................................................................................................................... 414
FindParam Method
414
MacroByName...................................................................................................................................
Method415
ParamByName...................................................................................................................................
Method................................................................................................................................... 416
Prepare Method................................................................................................................................... 416
UnPrepare Method
417
WaitExecuting ...................................................................................................................................
Method......................................................................................................................................... 418
Events................................................................................................................................... 418
AfterExecute Event© 2019 Devart

X

Oracle Data Access Components.........................................................................................................................................................
419
TCustomDAUpdateSQLClass......................................................................................................................................... 419
Members......................................................................................................................................... 420
Properties................................................................................................................................... 422
DataSet Property................................................................................................................................... 422
DeleteObject Property................................................................................................................................... 423
DeleteSQL Property................................................................................................................................... 423
InsertObject Property................................................................................................................................... 424
InsertSQL Property................................................................................................................................... 424
LockObject Property................................................................................................................................... 425
LockSQL Property................................................................................................................................... 425
ModifyObject Property................................................................................................................................... 426
ModifySQL Property
426
RefreshObject...................................................................................................................................
Property................................................................................................................................... 427
RefreshSQL Property................................................................................................................................... 427
SQL Property(Indexer)......................................................................................................................................... 428
Methods
Apply Method ................................................................................................................................... 428................................................................................................................................... 429
ExecSQL Method.........................................................................................................................................................
430
TDACondition
Class......................................................................................................................................... 430
Members......................................................................................................................................... 431
Properties................................................................................................................................... 431
Enabled Property
Name Property................................................................................................................................... 431
Value Property................................................................................................................................... 432......................................................................................................................................... 432
Methods
Disable Method................................................................................................................................... 432
Enable Method................................................................................................................................... 433.........................................................................................................................................................
433
TDAConditions
Class......................................................................................................................................... 434
Members......................................................................................................................................... 435
Properties................................................................................................................................... 436
Condition Property(Indexer)................................................................................................................................... 436
Enabled Property................................................................................................................................... 436
Items Property(Indexer)
Text Property ................................................................................................................................... 437................................................................................................................................... 437
WhereSQL Property......................................................................................................................................... 437
Methods
Add Method ................................................................................................................................... 438
Add Method ................................................................................................................................... 439
Add Method ................................................................................................................................... 439
Delete Method ................................................................................................................................... 440
Disable Method................................................................................................................................... 440
Enable Method................................................................................................................................... 441
Find Method ................................................................................................................................... 441
Get Method ................................................................................................................................... 441................................................................................................................................... 442
IndexOf Method................................................................................................................................... 442
Remove Method.........................................................................................................................................................
443
TDAConnectionOptions
Class......................................................................................................................................... 443
Members......................................................................................................................................... 444
Properties...................................................................................................................................
445
Allow ImplicitConnect
Property...................................................................................................................................
445
DefaultSortType
Property...................................................................................................................................
446
DisconnectedMode
Property...................................................................................................................................
447
KeepDesignConnected
Property................................................................................................................................... 447
LocalFailover Property© 2019 Devart

Contents

XI.........................................................................................................................................................
447
TDADataSetOptions
Class......................................................................................................................................... 448
Members......................................................................................................................................... 450
Properties................................................................................................................................... 453
AutoPrepare Property...................................................................................................................................
454
CacheCalcFields
Property...................................................................................................................................
454
CompressBlobMode
Property
454
DefaultValues ...................................................................................................................................
Property................................................................................................................................... 455
DetailDelay Property................................................................................................................................... 455
FieldsOrigin Property................................................................................................................................... 456
FlatBuffers Property...................................................................................................................................
456
InsertAllSetFields
Property...................................................................................................................................
457
LocalMasterDetail
Property................................................................................................................................... 457
LongStrings Property...................................................................................................................................
458
MasterFieldsNullable
Property
458
NumberRange ...................................................................................................................................
Property...................................................................................................................................
459
QueryRecCount
Property................................................................................................................................... 459
QuoteNames Property...................................................................................................................................
460
RemoveOnRefresh
Property
460
RequiredFields...................................................................................................................................
Property
461
ReturnParams ...................................................................................................................................
Property...................................................................................................................................
461
SetFieldsReadOnly
Property................................................................................................................................... 462
StrictUpdate Property
462
TrimFixedChar ...................................................................................................................................
Property
463
UpdateAllFields...................................................................................................................................
Property...................................................................................................................................
463
UpdateBatchSize
Property.........................................................................................................................................................
464
TDAEncryption
Class......................................................................................................................................... 464
Members......................................................................................................................................... 464
Properties................................................................................................................................... 465
Encryptor Property
Fields Property................................................................................................................................... 465.........................................................................................................................................................
466
TDAMapRule
Class......................................................................................................................................... 466
Members......................................................................................................................................... 467
Properties
468
DBLengthMax ...................................................................................................................................
Property................................................................................................................................... 469
DBLengthMin Property................................................................................................................................... 469
DBScaleMax Property................................................................................................................................... 470
DBScaleMin Property................................................................................................................................... 470
DBType Property................................................................................................................................... 470
FieldLength Property................................................................................................................................... 471
FieldName Property................................................................................................................................... 471
FieldScale Property................................................................................................................................... 472
FieldType Property................................................................................................................................... 472
IgnoreErrors Property.........................................................................................................................................................
472
TDAMapRules
Class......................................................................................................................................... 473
Members......................................................................................................................................... 473
Properties...................................................................................................................................
474
IgnoreInvalidRules
Property.........................................................................................................................................................
474
TDAMetaData
Class......................................................................................................................................... 475
Members......................................................................................................................................... 479
Properties................................................................................................................................... 480
Connection Property................................................................................................................................... 480
MetaDataKind Property................................................................................................................................... 481
Restrictions Property......................................................................................................................................... 482
Methods© 2019 Devart

XII

Oracle Data Access Components...................................................................................................................................
484
GetMetaDataKinds
Method485
GetRestrictions...................................................................................................................................
Method.........................................................................................................................................................
485
TDAParamClass......................................................................................................................................... 486
Members......................................................................................................................................... 488
Properties................................................................................................................................... 489
AsBlob Property................................................................................................................................... 490
AsBlobRef Property................................................................................................................................... 490
AsFloat Property................................................................................................................................... 491
AsInteger Property................................................................................................................................... 491
AsLargeInt Property................................................................................................................................... 492
AsMemo Property................................................................................................................................... 492
AsMemoRef Property...................................................................................................................................
493
AsSQLTimeStamp
Property................................................................................................................................... 493
AsString Property................................................................................................................................... 493
AsWideString Property................................................................................................................................... 494
DataType Property
IsNull Property ................................................................................................................................... 494................................................................................................................................... 495
ParamType Property
Size Property ................................................................................................................................... 495
Value Property................................................................................................................................... 496......................................................................................................................................... 496
Methods................................................................................................................................... 497
AssignField Method...................................................................................................................................
497
AssignFieldValue
Method................................................................................................................................... 498
LoadFromFile Method...................................................................................................................................
499
LoadFromStream
Method................................................................................................................................... 499
SetBlobData Method................................................................................................................................... 500
SetBlobData Method................................................................................................................................... 500
SetBlobData Method.........................................................................................................................................................
501
TDAParams
Class......................................................................................................................................... 501
Members......................................................................................................................................... 502
Properties................................................................................................................................... 502
Items Property(Indexer)......................................................................................................................................... 503
Methods................................................................................................................................... 503
FindParam Method504
ParamByName...................................................................................................................................
Method.........................................................................................................................................................
505
TDATransaction
Class......................................................................................................................................... 505
Members......................................................................................................................................... 506
Properties
Active Property................................................................................................................................... 507...................................................................................................................................
507
DefaultCloseAction
Property......................................................................................................................................... 508
Methods
Commit Method................................................................................................................................... 508................................................................................................................................... 509
Rollback Method...................................................................................................................................
509
StartTransaction
Method......................................................................................................................................... 510
Events................................................................................................................................... 511
OnCommit Event...................................................................................................................................
511
OnCommitRetaining
Event
OnError Event ................................................................................................................................... 512................................................................................................................................... 513
OnRollback Event...................................................................................................................................
513
OnRollbackRetaining
Event......................................................................................................................................................... 514
TMacro Class......................................................................................................................................... 515
Members......................................................................................................................................... 515
Properties
Active Property................................................................................................................................... 516© 2019 Devart

Contents

XIII................................................................................................................................... 517
AsDateTime Property................................................................................................................................... 517
AsFloat Property................................................................................................................................... 517
AsInteger Property................................................................................................................................... 518
AsString Property
Name Property................................................................................................................................... 518
Value Property................................................................................................................................... 519
519
TMacros .........................................................................................................................................................
Class......................................................................................................................................... 520
Members......................................................................................................................................... 520
Properties................................................................................................................................... 521
Items Property(Indexer)......................................................................................................................................... 521
Methods
522
AssignValues ...................................................................................................................................
MethodExpand Method................................................................................................................................... 522................................................................................................................................... 523
FindMacro Method
IsEqual Method................................................................................................................................... 524
524
MacroByName...................................................................................................................................
MethodScan Method ................................................................................................................................... 525.........................................................................................................................................................
525
TPoolingOptions
Class......................................................................................................................................... 526
Members......................................................................................................................................... 526
Properties...................................................................................................................................
527
ConnectionLifetime
Property................................................................................................................................... 528
MaxPoolSize Property................................................................................................................................... 528
MinPoolSize Property................................................................................................................................... 528
Validate Property.........................................................................................................................................................
529
TSmartFetchOptions
Class......................................................................................................................................... 529
Members......................................................................................................................................... 530
Properties................................................................................................................................... 530
Enabled Property................................................................................................................................... 531
LiveBlock Property...................................................................................................................................
531
PrefetchedFields
Property...................................................................................................................................
532
SQLGetKeyValues
Property.......................................................................................................................................................... 532
Types.........................................................................................................................................................
533
TAfterExecuteEvent
Procedure Reference.........................................................................................................................................................
533
TAfterFetchEvent
Procedure Reference.........................................................................................................................................................
534
TBeforeFetchEvent
Procedure Reference.........................................................................................................................................................
534
TConnectionLostEvent
Procedure Reference.........................................................................................................................................................
535
TDAConnectionErrorEvent
Procedure Reference.........................................................................................................................................................
535
TDATransactionErrorEvent
Procedure Reference.........................................................................................................................................................
536
TRefreshOptions
Set.........................................................................................................................................................
536
TUpdateExecuteEvent
Procedure Reference.......................................................................................................................................................... 537
Enum erations.........................................................................................................................................................
537
TCheckMode
Enumeration
538
TLabelSet.........................................................................................................................................................
Enumeration.........................................................................................................................................................
539
TLockMode
Enumeration.........................................................................................................................................................
539
TRefreshOption
Enumeration.........................................................................................................................................................
540
TRetryMode
Enumeration
Variables .......................................................................................................................................................... 540.........................................................................................................................................................
541
BaseSQLOldBehavior
Variable.........................................................................................................................................................
541
ChangeCursor
Variable.........................................................................................................................................................
542
SQLGeneratorCompatibility
Variable

11 MemData................................................................................................................................... 542.......................................................................................................................................................... 544
Classes544
TAttribute.........................................................................................................................................................
Class.........................................................................................................................................
545
Members© 2019 Devart

XIV

Oracle Data Access Components......................................................................................................................................... 546
Properties................................................................................................................................... 547
AttributeNo Property................................................................................................................................... 547
DataSize Property................................................................................................................................... 548
DataType Property................................................................................................................................... 548
Length Property................................................................................................................................... 549
ObjectType Property
Offset Property................................................................................................................................... 549................................................................................................................................... 550
Ow ner Property
Scale Property................................................................................................................................... 550
Size Property ................................................................................................................................... 551......................................................................................................................................................... 551
TBlob Class......................................................................................................................................... 552
Members......................................................................................................................................... 553
Properties................................................................................................................................... 554
AsString Property................................................................................................................................... 554
AsWideString Property................................................................................................................................... 555
IsUnicode Property
Size Property ................................................................................................................................... 555......................................................................................................................................... 556
Methods
Assign Method................................................................................................................................... 557
Clear Method ................................................................................................................................... 557................................................................................................................................... 558
LoadFromFile Method...................................................................................................................................
558
LoadFromStream
MethodRead Method ................................................................................................................................... 559................................................................................................................................... 560
SaveToFile Method
560
SaveToStream...................................................................................................................................
Method................................................................................................................................... 561
Truncate Method
Write Method ................................................................................................................................... 561.........................................................................................................................................................
562
TCompressedBlob
Class......................................................................................................................................... 563
Members......................................................................................................................................... 565
Properties................................................................................................................................... 565
Compressed Property...................................................................................................................................
566
CompressedSize
Property.........................................................................................................................................................
566
TDBObjectClass......................................................................................................................................... 567
Members.........................................................................................................................................................
567
TMemData
Class......................................................................................................................................... 568
Members.........................................................................................................................................................
568
TObjectType
Class......................................................................................................................................... 569
Members......................................................................................................................................... 569
Properties
570
AttributeCount...................................................................................................................................
Property................................................................................................................................... 570
Attributes Property(Indexer)................................................................................................................................... 571
DataType Property
Size Property ................................................................................................................................... 572......................................................................................................................................... 572
Methods................................................................................................................................... 573
FindAttribute Method.........................................................................................................................................................
573
TSharedObject
Class......................................................................................................................................... 574
Members......................................................................................................................................... 575
Properties................................................................................................................................... 575
RefCount Property......................................................................................................................................... 575
Methods................................................................................................................................... 576
AddRef Method................................................................................................................................... 577
Release Method.......................................................................................................................................................... 577
Types.........................................................................................................................................................
577
TLocateExOptions
Set© 2019 Devart

Contents

XV.........................................................................................................................................................
578
TUpdateRecKinds
Set.......................................................................................................................................................... 578
Enum erations.........................................................................................................................................................
579
TCompressBlobMode
Enumeration.........................................................................................................................................................
580
TConnLostCause
Enumeration.........................................................................................................................................................
581
TDANumericType
Enumeration.........................................................................................................................................................
581
TLocateExOption
Enumeration.........................................................................................................................................................
582
TSortType
Enumeration.........................................................................................................................................................
582
TUpdateRecKind
Enumeration

12 MemDS................................................................................................................................... 583.......................................................................................................................................................... 584
Classes.........................................................................................................................................................
584
TMemDataSet
Class.........................................................................................................................................
584
Members.........................................................................................................................................
587
Properties...................................................................................................................................
588
CachedUpdates Property...................................................................................................................................
590
IndexFieldNames Property...................................................................................................................................
591
KeyExclusive Property...................................................................................................................................
591
LocalConstraints Property...................................................................................................................................
592
LocalUpdate Property...................................................................................................................................
592
Prepared Property...................................................................................................................................
593
Ranged Property...................................................................................................................................
593
UpdateRecordTypes Property...................................................................................................................................
594
UpdatesPending Property.........................................................................................................................................
594
Methods...................................................................................................................................
597
ApplyRange Method...................................................................................................................................
597
ApplyUpdates Method...................................................................................................................................
598
ApplyUpdates Method...................................................................................................................................
599
ApplyUpdates Method...................................................................................................................................
600
CancelRange Method...................................................................................................................................
600
CancelUpdates Method...................................................................................................................................
601
CommitUpdates Method...................................................................................................................................
602
DeferredPost Method...................................................................................................................................
602
EditRangeEnd Method...................................................................................................................................
603
EditRangeStart Method...................................................................................................................................
604
GetBlob Method...................................................................................................................................
604
GetBlob Method...................................................................................................................................
605
GetBlob Method...................................................................................................................................
605
Locate Method...................................................................................................................................
606
Locate Method...................................................................................................................................
606
Locate Method...................................................................................................................................
608
LocateEx Method...................................................................................................................................
608
LocateEx Method...................................................................................................................................
609
LocateEx Method...................................................................................................................................
610
Prepare Method...................................................................................................................................
610
RestoreUpdates Method...................................................................................................................................
611
RevertRecord Method...................................................................................................................................
611
SaveToXML Method...................................................................................................................................
612
SaveToXML Method...................................................................................................................................
613
SaveToXML Method...................................................................................................................................
613
SetRange Method...................................................................................................................................
614
SetRangeEnd Method...................................................................................................................................
615
SetRangeStart Method...................................................................................................................................
616
UnPrepare Method...................................................................................................................................
616
UpdateResult Method...................................................................................................................................
617
UpdateStatus Method© 2019 Devart

XVI

Oracle Data Access Components......................................................................................................................................... 618
Events618
OnUpdateError...................................................................................................................................
Event...................................................................................................................................
619
OnUpdateRecord
Event
Variables .......................................................................................................................................................... 620.........................................................................................................................................................
620
DoNotRaiseExcetionOnUaFail
Variable.........................................................................................................................................................
621
SendDataSetChangeEventAfterOpen
Variable

13 OdacVcl................................................................................................................................... 621.......................................................................................................................................................... 621
Classes.........................................................................................................................................................
622
TConnectDialog
Class.........................................................................................................................................
622
Members.........................................................................................................................................
624
Properties...................................................................................................................................
625
ReadAliases Property...................................................................................................................................
626
Session Property

14 Ora ................................................................................................................................... 626.......................................................................................................................................................... 630
Classes.........................................................................................................................................................
632
TBFileField
Class......................................................................................................................................... 633
Members......................................................................................................................................... 633
Properties
AsFile Property................................................................................................................................... 634................................................................................................................................... 635
AutoRefresh Property................................................................................................................................... 635
BlobType Property
Exists Property................................................................................................................................... 636
FileDir Property................................................................................................................................... 636................................................................................................................................... 637
FileName Property......................................................................................................................................... 637
Methods................................................................................................................................... 637
Refresh Method.........................................................................................................................................................
638
TCursorField
Class......................................................................................................................................... 639
Members......................................................................................................................................... 639
Properties................................................................................................................................... 639
AsCursor Property.........................................................................................................................................................
640
TCustomOraQueryClass......................................................................................................................................... 641
Members.........................................................................................................................................................
651
TOraChangeNotification
Class......................................................................................................................................... 652
Members......................................................................................................................................... 653
Properties
Active Property................................................................................................................................... 654................................................................................................................................... 654
Enabled Property................................................................................................................................... 654
Operations Property................................................................................................................................... 655
Persistent Property................................................................................................................................... 655
TimeOut Property......................................................................................................................................... 656
Methods...................................................................................................................................
656
RemoveRegistration
Method......................................................................................................................................... 657
Events................................................................................................................................... 657
OnChange Event.........................................................................................................................................................
658
TOraChangeNotificationOptions
Class......................................................................................................................................... 658
Members......................................................................................................................................... 659
Properties...................................................................................................................................
659
QueryResultOnly
Property.........................................................................................................................................................
659
TOraDataSet
Class......................................................................................................................................... 660
Members......................................................................................................................................... 670
Properties...................................................................................................................................
676
ChangeNotification
Property................................................................................................................................... 676
CheckMode Property© 2019 Devart

Contents

XVII...................................................................................................................................
677
CommandTimeout
Property................................................................................................................................... 677
Cursor Property................................................................................................................................... 678
DMLRefresh Property................................................................................................................................... 678
Encryption Property................................................................................................................................... 679
FetchAll Property................................................................................................................................... 679
IsPLSQL Property................................................................................................................................... 680
IsQuery Property................................................................................................................................... 680
KeyFields Property
681
KeySequence ...................................................................................................................................
Property................................................................................................................................... 682
LockMode Property................................................................................................................................... 683
NonBlocking Property................................................................................................................................... 683
Options Property................................................................................................................................... 685
OptionsDS Property................................................................................................................................... 686
Params Property................................................................................................................................... 687
RefreshMode Property
687
ReturnParams ...................................................................................................................................
Property...................................................................................................................................
688
Row sProcessed
Property...................................................................................................................................
688
SequenceMode
Property................................................................................................................................... 689
Session Property................................................................................................................................... 689
SmartFetch Property................................................................................................................................... 690
SQLType Property................................................................................................................................... 690
StrictUpdate Property................................................................................................................................... 691
UpdateObject Property......................................................................................................................................... 691
Methods
696
CreateProcCall...................................................................................................................................
Method................................................................................................................................... 697
ErrorOffset Method................................................................................................................................... 697
FindParam Method................................................................................................................................... 698
GetArray Method................................................................................................................................... 699
GetErrorPos Method
GetFile Method................................................................................................................................... 699................................................................................................................................... 700
GetInterval Method................................................................................................................................... 701
GetKeyList Method
GetLob Method................................................................................................................................... 701
702
GetLobLocator...................................................................................................................................
Method................................................................................................................................... 703
GetObject Method
GetRef Method................................................................................................................................... 704................................................................................................................................... 704
GetTable Method
705
GetTimeStamp...................................................................................................................................
Method................................................................................................................................... 706
OpenNext Method
707
ParamByName...................................................................................................................................
Method.........................................................................................................................................................
708
TOraDataSetField
Class......................................................................................................................................... 708
Members......................................................................................................................................... 708
Properties................................................................................................................................... 709
Modified Property.........................................................................................................................................................
709
TOraDataSetOptions
Class......................................................................................................................................... 710
Members......................................................................................................................................... 714
Properties................................................................................................................................... 718
AutoClose Property................................................................................................................................... 719
CacheLobs Property
719
DefaultValues ...................................................................................................................................
Property...................................................................................................................................
720
DeferredLobRead
Property................................................................................................................................... 720
EnableBCD Property
721
EnableFMTBCD...................................................................................................................................
Property...................................................................................................................................
721
ExtendedFieldsInfo
Property© 2019 Devart

XVIII

Oracle Data Access Components
721
FieldsAsString...................................................................................................................................
Property................................................................................................................................... 722
FullRefresh Property...................................................................................................................................
722
PrefetchLobSize
Property
723
PrefetchRow s...................................................................................................................................
Property...................................................................................................................................
723
PrepareUpdateSQL
Property...................................................................................................................................
724
ProcNamedParams
Property................................................................................................................................... 724
Raw AsString Property...................................................................................................................................
725
ReflectChangeNotify
Property...................................................................................................................................
725
ScrollableCursor
Property...................................................................................................................................
726
StatementCache
Property...................................................................................................................................
726
TemporaryLobUpdate
Property.........................................................................................................................................................
727
TOraDataSetOptionsDS
Class......................................................................................................................................... 727
Members......................................................................................................................................... 730
Properties................................................................................................................................... 734
AutoClose Property................................................................................................................................... 734
CacheLobs Property
735
DefaultValues ...................................................................................................................................
Property...................................................................................................................................
735
DeferredLobRead
Property
736
FieldsAsString...................................................................................................................................
Property................................................................................................................................... 736
HideRow Id Property
736
KeepPrepared...................................................................................................................................
Property................................................................................................................................... 737
Raw AsString Property...................................................................................................................................
737
ScrollableCursor
Property.........................................................................................................................................................
738
TOraDataSourceClass......................................................................................................................................... 739
Members.........................................................................................................................................................
739
TOraEncryptor
Class......................................................................................................................................... 739
Members.........................................................................................................................................................
740
TOraIntervalField
Class......................................................................................................................................... 740
Members......................................................................................................................................... 741
Properties................................................................................................................................... 742
AsInterval Property................................................................................................................................... 742
FracPrecision Property
743
LeadPrecision ...................................................................................................................................
Property.........................................................................................................................................................
743
TOraMetaData
Class......................................................................................................................................... 744
Members.........................................................................................................................................................
748
TOraNestedTable
Class......................................................................................................................................... 748
Members......................................................................................................................................... 751
Properties
Ref Property ................................................................................................................................... 753
Table Property................................................................................................................................... 753.........................................................................................................................................................
754
TOraNumberField
Class......................................................................................................................................... 754
Members......................................................................................................................................... 755
Properties................................................................................................................................... 755
AsNumber Property.........................................................................................................................................................
756
TOraParam
Class......................................................................................................................................... 756
Members......................................................................................................................................... 760
Properties................................................................................................................................... 764
AsArray Property................................................................................................................................... 764
AsBFile Property...................................................................................................................................
765
AsBLOBLocator
Property...................................................................................................................................
765
AsCLOBLocator
Property................................................................................................................................... 766
AsCursor Property................................................................................................................................... 766
AsInterval Property................................................................................................................................... 767
AsNumber Property© 2019 Devart

Contents

XIX................................................................................................................................... 767
AsObject Property................................................................................................................................... 768
AsOraBlob Property................................................................................................................................... 768
AsOraClob Property
AsRef Property................................................................................................................................... 769................................................................................................................................... 769
AsTable Property................................................................................................................................... 770
AsTimeStamp Property................................................................................................................................... 770
AsXML Property...................................................................................................................................
771
ItemAsDateTime
Property(Indexer)................................................................................................................................... 771
ItemAsFloat Property(Indexer)................................................................................................................................... 772
ItemAsInteger Property(Indexer)
772
ItemAsInterval ...................................................................................................................................
Property(Indexer)................................................................................................................................... 773
ItemAsString Property(Indexer)...................................................................................................................................
774
ItemAsTimeStamp
Property(Indexer)................................................................................................................................... 774
ItemIsNull Property(Indexer)................................................................................................................................... 775
ItemText Property(Indexer)................................................................................................................................... 775
ItemValue Property(Indexer)................................................................................................................................... 776
Length Property................................................................................................................................... 777
National Property
Table Property................................................................................................................................... 777......................................................................................................................................... 778
Methods................................................................................................................................... 778
ItemClear Method................................................................................................................................... 779
SetBlobData Method.........................................................................................................................................................
779
TOraParams
Class......................................................................................................................................... 780
Members......................................................................................................................................... 781
Properties................................................................................................................................... 781
Items Property(Indexer).........................................................................................................................................................
782
TOraPoolingOptions
Class......................................................................................................................................... 782
Members......................................................................................................................................... 783
Properties................................................................................................................................... 784
PoolType Property...................................................................................................................................
784
ProxyPassw ord
Property...................................................................................................................................
785
ProxyUsername
Property.........................................................................................................................................................
785
TOraQueryClass......................................................................................................................................... 786
Members......................................................................................................................................... 797
Properties................................................................................................................................... 802
FetchAll Property................................................................................................................................... 803
LockMode Property
803
UpdatingTable ...................................................................................................................................
Property.........................................................................................................................................................
804
TOraReferenceField
Class......................................................................................................................................... 804
Members......................................................................................................................................... 805
Properties................................................................................................................................... 805
Modified Property.........................................................................................................................................................
806
TOraSession
Class......................................................................................................................................... 806
Members......................................................................................................................................... 811
Properties................................................................................................................................... 813
AutoCommit Property................................................................................................................................... 814
Connected Property................................................................................................................................... 815
ConnectMode Property
816
ConnectPrompt...................................................................................................................................
Property
Debug Property................................................................................................................................... 816
Home Property................................................................................................................................... 817................................................................................................................................... 817
HomeName Property................................................................................................................................... 818
InternalName Property................................................................................................................................... 819
LastError Property© 2019 Devart

XX

Oracle Data Access Components
LDA Property ................................................................................................................................... 819................................................................................................................................... 820
OCICallStyle Property................................................................................................................................... 820
OCISvcCtx Property................................................................................................................................... 821
Options Property
823
OracleVersion...................................................................................................................................
Property................................................................................................................................... 823
Passw ord Property
824
PoolingOptions...................................................................................................................................
Property
824
ProxySession ...................................................................................................................................
Property................................................................................................................................... 825
Schema Property................................................................................................................................... 826
Server Property
SQL Property ................................................................................................................................... 827................................................................................................................................... 827
ThreadSafety Property................................................................................................................................... 828
Username Property......................................................................................................................................... 828
Methods
830
AssignConnect...................................................................................................................................
Method................................................................................................................................... 831
AssignLDA Method
832
AssignSvcCtx ...................................................................................................................................
Method832
AssignSvcCtx ...................................................................................................................................
Method832
AssignSvcCtx ...................................................................................................................................
Method833
ChangePassw...................................................................................................................................
ord Method...................................................................................................................................
834
GetSequenceNames
Method834
ParamByName...................................................................................................................................
Method...................................................................................................................................
835
RollbackToSavepoint
Method................................................................................................................................... 836
Savepoint Method...................................................................................................................................
836
StartTransaction
Method...................................................................................................................................
837
StartTransaction
Method...................................................................................................................................
837
StartTransaction
Method......................................................................................................................................... 838
Events...................................................................................................................................
839
OnConnectChange
Event................................................................................................................................... 840
OnFailover Event...................................................................................................................................
840
OnInfoMessage
Event.........................................................................................................................................................
840
TOraSessionOptions
Class......................................................................................................................................... 841
Members......................................................................................................................................... 843
Properties................................................................................................................................... 846
CharLength Property................................................................................................................................... 846
Charset Property
847
ClientIdentifier ...................................................................................................................................
Property...................................................................................................................................
847
ConnectionTimeout
Property................................................................................................................................... 848
ConvertEOL Property................................................................................................................................... 848
DateFormat Property
849
DateLanguage...................................................................................................................................
Property
Direct Property................................................................................................................................... 849................................................................................................................................... 850
EnableBCD Property
850
EnableFMTBCD...................................................................................................................................
Property
850
EnableIntegers...................................................................................................................................
Property
851
EnableLargeint...................................................................................................................................
Property
851
EnableNumbers...................................................................................................................................
Property...................................................................................................................................
852
EnableOraTimestamp
Property................................................................................................................................... 852
IPVersion Property
853
OptimizerMode...................................................................................................................................
Property...................................................................................................................................
853
StatementCache
Property...................................................................................................................................
854
StatementCacheSize
Property...................................................................................................................................
854
SubscriptionPort
Property...................................................................................................................................
855
UnicodeEnvironment
Property© 2019 Devart

Contents

XXI................................................................................................................................... 855
UseOCI7 Property................................................................................................................................... 855
UseUnicode Property
856
TOraSQL.........................................................................................................................................................
Class......................................................................................................................................... 857
Members......................................................................................................................................... 859
Properties................................................................................................................................... 862
ArrayLength Property...................................................................................................................................
862
CommandTimeout
Property................................................................................................................................... 863
NonBlocking Property................................................................................................................................... 863
Params Property...................................................................................................................................
864
Row sProcessed
Property................................................................................................................................... 864
Session Property................................................................................................................................... 865
SQLType Property...................................................................................................................................
865
StatementCache
Property...................................................................................................................................
866
TemporaryLobUpdate
Property......................................................................................................................................... 866
Methods
867
CreateProcCall...................................................................................................................................
Method................................................................................................................................... 868
ErrorOffset Method................................................................................................................................... 869
FindParam Method
869
ParamByName...................................................................................................................................
Method.........................................................................................................................................................
870
TOraStoredProc
Class......................................................................................................................................... 871
Members......................................................................................................................................... 881
Properties................................................................................................................................... 887
LockMode Property................................................................................................................................... 887
Overload Property...................................................................................................................................
888
StoredProcName
Property......................................................................................................................................... 888
Methods................................................................................................................................... 893
ExecProc Method................................................................................................................................... 894
PrepareSQL Method.........................................................................................................................................................
894
TOraTimeStampField
Class......................................................................................................................................... 895
Members......................................................................................................................................... 895
Properties................................................................................................................................... 896
AsTimeStamp Property................................................................................................................................... 896
Format Property.........................................................................................................................................................
897
TOraTraceClass......................................................................................................................................... 897
Members......................................................................................................................................... 899
Properties................................................................................................................................... 900
Enabled Property...................................................................................................................................
900
MaxTraceFileSize
Property...................................................................................................................................
901
PlSqlTraceMode
Property................................................................................................................................... 901
Session Property
901
SqlTraceMode...................................................................................................................................
Property
State Property ................................................................................................................................... 902...................................................................................................................................
902
TraceFileIdentifier
Property......................................................................................................................................... 903
Methods
904
GetSessionPID...................................................................................................................................
Method...................................................................................................................................
904
GetTraceFileName
Method...................................................................................................................................
905
PlSqlTraceComment
Method905
PlSqlTraceLimit...................................................................................................................................
Method...................................................................................................................................
906
PlSqlTracePause
Method...................................................................................................................................
906
PlSqlTraceResume
Method...................................................................................................................................
907
PlSqlTraceRunNumber
Method907
PlSqlTraceStart...................................................................................................................................
Method908
PlSqlTraceStop...................................................................................................................................
Method................................................................................................................................... 909
SqlTraceStart Method© 2019 Devart

XXII

Oracle Data Access Components................................................................................................................................... 909
SqlTraceStop Method.........................................................................................................................................................
910
TOraUpdateSQLClass......................................................................................................................................... 910
Members.........................................................................................................................................................
912
TOraXMLField
Class......................................................................................................................................... 912
Members......................................................................................................................................... 912
Properties................................................................................................................................... 913
AsXML Property.......................................................................................................................................................... 913
Types.........................................................................................................................................................
914
TConnectChangeEvent
Procedure Reference.........................................................................................................................................................
914
TFailoverEvent
Procedure Reference.........................................................................................................................................................
915
TOraChangeNotificationEvent
Procedure Reference.........................................................................................................................................................
916
TPlSqlTraceMode
Set.........................................................................................................................................................
916
TSqlTraceMode
Set.......................................................................................................................................................... 916
Enum erations.........................................................................................................................................................
917
TFailoverState
Enumeration.........................................................................................................................................................
917
TFailoverType
Enumeration.........................................................................................................................................................
918
TOraIsolationLevel
Enumeration.........................................................................................................................................................
919
TRefreshMode
Enumeration.........................................................................................................................................................
919
TSequenceMode
Enumeration
Variables .......................................................................................................................................................... 920.........................................................................................................................................................
920
DefSession
Variable.........................................................................................................................................................
921
OraQueryCompatibilityMode
Variable
921
Sessions.........................................................................................................................................................
Variable.........................................................................................................................................................
921
UseDefSession
Variable

15 OraAlerter................................................................................................................................... 922.......................................................................................................................................................... 923
Classes.........................................................................................................................................................
923
TOraAlerterClass.........................................................................................................................................
924
Members.........................................................................................................................................
926
Properties...................................................................................................................................
927
AutoCommit Property...................................................................................................................................
927
Events Property...................................................................................................................................
928
EventType Property...................................................................................................................................
928
Interval Property...................................................................................................................................
929
Session Property...................................................................................................................................
929
TimeOut Property.........................................................................................................................................
930
Methods...................................................................................................................................
931
GetMessage Method...................................................................................................................................
931
GetMessage Method...................................................................................................................................
932
GetMessage Method...................................................................................................................................
932
NextItemType Method...................................................................................................................................
933
NextMessageType Method...................................................................................................................................
933
PackMessage Method...................................................................................................................................
934
PurgePipe Method...................................................................................................................................
934
PutMessage Method...................................................................................................................................
935
SendMessage Method...................................................................................................................................
936
SendPipeMessage Method...................................................................................................................................
936
UnpackMessage Method...................................................................................................................................
937
UnpackMessage Method...................................................................................................................................
937
UnpackMessage Method.........................................................................................................................................
938
Events...................................................................................................................................
938
OnEvent Event...................................................................................................................................
939
OnTimeOut Event..........................................................................................................................................................
939
Types
.........................................................................................................................................................
940
TOnEventEvent Procedure Reference© 2019 Devart

Contents

XXIII.........................................................................................................................................................
940
TOnTimeOutEvent
Procedure Reference.......................................................................................................................................................... 941
Enum erations.........................................................................................................................................................
941
TEventType
Enumeration

16 OraAQ................................................................................................................................... 941.......................................................................................................................................................... 943
Classes.........................................................................................................................................................
944
TDequeueOptions
Class.........................................................................................................................................
945
Members.........................................................................................................................................
946
Properties...................................................................................................................................
947
ConsumerName Property...................................................................................................................................
947
Correlation Property...................................................................................................................................
948
DeliveryMode Property...................................................................................................................................
948
DequeueCondition Property...................................................................................................................................
949
DequeueMode Property...................................................................................................................................
949
MessageId Property...................................................................................................................................
950
Navigation Property...................................................................................................................................
950
Transformation Property...................................................................................................................................
950
Visibility Property...................................................................................................................................
951
WaitTimeout Property.........................................................................................................................................................
951
TEnqueueOptions Class.........................................................................................................................................
952
Members.........................................................................................................................................
953
Properties...................................................................................................................................
954
DeliveryMode Property...................................................................................................................................
954
RelativeMessageId Property...................................................................................................................................
955
SequenceDeviation Property...................................................................................................................................
955
Transformation Property...................................................................................................................................
956
Visibility Property.........................................................................................................................................................
956
TOraQueue Class.........................................................................................................................................
957
Members.........................................................................................................................................
958
Properties...................................................................................................................................
959
AsyncNotification Property...................................................................................................................................
960
DequeueOptions Property...................................................................................................................................
960
EnqueueMessageProperties Property...................................................................................................................................
961
EnqueueOptions Property...................................................................................................................................
961
PayloadArrayTypeName Property...................................................................................................................................
962
PayloadTypeName Property...................................................................................................................................
962
QueueName Property...................................................................................................................................
963
Session Property.........................................................................................................................................
963
Methods...................................................................................................................................
964
Dequeue Method...................................................................................................................................
964
Dequeue Method...................................................................................................................................
965
Dequeue Method...................................................................................................................................
966
Dequeue Method...................................................................................................................................
966
Dequeue Method...................................................................................................................................
967
DequeueArray Method...................................................................................................................................
968
Enqueue Method...................................................................................................................................
969
Enqueue Method...................................................................................................................................
970
Enqueue Method...................................................................................................................................
970
Enqueue Method...................................................................................................................................
971
Enqueue Method...................................................................................................................................
971
EnqueueArray Method...................................................................................................................................
972
Listen Method...................................................................................................................................
973
Listen Method...................................................................................................................................
974
Listen Method.........................................................................................................................................
974
Events© 2019 Devart

XXIV

Oracle Data Access Components................................................................................................................................... 975
OnMessage Event.........................................................................................................................................................
975
TOraQueueAdmin
Class......................................................................................................................................... 976
Members......................................................................................................................................... 979
Properties................................................................................................................................... 980
Comment Property................................................................................................................................... 980
MaxRetries Property...................................................................................................................................
981
MultipleConsumers
Property................................................................................................................................... 981
QueueName Property...................................................................................................................................
981
QueueTableName
Property................................................................................................................................... 982
QueueType Property
982
RetentionTime ...................................................................................................................................
Property................................................................................................................................... 983
RetryDelay Property................................................................................................................................... 983
Session Property......................................................................................................................................... 984
Methods
986
AddSubscriber...................................................................................................................................
Method987
AlterComment ...................................................................................................................................
Method...................................................................................................................................
987
AlterMaxRetries
Method...................................................................................................................................
988
AlterPropagationSchedule
Method................................................................................................................................... 989
AlterQueue Method...................................................................................................................................
990
AlterRetentionTime
Method...................................................................................................................................
990
AlterRetryDelay
Method...................................................................................................................................
991
AlterSubscriber
Method................................................................................................................................... 992
CreateQueue Method...................................................................................................................................
993
DisablePropagationSchedule
Method................................................................................................................................... 993
DropQueue Method...................................................................................................................................
994
EnablePropagationSchedule
Method...................................................................................................................................
995
GetSubscribers
Method...................................................................................................................................
995
GrantQueuePrivilege
Method...................................................................................................................................
996
ReadQueueProperties
Method...................................................................................................................................
997
RemoveSubscriber
Method...................................................................................................................................
997
RevokeQueuePrivilege
Method...................................................................................................................................
998
SchedulePropagation
Method................................................................................................................................... 999
StartDequeue Method
1000
StartEnqueue...................................................................................................................................
Method................................................................................................................................... 1000
StartQueue Method
1001
StopDequeue...................................................................................................................................
Method1001
StopEnqueue...................................................................................................................................
Method................................................................................................................................... 1002
StopQueue Method...................................................................................................................................
1003
UnschedulePropagation
Method...................................................................................................................................
1004
VerifyQueueTypes
Method.........................................................................................................................................................
1004
TOraQueueTable
Class......................................................................................................................................... 1005
Members......................................................................................................................................... 1007
Properties................................................................................................................................... 1008
Comment Property................................................................................................................................... 1008
Compatible Property...................................................................................................................................
1009
MessageGrouping
Property...................................................................................................................................
1009
MultipleConsumers
Property...................................................................................................................................
1010
PayloadTypeName
Property...................................................................................................................................
1011
PrimaryInstance
Property...................................................................................................................................
1011
QueueTableName
Property...................................................................................................................................
1012
SecondaryInstance
Property................................................................................................................................... 1012
Secure Property................................................................................................................................... 1013
Session Property................................................................................................................................... 1013
SortList Property© 2019 Devart

Contents

XXV...................................................................................................................................
1014
StorageClause
Property......................................................................................................................................... 1014
Methods
1015
AlterComment...................................................................................................................................
Method...................................................................................................................................
1016
AlterPrimaryInstance
Method...................................................................................................................................
1016
AlterQueueTable
Method...................................................................................................................................
1017
AlterSecondaryInstance
Method...................................................................................................................................
1018
CreateQueueTable
Method...................................................................................................................................
1019
DropQueueTable
Method...................................................................................................................................
1019
GrantSystemPrivilege
Method...................................................................................................................................
1020
MigrateQueueTable
Method...................................................................................................................................
1021
PurgeQueueTable
Method...................................................................................................................................
1021
ReadQueueTableProperties
Method...................................................................................................................................
1022
RevokeSystemPrivilege
Method.........................................................................................................................................................
1023
TQueueAgentClass......................................................................................................................................... 1023
Members......................................................................................................................................... 1024
Properties................................................................................................................................... 1024
Address Property................................................................................................................................... 1025
Name Property................................................................................................................................... 1025
Protocol Property.........................................................................................................................................................
1026
TQueueAgentsClass......................................................................................................................................... 1026
Members......................................................................................................................................... 1027
Properties................................................................................................................................... 1027
Items Property(Indexer)......................................................................................................................................... 1028
Methods
Add Method ................................................................................................................................... 1028
Insert Method................................................................................................................................... 1029.........................................................................................................................................................
1029
TQueueMessage
Class......................................................................................................................................... 1030
Members......................................................................................................................................... 1031
Properties................................................................................................................................... 1031
MessageId Property...................................................................................................................................
1032
MessageProperties
Property
1032
Raw Payload ...................................................................................................................................
Property1033
StringPayload...................................................................................................................................
Property.........................................................................................................................................................
1033
TQueueMessageProperties
Class......................................................................................................................................... 1034
Members......................................................................................................................................... 1035
Properties................................................................................................................................... 1036
Attempts Property................................................................................................................................... 1037
Correlation Property................................................................................................................................... 1037
Delay Property
1037
DeliveryMode...................................................................................................................................
Property
1038
EnqueueTime...................................................................................................................................
Property...................................................................................................................................
1038
ExceptionQueue
Property................................................................................................................................... 1039
Expiration Property...................................................................................................................................
1039
OriginalMessageId
Property................................................................................................................................... 1040
Priority Property
1040
RecipientList ...................................................................................................................................
Property................................................................................................................................... 1041
SenderId Property
State Property................................................................................................................................... 1041...................................................................................................................................
1042
TransactionGroup
Property.......................................................................................................................................................... 1042
Types.........................................................................................................................................................
1042
TQueueMessageEvent
Procedure Reference.......................................................................................................................................................... 1043
Enum erations.........................................................................................................................................................
1044
TDequeueMode
Enumeration.........................................................................................................................................................
1044
TQueueDeliveryMode
Enumeration© 2019 Devart

XXVI

Oracle Data Access Components.........................................................................................................................................................
1045
TQueueMessageGrouping
Enumeration.........................................................................................................................................................
1045
TQueueMessageState
Enumeration.........................................................................................................................................................
1046
TQueueNavigation
Enumeration.........................................................................................................................................................
1047
TQueueSequenceDeviation
Enumeration.........................................................................................................................................................
1047
TQueueSortList
Enumeration.........................................................................................................................................................
1048
TQueueType
Enumeration.........................................................................................................................................................
1048
TQueueVisibility
Enumeration

17 OraCall................................................................................................................................... 1049
Classes .......................................................................................................................................................... 1049.........................................................................................................................................................
1049
TOracleHome
Class.........................................................................................................................................
1050
Members.........................................................................................................................................
1051
Properties...................................................................................................................................
1052
Name Property...................................................................................................................................
1052
OCICallStyle Property...................................................................................................................................
1052
OCIClientDLL Property...................................................................................................................................
1053
OCIDLL Property...................................................................................................................................
1053
OCIVersion Property...................................................................................................................................
1053
OCIVersionSt Property...................................................................................................................................
1054
Path Property...................................................................................................................................
1054
PossibleOCICallStyles Property...................................................................................................................................
1054
TNSPath Property

18 OraClasses................................................................................................................................... 1055
Classes .......................................................................................................................................................... 1056.........................................................................................................................................................
1057
TNotifyTableChanges
Class......................................................................................................................................... 1057
Members......................................................................................................................................... 1058
Properties................................................................................................................................... 1058
Changes Property(Indexer).........................................................................................................................................................
1058
TOraCursor
Class......................................................................................................................................... 1059
Members......................................................................................................................................... 1060
Properties
CDA Property................................................................................................................................... 1061................................................................................................................................... 1061
OCICallStyle Property................................................................................................................................... 1062
OCIStmt Property
State Property................................................................................................................................... 1062......................................................................................................................................... 1062
Methods................................................................................................................................... 1063
AllocCursor Method................................................................................................................................... 1064
CanFetch Method................................................................................................................................... 1064
FreeCursor Method
1065
TOraFile.........................................................................................................................................................
Class......................................................................................................................................... 1066
Members......................................................................................................................................... 1068
Properties................................................................................................................................... 1069
FileDir Property................................................................................................................................... 1070
FileName Property......................................................................................................................................... 1070
Methods
Close Method................................................................................................................................... 1072
Exists Method................................................................................................................................... 1073................................................................................................................................... 1073
IsOpen Method
Open Method................................................................................................................................... 1074................................................................................................................................... 1074
Refresh Method.........................................................................................................................................................
1075
TOraIntervalClass......................................................................................................................................... 1075
Members......................................................................................................................................... 1077
Properties................................................................................................................................... 1077
AsString Property© 2019 Devart

Contents

XXVII...................................................................................................................................
1078
DescriptorType
Property
1079
FracPrecision...................................................................................................................................
Property
IsNull Property................................................................................................................................... 1079
1080
LeadPrecision...................................................................................................................................
Property................................................................................................................................... 1080
OCIInterval Property
1081
OCIIntervalPtr...................................................................................................................................
Property......................................................................................................................................... 1081
Methods................................................................................................................................... 1082
AllocInterval Method................................................................................................................................... 1083
Compare Method................................................................................................................................... 1083
FreeInterval Method...................................................................................................................................
1084
GetDaySecond
Method...................................................................................................................................
1085
GetYearMonth
Method...................................................................................................................................
1085
SetDaySecond
Method...................................................................................................................................
1086
SetYearMonth
Method1087
TOraLob.........................................................................................................................................................
Class......................................................................................................................................... 1087
Members......................................................................................................................................... 1089
Properties................................................................................................................................... 1090
Cached Property...................................................................................................................................
1091
OCILobLocator
Property...................................................................................................................................
1091
OCILobLocatorPtr
Property................................................................................................................................... 1092
OCISvcCtx Property......................................................................................................................................... 1092
Methods................................................................................................................................... 1094
AllocLob Method...................................................................................................................................
1094
CreateTemporary
Method...................................................................................................................................
1095
DisableBuffering
Method...................................................................................................................................
1095
EnableBuffering
Method................................................................................................................................... 1096
FreeLob Method...................................................................................................................................
1096
FreeTemporary
MethodInit Method ................................................................................................................................... 1097
IsInit Method ................................................................................................................................... 1097................................................................................................................................... 1097
IsTemporary Method................................................................................................................................... 1098
LengthLob Method................................................................................................................................... 1098
ReadLob Method................................................................................................................................... 1099
WriteLob Method.........................................................................................................................................................
1099
TOraNumberClass......................................................................................................................................... 1100
Members......................................................................................................................................... 1101
Properties................................................................................................................................... 1102
AsFloat Property................................................................................................................................... 1102
AsInteger Property................................................................................................................................... 1103
AsLargeInt Property................................................................................................................................... 1103
AsString Property
IsNull Property................................................................................................................................... 1104................................................................................................................................... 1104
OCINumber Property
1104
OCINumberPtr...................................................................................................................................
Property......................................................................................................................................... 1105
Methods................................................................................................................................... 1106
AssignTo Method................................................................................................................................... 1106
Compare Method.........................................................................................................................................................
1107
TOraTimeStamp
Class......................................................................................................................................... 1107
Members......................................................................................................................................... 1109
Properties................................................................................................................................... 1110
AsDateTime Property................................................................................................................................... 1111
AsString Property...................................................................................................................................
1111
DescriptorType
Property................................................................................................................................... 1112
Format Property© 2019 Devart

XXVIII

Oracle Data Access Components
IsNull Property................................................................................................................................... 1112
1113
OCIDateTime ...................................................................................................................................
Property...................................................................................................................................
1113
OCIDateTimePtr
Property................................................................................................................................... 1114
Precision Property................................................................................................................................... 1114
TimeZone Property......................................................................................................................................... 1115
Methods
1116
AllocDateTime...................................................................................................................................
Method................................................................................................................................... 1116
Compare Method................................................................................................................................... 1117
Construct Method................................................................................................................................... 1118
GetDate Method................................................................................................................................... 1119
GetTime Method...................................................................................................................................
1119
GetTimeZoneOffset
Method................................................................................................................................... 1120
SetDate Method................................................................................................................................... 1121
SetTime Method...................................................................................................................................
1122
SetTimeZoneOffset
Method.......................................................................................................................................................... 1122
Enum erations.........................................................................................................................................................
1123
TChangeNotifyEventType
Enumeration.........................................................................................................................................................
1123
TConnectMode
Enumeration.........................................................................................................................................................
1124
TMessageType
Enumeration.........................................................................................................................................................
1124
TOptimizerMode
Enumeration
Variables .......................................................................................................................................................... 1126.........................................................................................................................................................
1126
FloatPrecision
Variable.........................................................................................................................................................
1127
IntegerPrecision
Variable.........................................................................................................................................................
1127
LargeIntPrecision
Variable

19 OraConnectionPool................................................................................................................................... 1128.......................................................................................................................................................... 1128
Enum erations.........................................................................................................................................................
1128
TOraPoolingType
Enumeration

20 OraErrHand................................................................................................................................... 1129
Classes .......................................................................................................................................................... 1129.........................................................................................................................................................
1130
TOraErrorHandler
Class......................................................................................................................................... 1130
Members......................................................................................................................................... 1131
Properties................................................................................................................................... 1132
Active Property................................................................................................................................... 1132
Debug Property................................................................................................................................... 1133
Session Property................................................................................................................................... 1133
TableName Property......................................................................................................................................... 1134
Methods
Close Method................................................................................................................................... 1134
Open Method................................................................................................................................... 1135......................................................................................................................................... 1135
EventsOnError Event................................................................................................................................... 1136.......................................................................................................................................................... 1136
Types.........................................................................................................................................................
1137
TOnOraErrorEvent
Procedure Reference

21 OraError................................................................................................................................... 1137
Classes .......................................................................................................................................................... 1138.........................................................................................................................................................
1138
EOraErrorClass......................................................................................................................................... 1139
Members......................................................................................................................................... 1139
Properties................................................................................................................................... 1140
Sender Property

22 OraLoader................................................................................................................................... 1140
Classes .......................................................................................................................................................... 1141.........................................................................................................................................................
1141
TDPColumnClass......................................................................................................................................... 1142
Members© 2019 Devart

Contents

XXIX......................................................................................................................................... 1143
Properties................................................................................................................................... 1143
DateFormat Property................................................................................................................................... 1144
Precision Property................................................................................................................................... 1144
Scale Property
Size Property................................................................................................................................... 1145.........................................................................................................................................................
1145
TOraLoader
Class......................................................................................................................................... 1146
Members......................................................................................................................................... 1148
Properties................................................................................................................................... 1149
LoadMode Property................................................................................................................................... 1149
Session Property......................................................................................................................................... 1150
EventsOnError Event................................................................................................................................... 1150...................................................................................................................................
1151
OnGetColumnData
Event................................................................................................................................... 1152
OnPutData Event.......................................................................................................................................................... 1152
Types.........................................................................................................................................................
1153
TDPErrorEvent
Procedure Reference.........................................................................................................................................................
1153
TDPGetColumnDataEvent
Procedure Reference.........................................................................................................................................................
1154
TDPPutDataEvent
Procedure Reference.......................................................................................................................................................... 1154
Enum erations.........................................................................................................................................................
1155
TDPErrorAction
Enumeration.........................................................................................................................................................
1155
TLoadMode
Enumeration

23 OraNet................................................................................................................................... 1156.......................................................................................................................................................... 1157
Enum erations.........................................................................................................................................................
1157
TSecurityLevel
Enumeration..........................................................................................................................................................
1158
Variables.........................................................................................................................................................
1158
DataIntegrityLevel Variable.........................................................................................................................................................
1159
EncryptionLevel Variable.........................................................................................................................................................
1159
PacketSize Variable

24 OraObjects................................................................................................................................... 1160
Classes .......................................................................................................................................................... 1160.........................................................................................................................................................
1161
TOraArray
Class......................................................................................................................................... 1162
Members......................................................................................................................................... 1165
Properties...................................................................................................................................
1168
ItemAsDateTime
Property(Indexer)................................................................................................................................... 1168
ItemAsFloat Property(Indexer)
1169
ItemAsInteger...................................................................................................................................
Property(Indexer)
1169
ItemAsObject...................................................................................................................................
Property(Indexer)...................................................................................................................................
1170
ItemAsOCIString
Property(Indexer)
1170
ItemAsString ...................................................................................................................................
Property(Indexer)................................................................................................................................... 1171
ItemExists Property(Indexer)................................................................................................................................... 1172
ItemIsNull Property(Indexer)................................................................................................................................... 1172
ItemType Property................................................................................................................................... 1172
MaxSize Property
Size Property................................................................................................................................... 1173......................................................................................................................................... 1173
Methods................................................................................................................................... 1175
AppendItem Method
Clear Method................................................................................................................................... 1175................................................................................................................................... 1176
InsertItem Method.........................................................................................................................................................
1176
TOraNestTable
Class......................................................................................................................................... 1177
Members......................................................................................................................................... 1181
Methods................................................................................................................................... 1182
DeleteItem Method.........................................................................................................................................................
1182
TOraObject
Class© 2019 Devart

XXX

Oracle Data Access Components......................................................................................................................................... 1184
Members......................................................................................................................................... 1186
Properties................................................................................................................................... 1188
AttrAsArray Property(Indexer)...................................................................................................................................
1188
AttrAsDateTime
Property(Indexer)................................................................................................................................... 1189
AttrAsFloat Property(Indexer)
1189
AttrAsInteger...................................................................................................................................
Property(Indexer)................................................................................................................................... 1190
AttrAsLob Property(Indexer)
1190
AttrAsObject...................................................................................................................................
Property(Indexer)...................................................................................................................................
1191
AttrAsOCIDate
Property(Indexer)...................................................................................................................................
1192
AttrAsOCINumber
Property(Indexer)...................................................................................................................................
1192
AttrAsOCIString
Property(Indexer)................................................................................................................................... 1193
AttrAsString Property(Indexer)................................................................................................................................... 1193
AttrIsNull Property(Indexer)................................................................................................................................... 1194
Indicator Property................................................................................................................................... 1194
Instance Property
IsNull Property................................................................................................................................... 1195................................................................................................................................... 1195
ObjectType Property................................................................................................................................... 1196
OCISvcCtx Property......................................................................................................................................... 1196
Methods................................................................................................................................... 1197
AllocObject Method................................................................................................................................... 1198
AllocObject Method................................................................................................................................... 1198
AllocObject Method................................................................................................................................... 1198
AllocObject Method................................................................................................................................... 1199
AllocObject Method................................................................................................................................... 1199
Assign Method
1199
CreateObject...................................................................................................................................
MethodExists Method................................................................................................................................... 1200
Flush Method................................................................................................................................... 1200................................................................................................................................... 1201
FreeObject Method
IsDirty Method................................................................................................................................... 1201................................................................................................................................... 1202
IsLocked Method
Lock Method ................................................................................................................................... 1202................................................................................................................................... 1203
MarkDelete Method................................................................................................................................... 1203
MarkUpdate Method................................................................................................................................... 1204
Refresh Method................................................................................................................................... 1204
Unmark Method
1204
TOraRef.........................................................................................................................................................
Class......................................................................................................................................... 1205
Members......................................................................................................................................... 1208
Properties................................................................................................................................... 1210
AsHex Property................................................................................................................................... 1211
OCIRef Property................................................................................................................................... 1211
OCIRefPtr Property......................................................................................................................................... 1212
Methods
Clear Method................................................................................................................................... 1213
Pin Method ................................................................................................................................... 1213................................................................................................................................... 1214
RefIsNull Method
Unpin Method................................................................................................................................... 1215.........................................................................................................................................................
1215
TOraTypeClass......................................................................................................................................... 1216
Members......................................................................................................................................... 1217
Properties................................................................................................................................... 1218
DataSize Property
1218
IndicatorSize ...................................................................................................................................
Property
TDO Property................................................................................................................................... 1219.........................................................................................................................................................
1219
TOraXML
Class© 2019 Devart

Contents

XXXI......................................................................................................................................... 1220
Members......................................................................................................................................... 1223
Properties................................................................................................................................... 1225
AsString Property......................................................................................................................................... 1225
Methods................................................................................................................................... 1227
AllocObject Method................................................................................................................................... 1227
AllocObject Method................................................................................................................................... 1228
AllocObject Method................................................................................................................................... 1228
AllocObject Method................................................................................................................................... 1228
AllocObject Method
Exists Method................................................................................................................................... 1229................................................................................................................................... 1230
Extract Method................................................................................................................................... 1232
GetSchema Method...................................................................................................................................
1233
IsSchemaBased
Method...................................................................................................................................
1234
LoadFromStream
Method...................................................................................................................................
1234
SaveToStream
Method................................................................................................................................... 1235
Transform Method................................................................................................................................... 1236
Validate Method

25 OraPackage................................................................................................................................... 1237
Classes .......................................................................................................................................................... 1237.........................................................................................................................................................
1238
TCustomOraPackageClass.........................................................................................................................................
1238
Members.........................................................................................................................................
1239
Properties...................................................................................................................................
1239
Params Property...................................................................................................................................
1240
Session Property.........................................................................................................................................
1240
Methods...................................................................................................................................
1241
ExecProc Method...................................................................................................................................
1242
ExecProcEx Method...................................................................................................................................
1243
VariableByName Method.........................................................................................................................................................
1244
TOraPackage Class.........................................................................................................................................
1244
Members.........................................................................................................................................
1245
Properties...................................................................................................................................
1246
PackageName Property

26 OraProvider................................................................................................................................... 1246
Classes .......................................................................................................................................................... 1246.........................................................................................................................................................
1247
TOraProvider
Class......................................................................................................................................... 1247
Members

27 OraScript................................................................................................................................... 1247
Classes .......................................................................................................................................................... 1248.........................................................................................................................................................
1248
TOraScriptClass......................................................................................................................................... 1249
Members......................................................................................................................................... 1251
Properties................................................................................................................................... 1252
DataSet Property................................................................................................................................... 1253
Session Property................................................................................................................................... 1253
Statements Property.........................................................................................................................................................
1254
TOraStatement
Class......................................................................................................................................... 1255
Members......................................................................................................................................... 1256
Properties................................................................................................................................... 1257
Params Property.........................................................................................................................................................
1258
TOraStatements
Class......................................................................................................................................... 1258
Members......................................................................................................................................... 1259
Properties................................................................................................................................... 1259
Items Property(Indexer)

28 OraSmart................................................................................................................................... 1260
© 2019 Devart

XXXII

Oracle Data Access Components
Classes .......................................................................................................................................................... 1261.........................................................................................................................................................
1261
TCustomSmartQueryClass......................................................................................................................................... 1262
Members......................................................................................................................................... 1273
Properties...................................................................................................................................
1279
DependEvents
Property................................................................................................................................... 1279
Expand Property................................................................................................................................... 1280
Options Property
1281
RefreshEvent...................................................................................................................................
Property
1281
SmartRefresh...................................................................................................................................
Property................................................................................................................................... 1282
SmartState Property......................................................................................................................................... 1282
Methods
View Method................................................................................................................................... 1287......................................................................................................................................... 1288
Events...................................................................................................................................
1289
AfterSmartRefresh
Event
1289
RefreshFields...................................................................................................................................
Event.........................................................................................................................................................
1290
TOraTableClass......................................................................................................................................... 1291
Members......................................................................................................................................... 1302
Properties................................................................................................................................... 1308
FetchAll Property................................................................................................................................... 1308
LockMode Property................................................................................................................................... 1309
OrderFields Property................................................................................................................................... 1309
TableName Property......................................................................................................................................... 1310
Methods................................................................................................................................... 1315
EmptyTable Method................................................................................................................................... 1315
PrepareSQL Method.........................................................................................................................................................
1316
TSmartQueryClass......................................................................................................................................... 1317
Members.........................................................................................................................................................
1327
TSmartQueryOptions
Class......................................................................................................................................... 1328
Members.......................................................................................................................................................... 1332
Enum erations.........................................................................................................................................................
1332
TSmartState
Enumeration

29 OraSQLMonitor................................................................................................................................... 1333
Classes .......................................................................................................................................................... 1333.........................................................................................................................................................
1334
TOraSQLMonitor
Class.........................................................................................................................................
1334
Members

30 OraTransaction................................................................................................................................... 1335
Classes .......................................................................................................................................................... 1336.........................................................................................................................................................
1336
TOraTransaction
Class......................................................................................................................................... 1337
Members......................................................................................................................................... 1339
Properties................................................................................................................................... 1340
Active Property...................................................................................................................................
1341
BranchQualifiers
Property(Indexer)...................................................................................................................................
1341
DefaultSession
Property...................................................................................................................................
1342
GlobalCoordinator
Property...................................................................................................................................
1342
InactiveTimeOut
Property1343
IsolationLevel...................................................................................................................................
Property...................................................................................................................................
1343
ResumeTimeOut
Property................................................................................................................................... 1344
Sessions Property(Indexer)...................................................................................................................................
1344
SessionsCount
Property
1345
TransactionId...................................................................................................................................
Property...................................................................................................................................
1345
TransactionName
Property......................................................................................................................................... 1346
Methods................................................................................................................................... 1347
AddSession Method© 2019 Devart

Contents

XXXIII................................................................................................................................... 1347
AddSession Method................................................................................................................................... 1348
AddSession Method...................................................................................................................................
1348
ClearSessions
Method................................................................................................................................... 1349
Detach Method...................................................................................................................................
1349
RemoveSession
Method................................................................................................................................... 1350
Resume Method...................................................................................................................................
1350
RollbackToSavepoint
Method................................................................................................................................... 1351
Savepoint Method...................................................................................................................................
1352
StartTransaction
Method...................................................................................................................................
1352
StartTransaction
Method...................................................................................................................................
1352
StartTransaction
Method......................................................................................................................................... 1353
EventsOnError Event................................................................................................................................... 1354.......................................................................................................................................................... 1355
Enum erations.........................................................................................................................................................
1355
TGlobalCoordinator
Enumeration

31 VirtualDataSet................................................................................................................................... 1356
Classes .......................................................................................................................................................... 1356.........................................................................................................................................................
1357
TCustomVirtualDataSet
Class.........................................................................................................................................
1357
Members.........................................................................................................................................................
1360
TVirtualDataSet Class.........................................................................................................................................
1361
Members..........................................................................................................................................................
1364
Types
.........................................................................................................................................................
1364
TOnDeleteRecordEvent Procedure Reference.........................................................................................................................................................
1365
TOnGetFieldValueEvent Procedure Reference.........................................................................................................................................................
1365
TOnGetRecordCountEvent Procedure Reference.........................................................................................................................................................
1366
TOnModifyRecordEvent Procedure Reference

32 VirtualTable................................................................................................................................... 1366
Classes .......................................................................................................................................................... 1367.........................................................................................................................................................
1367
TVirtualTable
Class......................................................................................................................................... 1367
Members......................................................................................................................................... 1371
Properties...................................................................................................................................
1372
DefaultSortType
Property......................................................................................................................................... 1372
Methods................................................................................................................................... 1374
Assign Method
1375
LoadFromFile...................................................................................................................................
Method© 2019 Devart

11Oracle Data Access Components

What's New

26-Nov-19 New Features in ODAC 11.1:
Android 64-bit is supported
Lazarus 2.0.6 is supported
Oracle 19c is supported
Now Trial edition for macOS and Linux is fully functional
Long database object names is supported

22-Jul-19 New Features in ODAC 11.0:
macOS 64-bit is supported
Release 2 for RAD Studio 10.3 Rio, Delphi 10.3 Rio, and C++Builder 10.3 Rio is now
required24-Jun-19 New Features in ODAC 10.4:
Lazarus 2.0.2 is supported
CommandTimeout is supported
Support for ChangePassword in the Direct mode is improved
The DefaultSortType property for TVirtualTable is added
Performance of the SaveToFile/LoadFromFile methods of TVirtualTable is significantly
increased

26-Nov-18 New Features in ODAC 10.3:
RAD Studio 10.3 Rio is supported
Oracle 18c is supported
Implicit result sets in Oracle 12 are supported
The OpenNext method for opening a next cursor or implicit result set is added
Support of UPPER and LOWER functions for Unified SQL is added

09-Jul-18 New Features in ODAC 10.2:
Lazarus 1.8.4 is supported
Performance of data fetching in the Direct mode is improved
Performance of describing stored procedures in the Direct mode is improved
Performance of batch operations is improved
Demo projects for IntraWeb 14 are added© 2019 Devart

What's New

2

Now the TOraTimeStamp.AsDateTime method returns TDateTime value with milliseconds
Now non-compiled stored procedures can be described in the Direct mode
Performance of describing stored procedures in the Direct mode is improved
Support for TIMESTAMP WITH TIMEZONE in the Direct mode is improved

19-Sep-17 New Features in ODAC 10.1:
Oracle 12c connection modes (SYSBACKUP, SYSDG, SYSKM) in the Direct mode aresupported
OS authentication in the Direct mode is supported
NChar literal replacement is supported

05-Apr-17 New Features in ODAC 10.0:
RAD Studio 10.2 Tokyo is supported
Linux in RAD Studio 10.2 Tokyo is supported
Lazarus 1.6.4 and Free Pascal 3.0.2 is supported
Oracle Encryption in the Direct mode is supported
Oracle Data Integrity in the Direct mode is supported
Oracle Cloud (DBaaS) in the Direct mode is supported
Oracle 12c authentication in the Direct mode is supported
SECUREFILE in the Direct mode is supported
Prefetch LOBs for Oracle 11 and higher is supported
EDITIONABLE and NONEDITIONABLE clause is supported
The PrefetchLobSize option is added
ANYDATA is supported
Field size detecting for servers with multi-byte charset when UseUnicode=False isimproved
Now NUMBER data type without fixed scale has precision=39 and scale=39 instead of 38

25-Apr-16 New Features in ODAC 9.7:
RAD Studio 10.1 Berlin is supported
Lazarus 1.6 and FPC 3.0.0 is supported
Support for the BETWEEN statement in TDADataSet.Filter is added
Data Type Mapping performance is improved
Performance of TDALoader on loading data from TDataSet is improved

09-Sep-15 New Features in ODAC 9.6:
© 2019 Devart

3Oracle Data Access Components

RAD Studio 10 Seattle is supported
Now NULL and empty strings are different values for ftOraLob and ftOraClob parameters
Now Trial for Win64 is a fully functional Professional Edition
Support for Offset is added for DML arrays
Support for OraNet.PacketSize is added to improve performance in VPN and Wirelessnetworks
Support for Object References in the Direct mode is added
Support for Object attributes with the XML data type is added

14-Apr-15 New Features in ODAC 9.5:
RAD Studio XE8 is supported
AppMethod is supported
Direct mode in Lazarus is supported
Now the Direct mode is supplied as source code
Support for Objects in the Direct mode is added
Support for XML in the Direct mode is added
Support for EZCONNECT in the Direct mode is added
Support for fields with Cursor data type in the Direct mode is added
Now statements with RETURN INTO clauses can return RowsAffected in the Direct mode

15-Sep-14 New Features in ODAC 9.4:
RAD Studio XE7 is supported
Lazarus 1.2.4 is supported
RAC server support is improved
Support for WITH FUNCTION clause for Oracle 12c is added
GetServerList doesn't cut the WORLD postfix anymore
The HideRowId option is added
Demo projects for FastReport 5 are added
The TCustomDADataSet.GetKeyFieldNames method is added
The ConstraintColumns metadata kind for the TDAMetadata component is added
Workaround for the bug with calling Halt in the OnCreate event is added

29-Apr-14 New Features in ODAC 9.3:
RAD Studio XE6 is supported
Android in C++Builder XE6 is supported
Lazarus 1.2.2 and FPC 2.6.4 is supported© 2019 Devart

What's New

4

SmartFetch mode for TDataSet descendants is added
Now update queries inside TDataSet descendants have correct owner
Possibility to assign external SvcCtx to connection is added
DataTypeMapping conversion from XMLType to ftString is added
DataTypeMapping conversion from Interval to ftString is added
The TOraDataSetOptions.MasterFieldsNullable property is added

25-Dec-13 New Features in ODAC 9.2:
iOS in C++Builder XE5 is supported
RAD Studio XE5 Update 2 is now required
Now .obj and .o files are supplied for C++Builder
An ability to establish OCI and Direct connections in the same application is supported
New Oracle 12c connection modes are added (SYSBACKUP, SYSDG, SYSKM)The AsTimeStamp property is added to the TOraTimeStamp classCompatibility of migrating floating-point fields from other components is improved

18-Sep-13 New Features in ODAC 9.1:
RAD Studio XE5 is supported
Application development for Android is supported
Lazarus 1.0.12 is supported
Performance is improved
Automatic checking for new versions is added
Flexible management of conditions in the WHERE clause is added
The possibility to use conditions is added
IPv6 protocol support is added
The possibility to use ranges is added
Support of the IN keyword in the TDataSet.Filter property is added
Like operator behaviour when used in the Filter property is now similar to TClientDataSet
The AllowImplicitConnect option for the TOraSession component is added
The SQLRecCount property for the TOraQuery and TOraStoredProc components is added
The ScanParams property for the TOraScript component is added
The RowsAffected property for the TOraScript component is added
The UROWID data type is supported in the Direct mode

25-Apr-13 New Features in ODAC 9.0:
Rad Studio XE4 is supported© 2019 Devart

5Oracle Data Access Components

NEXTGEN compiler is supported
Application development for iOS is supported
FPC 2.6.2 and Lazarus 1.0.8 are supported
BINARY_DOUBLE & BINARY_FLOAT data types support in the Direct mode is added
Connection string support is improved
Possibility to encrypt entire tables and datasets is added
Possibility to determine if data in a field is encrypted is added
Support for TimeStamp, Single and Extended fields in VirtualTable is added

12-Dec-12 New Features in ODAC 8.6:
Rad Studio XE3 Update 1 is now required
C++Builder 64-bit for Windows is supported

05-Sep-12 New Features in ODAC 8.5:
Rad Studio XE3 is supported
Windows 8 is supported

24-Jul-12 New Features in ODAC 8.2:
Update 4 Hotfix 1 for RAD Studio XE2, Delphi XE2, and C++Builder XE2 is now required
Data Type Mapping support is added
Data Encryption in a client application is added
The TOraEncryptor component for data encryption is added
Integration with dbForge Studio for Oracle is added
Calling of the TCustomDASQL.BeforeExecute event is added
FieldType ftOraTimeStamp is added

23-Nov-11 New Features in ODAC 8.1:
Update 2 for RAD Studio XE2, Delphi XE2, and C++Builder XE2 is now required
Mac OS X and iOS in RAD Studio XE2 is supported
FireMonkey support is improved
Lazarus 0.9.30.2 and FPC 2.4.4 are supported
Mac OS X in Lazarus is supported
Linux x64 in Lazarus is supported
FreeBSD in Lazarus is supported
Oracle 11 Express Edition is supported
Support for the NonBlocking option is added© 2019 Devart

What's New

6

The QueryResultOnly option is added to TOraChangeNotification

15-Sep-11 New Features in Oracle Data Access
Components 8.00:
Embarcadero RAD Studio XE2 is supported
Application development for 64-bit Windows is supported
FireMonkey application development platform is supported
Support of master/detail relationship for TVirtualTable is added
OnProgress event in TVirtualTable is added
TDADataSetOptions.SetEmptyStrToNull property that allows inserting NULL value insteadof empty string is added

28-Apr-11 New Features in Oracle Data Access
Components 7.20:
Lazarus 0.9.30 and FPC 2.4.2 is supported
Oracle 9, Oracle 10, and Oracle 11 authentication in the Direct mode is supportedCase sensitive login and password in the Direct mode is supported
Unicode login and password in the Direct mode is supported
Client Identifier in the Direct mode is supported
Support of BLOB, CLOB, and NCLOB data types in ToraLoader is improved
Support of "table of blob/clob" data type is improved

26-Jan-11 New Features in Oracle Data Access
Components 7.10:
Support for connection with using Service Name in the Direct mode
Support for the ChangePassword functionality in the Direct mode
Improved returning cursors with different fields list from TOraStoredProc
Search for the TNS_ADMIN variable in the Oracle root location in the registry
Checking that dataset is open on calling the TDataSet.Locate method

13-Sep-10 New Features in Oracle Data Access
Components 7.00:
Embarcadero RAD Studio XE suppored
Support of National parameter to Package Wizard
Ability to lock records in the CachedUpdate mode

© 2019 Devart

7Oracle Data Access Components

Ability to send call stack information to the dbMonitor component
Added ability to lock records in the CachedUpdate mode
Added OnStart, OnCommit, OnRollback events to TDATransaction
Added OnInfoMessage event
Added support for dbMonitor 3
Added support for using user-defined UpdatingTable when ODAC cannot detect a table list
for a query
Updated Oracle client version detection for Linux by OCI API
Changed the LocateEx method behavior: now LocateEx centers records equal to Locate
Now Required flag is set for UpdatingTable fields only
Now the AssignConnect method copies transaction state

10-Sep-09 New Features in Oracle Data Access
Components 6.90:
Embarcadero RAD Studio 2010 supported
Support for BINARY_FLOAT and BINARY_DOUBLE data types in TOraArray
Support for reading a comma separated list of aliases from TNSNAMES.ORA
Support for ALTER .. COMPILE in GetCompilationError
Unicode support in CLOB attributes of OBJECT type
Added EnableOraTimeStamp option of TOraSession
Added distinction between empty string and null value when saving/loading string fields in
TVirtualTable
Added support for Free Pascal under Linux
Added NoPreconnect property to TOraScript for executing CONNECT and CREATEDATABASE commands
The Disconnected property to TCustomDADataSet
Now the value from the master dataset has priority over the DefaultExpression value

02-Apr-09 New Features in Oracle Data Access
Components 6.80:
Free Pascal under Linux supported
Added NoPreconnect property to TOraScript for executing CONNECT and CREATEDATABASE commands

23-Oct-08 New Features in Oracle Data Access
Components 6.70:© 2019 Devart

What's New

Delphi 2009 and C++Builder 2009 supported
Extended Unicode support for Delphi 2007 added (special Unicode build)
Free Pascal 2.2 supported
Powerful design-time editors implemented in Lazarus
Optimized LOB processing in Direct mode
Completed with more comprehensive structured Help

23-May-08 New Features in Oracle Data Access
Components 6.50:
Improved support of default field values
The new component for metadata receiving added
Added support of TWideMemoField
The BCD types supported

14-Nov-07 New Features in Oracle Data Access
Components 6.25:
Oracle 11g supported

27-Sep-07 New Features in Oracle Data Access
Components 6.20:
CodeGear RAD Studio 2007 supported
Added ability to customize whether update SQL statements should be prepared
Added ability to set number of rows to be prefetched by OCI
Added the OnProgress event in TOraLoader

12-Jun-07 New Features in Oracle Data Access
Components 6.10:
C++Builder 2007 supported

16-May-07 New Features in Oracle Data Access
Components 6.05:
Added Oracle Package Wizard that simplifies working with PL/SQL Packages

22-Mar-07 New Features in Oracle Data Access
Components 6.00:© 2019 Devart89Oracle Data Access Components

New functionality:
Delphi 2007 for Win32 supported
Implemented Disconnected Model for working offline and automatically connecting anddisconnecting
Implemented Local Failover for detecting connection loss and implicitly re-executing some
operations
LargeInt fields supported
WideMemo field type in Delphi 2006 supported
Added DataSet Manager to control project datasets
Integration with OraDeveloper Tools 2.00 added
New TCRBatchMove component for transferring data between all types of TDataSet
descendants added
Data export and M:Devart.Dac.TVirtualTable.LoadFromFile(System.String,System.Boolean)
to/from XML supported
Support for sending messages to DBMonitor from any point in your program added

Support for more Oracle server functionality:
Distributed transactions supported
Advanced Queuing support added
Change notifications functionality of Oracle 10g supported
DBMS_TRACE package and SQLTrace functionality supported
OCI Connection Pooling, Statement Caching, and Proxy Session Pooling added
External Procedures support added

Extensions and improvements to existing functionality:
General performance improved
Master/detail functionality extensions:o Local master/detail relationship support addedo Support for master/detail relationships in CachedUpdates mode added
Connection pool functionality improvements:o Efficiency significantly improvedo API for draining the connection pool added
TOraScript component improvements:o Support for executing individual statements in scripts addedo Support for executing huge scripts stored in files with dynamic loading added© 2019 Devart

What's New

10o Ability to use standard SQL*Plus tool syntax added
Greatly increased performance of applying updates in CachedUpdates modeWorking with calculated and lookup fields improvements:o Local sorting and filtering addedo Record location speed increasedo Improved working with lookup fields
Ability to customize update commands by attaching external components to
TOraUpdateSQL objects added
Support for using BeforeFetch and AfterFetch events in NonBlocking mode added
Temporary LOBs for updating LOB fields supported
Support for setting connection timeout values for Direct mode added
Ability to include all fields in automatically generated update SQLs added
Support for default field value expressions added

Usability improvements:
Syntax highlighting in design-time editors added
Completely restructured and clearer demo projects

26-Jan-06 New Features in Oracle Data Access
Components 5.70:
Delphi 2006 supported

31-May-05 New Features in Oracle Data Access
Components 5.55:
Added ability to automatically prepare queries (TCustomDADataSet.Options.AutoPrepare)
Added ability to synchronize positions in different DataSets(TCustomDADataSet.GotoCurrent)

24-Jan-05 New Features in Oracle Data Access
Components 5.50:
Delphi 2005 supported
Performance of Net-option improved
Added Schema property for TOraSession component
Added ProxySession property for TOraSession component© 2019 Devart

11

Oracle Data Access Components

30-Jun-04 New Features in Oracle Data Access
Components 5.10:
Local sort ability using IndexFieldNames property added
T:Devart.Odac.OraDataAdapter component for Delphi 8 added

09-Apr-04 New Features in Oracle Data Access
Components 5.00:
Support for Delphi 8 added
Oracle 10g support added
Connection pooling supported
Character conversion supported in Oracle 9i in Direct modeUnicode character data supported in Direct mode
Support TIMESTAMP, INTERVAL data types in Direct mode
Support for Oracle internal NUMBER datatype added in Direct mode
Performance improved
TCRGrid sources in Standard and Net editions.NET Windows Forms demo project added
ASP.NET demo project added

08-Oct-03 New Features in Oracle Data Access
Components 4.50:
XMLTYPE datatype support added
WideString support added to work with Unicode character data
Transparent Application Failover support added

05-Jun-03 New Features in Oracle Data Access
Components 4.15:
Support for Oracle internal NUMBER datatype added. Allows to work with high precision
numbers without accuracy losses

30-Jan-03 New Features in Oracle Data Access
Components 4.10:
Support for Oracle 9i NOT FINAL objects added
TIMESTAMP and INTERVAL support for Oracle objects added© 2019 Devart

What's New

1225-Dec-02 Oracle Data Access Components 4.05 newfeatures:
Transaction control schema changed. Now TOraSession.InTransaction shows actual usertransaction state on server (implicit commit and rollback are considered).
DBMonitor client implementation moved to COM server. Now ODAC is incompatible with
DBMonitor 2.02 or lower.
LOB attributes support for object fields added
Temporary LOBs support added
Constants ftTimeStampTZ and ftTimeStampLTZ added. Used in TOraTimeStampField.
UROWID support for index organized tables added
Option ConvertEOL added

30-Sep-02 New Features in Oracle Data Access
Components 4.00:
Delphi 7 support
Kylix 3 for C++ support
Oracle 9 scrollable cursors support
New memory management model for ftString and ftVarBytes types. Allows significantly
decrease memory usage on large tables fetch. Controlled by FlatBuffers dataset option;
RAW datatype support (as ftVarBytes)
Support for complex fields (blobs, objects etc.) in CachedUpdates mode
New 'Prepare' schema. Now if user does not explicitly call Prepare method before opening
dataset there is no additional roundtrip to server for select-list describe(OCIStmtExecute(DESCRIBE_ONLY) call). I.e. Open (Execute for SELECT) without
Prepare is performed in a more optimal way.

30-Aug-02 New Features in Oracle Data Access
Components 3.90:
Kylix 3 support

09-Aug-02 New Features in Oracle Data Access
Components 3.85:
DBMonitor support
New version of OraTools support (v. 2.50)© 2019 Devart

13

Oracle Data Access Components

18-Jul-02 New Features in Oracle Data Access
Components 3.80:
Oracle9 timestamp and interval datatypes support
Performance optimization for queries with many fields, especially for TSmartQuery and
TOraTable
Runtime packages division for Delphi6, C++Builder6, Kylix, Kylix2, see manual
Auto generation RETURNING clause for LOBs added to design-time component editor

21-Mar-02 New Features in Oracle Data Access
Components 3.60:
supports C++Builder 6

14-Dec-01 New Features in Oracle Data Access
Components 3.50:
supports Kylix 2
multibytes charsets support
direct lob access support
using OraTools Add-in

12-Oct-01 New Features in Oracle Data Access
Components 3.30:
supports Oracle 9i
Net edition for Kylix

08-Aug-01 New Features in Oracle Data Access
Components 3.20:
supports Delphi 6
new version of OraDesigner
OraExplorer
printed documentation
BDE Migration Wizard

20-Feb-01 New Features in Oracle Data Access
Components 3.00:© 2019 Devart

What's New

using standard TParam object
separate run- and design-time packages
get original name of fields
retrieve field's default value
in Direct mode support
Kylix ready

11-Jul-00 New Features in Oracle Data Access
Components 2.50:
supports multiple Oracle Homes
supports Borland SQL Monitor
TOraSQLMonitor component
default session
customizable connect dialog
ConnectDialog and Threads demos added

30-Mar-00 New Features in Oracle Data Access
Components 2.20:
supports C++Builder 5macros in update SQL

10-Jan-00 New Features in Oracle Data Access
Components 2.10:
customized TSmartQuery data updating
supports DML array operations
macros in TOraSQL and TOraScript
TOraLoader component
supports Oracle 8 Liteeasy installation

14-Oct-99 New Features in Oracle Data Access
Components 2.00:
supports Oracle8 Objects
supports Oracle8 REFs
supports Oracle8 Arrays© 2019 Devart

14

15

Oracle Data Access Components

supports Oracle8 Nested tables
supports Oracle8 BFiles
using RETURNING with Oracle8
smart refreshing
TOraNestedTable component
TOraScript component
TOraAlerter component
TBFileField component
TOraFile class
TOraLob class
TOraType class
TOraObject class
TOraRef class
TOraArray class
TOraNestTable class
Alerter, Arrays, BFile, BLOBPics, DLL, DMLArray, FetchCursors, NestedTables, Objects,
Refs demos added

26-May-99 New Features in Oracle Data Access
Components 1.85:
TOraProvider component
TBDESession component
Supports Oracle 8i
C++Builder 4 package

12-Mar-99 New Features in Oracle Data Access
Components 1.75:
TOraTable component
TStoredProc component

01-Mar-99 New Features in Oracle Data Access
Components 1.70:
Supports BLOB and CLOB data types Oracle 8
Supports nested tables
TVirtualTable component© 2019 Devart

What's New

16

Embeded SQL Designer with PL/SQL debugger
C++Builder version

22-Oct-98 New Features in Oracle Data Access
Components 1.50:
Supports native interface Oracle 8.0
Supports PL/SQL tables
TOraErrorHandler© 1997-2019
Devart. All Rights
Reserved.

2

Request Support

DAC Forum

Provide Feedback

General Information
This section contains general information about Oracle Data Access Components
Overview
Features
Requirements
Compatibility
Using Several DAC Products in One IDE
Component List
Hierarchy Chart
Editions
Getting Support
Frequently Asked Questions© 1997-2019
Devart. All Rights
Reserved.

2.1

Request Support

DAC Forum

Provide Feedback

Overview
Oracle Data Access Components (ODAC) is a library of components that provides native
connectivity to Oracle from Delphi, C++Builder, Lazarus (and Free Pascal) for 32-bit and 64bit Windows, macOS, and Linux platforms. The ODAC library is designed to help
programmers develop faster, cleaner and more native Oracle database applications. ODAC,
a high-performance and feature-rich Oracle connectivity solution, is an efficient native
alternative to the Borland Database Engine (BDE) and standard dbExpress driver. It provides
both possibility of connection to Oracle by means of native Oracle data access and directaccess to Oracle without Oracle Client.

© 2019 Devart

17

Oracle Data Access Components

The ODAC library is actively developed and supported by the Devart Team. If you havequestions about ODAC, email the developers at odac@devart.com or visit ODAC online athttps://www.devart.com/odac/

Table of Contents
Advantages of ODAC Technology
1. Wide Coverage of Oracle Features
2. Native Connection Options
3. Oracle Advanced Features Support
4. Cross-Platform Solution for Delphi, C++Builder, and Lazarus
5. Optimized Code
6. Compatibility with Other Connectivity Methods
7. Development and Support
Key Features
How does ODAC work?

Advantages of ODAC Technology
ODAC is a direct database connectivity wrapper built specifically for the Oracle server. ODAC
offers wide coverage of the Oracle feature set, supports both Client and Direct connection
modes, and emphasizes optimized data access strategies.

Wide Coverage of Oracle Features
By providing access to the most advanced database functionality, ODAC allows developers
to harness the full capabilities of the Oracle and optimize their database applications. ODAC
stands out as the set of components with the widest support of Oracle functionality. It is the
only component to support Oracle distributed transactions and implements support forcontrolling statement caching , OCI pooling , and Oracle Advanced Queuing. Get a full list of
supported Oracle features in the Features topic.

Native Connection Options
ODAC offers two connection modes to the Oracle server: connection through the Oracle Call
Interface and direct connection over TCP/IP. ODAC-based database applications are easy todeploy, do not require installation of other data provider layers (such as BDE), and tend to befaster than those that use standard data connectivity solutions. See the How does ODACWork section.

Oracle Advanced Features Support© 2019 Devart

General Information

18

ODAC has extra components designed to simplify some tasks and support Oracle-specifictechnologies. Particularly, OraScript serves to execute series of SQL statements, OraLoader
serves to load external data into Oracle databases, OraeAlerter and OraPipe transfer
messages and data between connections or client applications, and so on. ODAC includes
set of classes designed to work with Oracle Advanced Queuing technology.

Cross-Platform Solution for Delphi, C++Builder, and Lazarus
ODAC is a cross-platform solution for developing applications using various IDEs: RAD
Studio, Delphi, C++Builder, Lazarus (and FPC) on Windows, macOS, and Linux, for both x86
and x64 platforms. ODAC also provides support for the FireMonkey platform, which allows
you to develop visually spectacular high-performance native applications for Windows andmacOS.

Optimized CodeThe goal of ODAC is to enable developers to write efficient and flexible database applications.
The ODAC library is implemented using optimized code and advanced data accessalgorithms. Component interfaces undergo comprehensive performance tests and aredesigned to help you write thin and efficient product data access layers. Find out more about
using ODAC to optimize your database applications in Increasing Performance. To see theresults of ODAC performance tests, consult the performance comparison section on the
ODAC website.

Compatibility with Other Connectivity Methods
The ODAC interface retains compatibility with standard VCL data access components like
BDE. Existing BDE-based applications can be easily migrated to ODAC and enhanced totake advantage of Oracle-specific features like alerts, pipes, and the direct-path interface.
Project migration can be automated with the BDE Migration Wizard. Find out more about
Migration Wizard in Using Migration Wizard.

Development and Support
ODAC is an Oracle connectivity solution that has been actively developed and supported
since 1998. ODAC comes with full documentation, demo projects, and fast (usually within
one business day) technical support by the ODAC development team. Find out more about
getting help or submit feedback and suggestions to the ODAC development team in theGetting Support topic.
The description of the ODAC components is provided in the Component List.

Key Features© 2019 Devart

19

Oracle Data Access Components

Direct access to server data. Does not require installation of other data provider layers(such as BDE and ODBC)In Direct mode does not require Oracle client software and works directly through TCP/IP
VCL, LCL and FMX versions of library available
Support of Windows, macOS, and Linux, for both x86 and x64 platforms.
Full support of the latest versions of Oracle
Support for all Oracle data types
Disconnected Model with automatic connection control for working with data offline
Local Failover for detecting connection loss and implicitly re-executing certain operations
Oracle Transparent Application Failover support
All types of local sorting and filtering , including by calculated and lookup fields
Automatic data updating with TOraQuery , TSmartQuery , and TOraTable components
Unicode and national charsets support
Distributed transaction support
Oracle Advanced Queuing support
Support for many Oracle-specific features, such as alerts, pipes and direct path interface
Advanced script execution functionality with TOraScript component
Support for using Macros in SQL
Easy migration from BDE with Migration Wizard
Lets you use Professional Edition of Delphi and C++Builder to develop client/server
applications
Included annual ODAC Subscription with Priority Support
Full Oracle Objects support
Comprehensive REF CURSOR support
PL/SQL tables and PL/SQL records support
Operates in both connected and disconnected models
Typed OraPackage component for wrapping PL/SQL packages
Auxiliary components for SQL scripts and bulk data transfer
Ability of monitoring query execution TOraSQLMonitor
Licensed royalty-free per developer, per team, or per site
The full list of ODAC features you can find in the Features topic.

How does ODAC work?
ODAC allows you to connect to Oracle in two ways: in Client mode, using Oracle Client
software, or in Direct mode, over TCP/IP. The chosen connection mode is regulated by the© 2019 Devart

General Information

20

ODAC Direct mode.
In Client mode, ODAC connects to Oracle through the Oracle Call Interface (OCI). OCI is anapplication programming interface that allows an application developer to use a thirdgeneration language's native procedure or function calls to access the Oracle databaseserver and control all phases of SQL statement execution. OCI is a library of standard
database access and retrieval functions in the form of a dynamic-link library.
In Direct mode, ODAC connects to Oracle directly without using Oracle client software. In thismode, ODAC requires only TCP/IP support, and lets you build really thin database application.
In comparison, the Borland Database Engine (BDE) uses several layers to access Oracle,
and requires additional data access software to be installed on client machines.
The BDE data transfer protocol is shown below.

BDE Connection Protocol
Using ODAC in Client mode allows your application to connect to OCI directly.

ODAC Connection Flow

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

21

2.2

Oracle Data Access Components

Features

Supported Target Platforms:
Windows, 32-bit and 64-bit
macOS, 32-bit and 64-bit
iOS, 32-bit and 64-bit
AndroidLinux, 32-bit and 64-bit
FreeBSD, 32-bit and 64-bit

General usability:
Direct access to server data. Does not require installation of other data provider layers(such as BDE and ODBC)Interface compatible with standard data access methods, such as BDE and ADO
VCL, LCL, and FMX versions of library available
Separated run-time and GUI specific parts allow you to create pure console applications
such as CGI
Unicode and national charset support
Highly usable design time support
Easy to deploy

Network and connectivity:
In Direct mode does not require Oracle client software and works directly through TCP/IP
Disconnected Model with automatic connection control for working with data offline
Local Failover for detecting connection loss and implicitly reexecuting certain operations
Support for setting connection timeout values for Direct mode
Support for OraNet.PacketSize to improve performance in VPN and Wireless networks
Support for OS authentication
Support for Proxy Authentication
DBA privileges to open a session with
Support for Oracle 18c connection modes
Support for the change expired password
Connection using Service Name or SID in the Direct mode
Support for RAC Server
Support for both IPv6 and Ipv4 protocol© 2019 Devart

General Information22

Support for IFILE in tnsnames.ora
Support for EZCONNECT connection string

Compatibility:
Full support of the latest versions of Oracle
Support for all versions of Oracle Clients, including Instant Client
Support for all Oracle data types in both OCI and Direct modes
Includes provider for UniDAC Express Edition
Wide reporting component support, including support for InfoPower, ReportBuilder,
FastReport
Support for all standard visual data-aware controls
Compatible with Delphi 6, 7, C++Builder 6, Borland Delphi Studio 2006, Code Gear RAD
Studio 2007, 2009, Embarcadero RAD Studio 2010, XE, XE2, XE3, XE4, XE5, XE6, XE7,
XE8, Seattle, Berlin, Tokyo, Rio
Support for Lazarus 2.0.2 and FPC 3.0.4 for Windows, Linux, macOS, FreeBSD for 32-bit
and 64-bit platforms
Allows you to use Professional Edition of Delphi and C++Builder to develop client/server
applications.

Oracle technology support:
Oracle Advanced Queuing support
Distributed transactions support with TOraTransaction component
Oracle package support
Support for Oracle alerts and pipes with TOraAlerter component
Support for Direct Path interface with TOraLoader component
Support for DBMS_TRACE package and SQLTrace functionality with TOraTrace
Support for Oracle Change notifications functionality of Oracle 10g with
TOraChangeNotification component
Oracle Transparent Application Failover support
Oracle 9i scrollable cursor support
Multiple Oracle Homes support
Oracle sequence support
DML array operations support
Direct lob access support
Temporary LOB management routines
Temporary LOBs for updating LOB fields© 2019 Devart

23

Oracle Data Access Components

OCI Connection Pooling , Proxy Session Pooling , and Statement Caching
Oracle optimizer control
ProxySession support
External Procedure support
CLIENT_IDENTIFIER support
Statement Caching
ROWID values retrieval
Overloaded stored procedures support
Support for WITH FUNCTION clauseOracle data types:
All Oracle data types support
Oracle Object (including NOT FINAL objects) types support
Nested table support
PL/SQL table support
PL/SQL records support
Support for REF CURSORs
XMLTYPE datatype support
Oracle 9i TIMESTAMP and INTERVAL data types support

Performance:
High overall performance
Fast controlled fetch of large data blocks
Optimized string data storing
Advanced connection poolingHigh performance applying of cached updates with batches
Caching of calculated and lookup fields
Expanded fields in TSmartQuery
Fast Locate in a sorted DataSet
Preparation of user-defined update statements
High performance batch processing
Intelligent fetch block size control
Advanced connection pooling
SmartFetch Mode enabling fast bi-directional navigation through large datasets

Local data storage operations:© 2019 Devart

General Information

24

Database-independent data storage with TVirtualTable component
CachedUpdates operation mode
Local sorting and filtering, with included calculated and lookup fields
Local master/detail relationship
Master/detail relationship in CachedUpdates mode

Data access and data management automation:
Automatic data updating with TOraQuery , TSmartQuery and TOraTable components
Automatic record refreshing and locking
Automatic query preparing
SmartRefresh option allows you to synchronize two or more datasets automaticallySupport for ftWideMemo field type in Delphi 2006 and higher
Data Type Mapping
Support for Data Encryption in a client application

Extended data access functionality:
Separate component for executing SQL and PL/SQL blocks
Simplified access to table data with TOraTable component
BLOB compression support
Support for using macros in SQL
NonBlocking mode allows background executing and fetching data in separate threads
Ability to customize update commands by attaching external components to
TOraUpdateSQL objects
Deferred detail DataSet refresh in master/detail relationships
LargeInt fields support
MIDAS technology support
Ability to customize Oracle error messages with TOraErrorHandler
Structural representation and editing of Oracle objects
Fill DataSet with several REF CURSOR
Fill DataSet with object, array and nested table data
Object-oriented building of SELECT statements

Data exchange:
Transferring data between all types of TDataSet descendants with TCRBatchMove
component
Data export and import to/from XML (ADO format)© 2019 Devart

25

Oracle Data Access Components

Ability to synchronize positions in different DataSets

Script execution:
Advanced script execution features with TOraScript component
Support for executing individual statements in scripts
Support for executing huge scripts stored in files with dynamic loading
Ability to use standard SQL*Plus tool syntax in scripts

SQL execution monitoring:
Extended SQL tracing capabilities provided by TOraSQLMonitor component and DBMonitor
Borland SQL Monitor support
Ability to send messages to DBMonitor from any point in your program
Display executing statement, all its parameters' values, and the type of parameters.

Visual extensions:
Includes source code of enhanced TCRDBGrid data-aware grid control
Customizable connection dialog
Cursor changes during non-blocking execution

Design-time enhancements:
DataSet Manager tool to control DataSet instances in the project
Oracle Package Wizard that simplifies working with PL/SQL Packages
Advanced design-time component and property editors
Automatic design-time component linking
Easy migration from BDE with Migration Wizard
More convenient data source setup with the TOraDataSource component
Syntax highlighting in design-time editors
Integration with dbForge Studio for Oracle

Product clarity:
Complete documentation sets
Documentation in CHM, PDF and Microsoft Help formats
A large amount of helpful demo projects

Licensing and support:
Included annual ODAC Subscription with Priority Support© 2019 Devart

General Information

26

Licensed royalty-free per developer, per team, or per site

© 1997-2019
Devart. All Rights
Reserved.

2.3

Request Support

DAC Forum

Provide Feedback

Requirements
Two versions of ODAC cannot be installed in parallel for the same IDE, and, since the Devart
Data Access Components products have some shared bpl files, newer versions of ODAC
may be incompatible with older versions of other Devart Data Access Components products.
So, before installing a new version of ODAC, uninstall any previous version of ODAC you may
have, and check if your new install is compatible with other Devart Data Access Components
products you have installed. For more information please see Using several products in one
IDE. If you run into problems or have any compatibility questions, please email
odac@devart.com
Note: You can avoid performing ODAC uninstallation manually when upgrading to a newversion by directing the ODAC installation program to overwrite previous versions. To do this,execute the installation program from the command line with a /force parameter (Start | Run
and type odacXX.exe /force, specifying the full path to the appropriate version of theinstallation program).
When installing ODAC from the sources to Windows Vista or Windows 7, it is necessary tohave full access to the ODAC folder.
To use full set of Oracle features you have to have Oracle client software installed. If you do
not want to install it, you can use Direct mode, in which ODAC communicates with Oracle
server without intermediate libraries. In order to use the Direct mode, the operating system
must have TCP/IP protocol support installed. For more information about using Direct mode,
refer to Connecting in Direct mode article.
ODAC supports both 32-bit and 64-bit Oracle client versions in OCI mode. Developing
applications for 64-bit client is possible only in RadStudio XE2 and Lazarus (FPC).
Note: RadStudio XE2 is a 32-bit application, therefore, for connecting to Oracle in OCI mode,even on a 64-bit platform, the 32-bit Oracle client is needed to be installed.
ODAC supports work with Oracle Instant Client in OCI mode. For correct work with Instant
Client, the data about the client must be recorded to the registry or the Path environment
variable, or Instant Client files(including tnsnames.ora) must be located in the application
directory.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

27

2.4

Oracle Data Access Components

Compatibility

Oracle Compatibility
ODAC supports Oracle servers 19c, 18c, 12c, 11g, 10g, 9i, 8i, 8.0, including Oracle Express
Edition 11g and 10g.
ODAC supports both x86 and x64 versions of the following Oracle Clients: 19c, 18c, 12c,
11g, 10g, 9i, 8i, 8.0.
Note that support for x64 versions of Oracle Clients is available in Delphi XE2 for 64-bit
Windows and is not available in C++Builder and older versions of Delphi.

IDE Compatibility
ODAC is compatible with the following IDEs:
Embarcadero RAD Studio 10.3 Rio (Requires Release 2)
o Embarcadero Delphi 10.3 Rio for Windows 32-bit & 64-bit
o Embarcadero Delphi 10.3 Rio for macOS 32-bit & 64-bit
o Embarcadero Delphi 10.3 Rio for Linux 64-bit
o Embarcadero Delphi 10.3 Rio for iOS 32-bit & 64-bit
o Embarcadero Delphi 10.3 Rio for Android 32-bit & 64-bit
o Embarcadero C++Builder 10.3 Rio for Windows 32-bit & 64-bit
o Embarcadero C++Builder 10.3 Rio for macOSo Embarcadero C++Builder 10.3 Rio for iOS 32-bit & 64-bit
o Embarcadero C++Builder 10.3 Rio for Android
Embarcadero RAD Studio 10.2 Tokyoo Embarcadero Delphi 10.2 Tokyo for Windows 32-bit & 64-bit
o Embarcadero Delphi 10.2 Tokyo for macOSo Embarcadero Delphi 10.2 Tokyo for Linux 64-bit
o Embarcadero Delphi 10.2 Tokyo for iOS 32-bit & 64-bit
o Embarcadero Delphi 10.2 Tokyo for Android
o Embarcadero C++Builder 10.2 Tokyo for Windows 32-bit & 64-bit
o Embarcadero C++Builder 10.2 Tokyo for macOSo Embarcadero C++Builder 10.2 Tokyo for iOS 32-bit & 64-bit
o Embarcadero C++Builder 10.2 Tokyo for Android
Embarcadero RAD Studio 10.1 Berlino Embarcadero Delphi 10.1 Berlin for Windows 32-bit & 64-bit
o Embarcadero Delphi 10.1 Berlin for macOSo Embarcadero Delphi 10.1 Berlin for iOS 32-bit & 64-bit© 2019 Devart

General Informationo Embarcadero Delphi 10.1 Berlin for Android
o Embarcadero C++Builder 10.1 Berlin for Windows 32-bit & 64-bit
o Embarcadero C++Builder 10.1 Berlin for macOSo Embarcadero C++Builder 10.1 Berlin for iOS 32-bit & 64-bit
o Embarcadero C++Builder 10.1 Berlin for Android
Embarcadero RAD Studio 10 Seattleo Embarcadero Delphi 10 Seattle for Windows 32-bit & 64-bit
o Embarcadero Delphi 10 Seattle for macOSo Embarcadero Delphi 10 Seattle for iOS 32-bit & 64-bit
o Embarcadero Delphi 10 Seattle for Android
o Embarcadero C++Builder 10 Seattle for Windows 32-bit & 64-bit
o Embarcadero C++Builder 10 Seattle for macOSo Embarcadero C++Builder 10 Seattle for iOS 32-bit & 64-bit
o Embarcadero C++Builder 10 Seattle for Android
Embarcadero RAD Studio XE8
o Embarcadero Delphi XE8 for Windows 32-bit & 64-bit
o Embarcadero Delphi XE8 for macOSo Embarcadero Delphi XE8 for iOS 32-bit & 64-bit
o Embarcadero Delphi XE8 for Android
o Embarcadero C++Builder XE8 for Windows 32-bit & 64-bit
o Embarcadero C++Builder XE8 for macOSo Embarcadero C++Builder XE8 for iOS 32-bit & 64-bit
o Embarcadero C++Builder XE8 for Android
Embarcadero RAD Studio XE7
o Embarcadero Delphi XE7 for Windows 32-bit & 64-bit
o Embarcadero Delphi XE7 for macOSo Embarcadero Delphi XE7 for iOS
o Embarcadero Delphi XE7 for Android
o Embarcadero C++Builder XE7 for Windows 32-bit & 64-bit
o Embarcadero C++Builder XE7 for macOSo Embarcadero C++Builder XE7 for iOS
o Embarcadero C++Builder XE7 for Android
Embarcadero RAD Studio XE6
o Embarcadero Delphi XE6 for Windows 32-bit & 64-bit
o Embarcadero Delphi XE6 for macOSo Embarcadero Delphi XE6 for iOS
o Embarcadero Delphi XE6 for Android© 2019 Devart

28

29

Oracle Data Access Components

o Embarcadero C++Builder XE6 for Windows 32-bit & 64-bit
o Embarcadero C++Builder XE6 for macOSo Embarcadero C++Builder XE6 for iOS
o Embarcadero C++Builder XE6 for Android
Embarcadero RAD Studio XE5 (Requires Update 2)o Embarcadero Delphi XE5 for Windows 32-bit & 64-bit
o Embarcadero Delphi XE5 for macOSo Embarcadero Delphi XE5 for iOS
o Embarcadero Delphi XE5 for Android
o Embarcadero C++Builder XE5 for Windows 32-bit & 64-bit
o Embarcadero C++Builder XE5 for macOSo Embarcadero C++Builder XE5 for iOS
Embarcadero RAD Studio XE4
o Embarcadero Delphi XE4 for Windows 32-bit & 64-bit
o Embarcadero Delphi XE4 for macOSo Embarcadero Delphi XE4 for iOS
o Embarcadero C++Builder XE4 for Windows 32-bit & 64-bit
o Embarcadero C++Builder XE4 for macOS
Embarcadero RAD Studio XE3 (Requires Update 2)o Embarcadero Delphi XE3 for Windows 32-bit & 64-bit
o Embarcadero Delphi XE3 for macOSo Embarcadero C++Builder XE3 for Windows 32-bit & 64-bit
o Embarcadero C++Builder XE3 for macOS
Embarcadero RAD Studio XE2 (Requires Update 4 Hotfix 1)o Embarcadero Delphi XE2 for Windows 32-bit & 64-bit
o Embarcadero Delphi XE2 for macOSo Embarcadero C++Builder XE2 for Windows 32-bit
o Embarcadero C++Builder XE2 for macOS
Embarcadero RAD Studio XE
o Embarcadero Delphi XEo Embarcadero C++Builder XE
Embarcadero RAD Studio 2010
o Embarcadero Delphi 2010
o Embarcadero C++Builder 2010
CodeGear RAD Studio 2009 (Requires Update 3)o CodeGear Delphi 2009

© 2019 Devart

General Information

30

o CodeGear C++Builder 2009
CodeGear RAD Studio 2007
o CodeGear Delphi 2007
o CodeGear C++Builder 2007
CodeGear RAD Studio 2006
o CodeGear Delphi 2006
o CodeGear C++Builder 2006
Borland Delphi 7
Borland Delphi 6 (Requires Update Pack 2 – Delphi 6 Build 6.240)
Borland C++Builder 6 (Requires Update Pack 4 – C++Builder 6 Build 10.166)
Lazarus 2.0.6 and Free Pascal 3.0.4 for Windows, Linux, macOS, FreeBSD for 32-bit and64-bit platforms
All the existing Delphi and C++Builder editions are supported: Architect, Enterprise,
Professional, Community, and Starter.
Lazarus and Free Pascal are supported only in Trial Edition and Professional Edition withsource code.

Supported Target Platforms
Windows, 32-bit and 64-bit
macOS, 32-bit and 64-bit
Linux, 32-bit (only in Lazarus and Free Pascal) and 64-bit
iOS, 32-bit and 64-bit
Android, 32-bit and 64-bit
FreeBSD (only in Lazarus and Free Pascal) 32-bit and 64-bit
Note that support for 64-bit Windows and macOS was introduced in RAD Studio XE2, and is
not available in older versions of RAD Studio. Support for iOS is available since RAD Studio
XE4, but support for iOS 64-bit is available since RAD Studio XE8. Support for Android isavailable since RAD Studio XE5. Support for Linux 64-bit is available since RAD Studio 10.2
Tokyo. Support for macOS 64-bit is available since RAD Studio 10.3 Rio. Support for Android
64-bit is available since RAD Studio 10.3.3 Rio.

Devart Data Access Components Compatibility
All DAC products are compatible with each other.

© 2019 Devart

31

Oracle Data Access Components

But, to install several DAC products to the same IDE, it is necessary to make sure that all
DAC products have the same common engine (BPL files) version. The latest versions of
DAC products or versions with the same release date always have the same version of thecommon engine and can be installed to the same IDE.

© 1997-2019
Devart. All Rights
Reserved.

2.5

Request Support

DAC Forum

Provide Feedback

Using Several DAC Products in One IDE
UniDAC, ODAC, SDAC, MyDAC, IBDAC, PgDAC, LiteDAC and VirtualDAC components use
common base packages listed below:
Packages:
dacXX.bpl
dacvclXX.bpl
dcldacXX.bpl
Note that product compatibility is provided for the current build only. In other words, if you
upgrade one of the installed products, it may conflict with older builds of other products. In
order to continue using the products simultaneously, you should upgrade all of them at thesame time.

© 1997-2019
Devart. All Rights
Reserved.

2.6

Request Support

DAC Forum

Provide Feedback

Component List
This topic presents a brief description of the components included in the Oracle Data Access
Components library. Click on the name of each component for more information. These
components are added to the ODAC page of the Component palette except for
TCRBatchMove and TVirtualTable components. TCRBatchMove and TVirtualTable
components are added to the Data Access page of the Component palette. Basic ODAC
components are included in all ODAC editions. ODAC Professional and Developer Edition
components are not included in ODAC Standard Edition.

Basic ODAC components
TOraSession

Lets you set up and control connections to Oracle.

© 2019 Devart

General Information

TOraQuery

TSmartQuery

32

Uses SQL statements to retrieve data from Oracle tables andpass it to one or more data-aware components through a
TDataSource object. This component provides a mechanism for
updating data in Oracle.
A more efficient query component. This component is aware of
all the fields that belong to a table being updated and performs
on-demand full row retrieval with Expand Fields . A trafficefficient alternative to TOraQuery for working with large tables
with lots of fields. Includes Smart Refresh functionality in
Professional and Developer Editions.

TOraSQL

Executes SQL statements, PL/SQL blocks, and stored
procedures, which do not return rowsets.

TOraTable

Lets you retrieve and update data in a single table without writing
SQL statements.

TOraStoredProc

Executes stored procedures and functions. Lets you edit cursor
data returned as parameter.

TOraNestedTabl
Component for controlling nested table data.
e
TOraUpdateSQL Lets you tune update operations for a DataSet component.
TOraDataSource

Provides an interface for connecting data-aware controls on aform and ODAC dataset components.

TOraScript

Executes sequences of SQL and PL/SQL statements.

TOraSQLMonitor

Interface for monitoring dynamic SQL execution in ODAC-based
applications.

TConnectDialog

Allows you to build custom prompts for usernames, passwords,
and server names.

TVirtualTable

Dataset that stores data in memory. This component is placedon the Data Access page of the Component palette.

TVirtualDataSet Dataset that processes arbitrary non-tabular data.

ODAC Professional and Developer Edition components
TOraEncryptor© 2019 Devart

Represents data encryption and decryption in client application.

33

Oracle Data Access Components

TOraPackage

Provides a straightforward way to access Oracle packages.

TOraAlerter

Allows you to transfer messages between sessions.

TOraLoader

Allows you to quickly load data into Oracle databases.

TOraTransaction

Provides discrete transaction control over sessions. Can beused to manipulate both simple and distributed transactions.

TOraQueue

Lets you monitor the message queue. Provides an interface forenqueuing and dequeuing messages.

TOraQueueTable Component for managing queue tables.
TOraQueueAdmi
Component for managing queues.
n
TOraChangeNotif
Allows you to use Oracle Database Change Notifications.
icationTOraTrace

Allows you to start and stop the SQL trace for a specified
session. This component provides access to the
DBMS_TRACE package.

TOraErrorHandle
Translates error messages.
r
TOraProvider

Loads data to and from a dataset.

TOraMetaData

Retrieves metadata on specified SQL object.

Transfers data between all types of TDataSet descendants. This
TCRBatchMove component is placed on the Data Access page of theComponent palette.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.

2.7

Hierarchy Chart
Many ODAC classes are inherited from standard VCL/LCL classes. The inheritance hierarchy
chart for ODAC is shown below. The ODAC classes are represented by hyperlinks that point
to their description in this documentation. The description of the standard classes can be© 2019 Devart

General Information

found in the documentation of your IDE.
TObject|—TPersistent|—TComponent||—TCustomConnection© 2019 Devart|||—TCustomDAConnection||||—TOraSession|—TDataSet

|

|

|

|

|—TCustomDADataSet

|

|

|

|

|

|

|

|

|

|—TCustomSmartQuery

|

|

|

|

|—TOraTable

|

|

|

|

|—TSmartQuery

|

|

|

|—TOraQuery

|

|

|

|—TOraStoredProc|||–TOraNestedTable|||—TDAMetaData

|

|

|
|

|
|—TVirtualTable|—TDataSource

|

|

|

|

|

|—TCRBatchMove||—TCustomConnectDialog

|

|

|

|—TCustomDASQL

|

|

|

|—TCustomDASQLMonitor

|

|

|

|—TDALoader

|

|

|

|—TDAScript

|

|

|

|—TDAAlerter|||—TMemDataSet`|—TOraDataSet|—TCustomOraQuery|—TOraMetaData|—TCRDataSource|—TOraDataSource|—TConnectDialog|—TOraSQL|—TOraSQLMonitor|—TOraLoader|—TOraScript|—TOraAlerter

34

35

Oracle Data Access Components||—TCREncryptor

|

|

|

|—TOraChangeNotification||—TOraErrorHandler||—TOraPackage||—TOraQueue||—TOraQueueAdmin||—TOraQueueTable||—TOraTrace||—TOraTransaction|—TOraEncryptor|—TSharedObject|—TBlob||—TCompressedBlob||—TOraLob||—TOraFile|—TOraObject||—TOraArray

|

|

|

|—TOraRef||—TOraXML|—TOraNestTable|—TOraCursor|—TOraInterval|—TOraNumber|—TOraTimeStamp© 1997-2019
Devart. All Rights
Reserved.

2.8

Request Support

DAC Forum

Provide Feedback

Editions
Oracle Data Access Components comes in four basic edition levels: ODAC Standard Edition,
ODAC Professional Edition and ODAC Trial Edition.
ODAC Standard Edition includes the ODAC basic connectivity components and the ODAC
Migration Wizard. ODAC Standard Edition is a cost-effective solution for database application
developers who need general connectivity functionality for Oracle. ODAC Professional Editionshows off the full power of ODAC, enhancing ODAC Standard Edition with support for
Oracle-specific functionality, access to Direct mode for connecting to the Oracle server
directly over TCP/IP, and some advanced connection management features.
© 2019 Devart

General Information

36

ODAC Trial Edition is the evaluation version of ODAC. It includes all the functionality of ODAC
Professional Edition with a trial limitation of 60 days. C++Builder has additional trial limitations.
You can get Source Access to the Client mode implementation of all the component classes
in ODAC by purchasing the special ODAC Professional Edition with Source Code**.
For more information about getting the ODAC edition you want, visit the How to Order section.

ODAC Edition Matrix
FeatureDirect Connectivity
Connection without Oracle client

Desktop Application Development
Windows
macOS
Linux

Mobile Application Development
iOS
Android

Data Access Components
TOraSession
TOraQuery
TOraTable
TOraStoredProc© 2019 DevartStandard

Professional

37

Oracle Data Access Components

TOraUpdateSQLTOraSQL
TOraDataSource
Script executing
TOraScript
Transactions managing
TOraTransaction
Fast data loading into the server
TOraLoader

Advanced Query Components
Expanded field representation
TSmartQuery
Smart refresh in TSmartQuery component

Oracle Specific Components
Oracle packages
TOraPackage
Oracle nested tables
TOraNestedTable
Messaging between sessions and applications
TOraAlerter
Reaction on server side changes on-the-fly
TOraChangeNotification
Oracle advanced queing
TOraQueue
TOraQueueAdmin
TOraQueueTable
PL/SQL tracing
TOraTrace
Obtaining metainformation about database objects
TOraMetaData© 2019 Devart

General Information

Oracle errors handlingTOraErrorHandler

DataBase Activity Monitoring
Monitoring of per-component SQL execution
TOraSQLMonitor

Additional Components
Advanced connection dialog
TConnectDialog
Data encryption and decryption
TOraEncryptor
Advanced DataSet provider
TOraProvider
Data storing in memory table
TVirtualTable
Advanced DBGrid with extended functionality
TCRDBGrid
Records transferring between datasets
TCRBatchMove

Design-Time Features
Enhanced component and property editors
Migration Wizard
DataSet Manager
Oracle Package Wizard

Cross IDE Support
Lazarus and Free Pascal Support *© 2019 Devart

38

39

Oracle Data Access Components* Available only in editions with source code.

© 1997-2019
Devart. All Rights
Reserved.

2.9

Request Support

DAC Forum

Provide Feedback

Licensing
PLEASE READ THIS LICENSE AGREEMENT CAREFULLY. BY INSTALLING OR USING
THIS SOFTWARE, YOU INDICATE ACCEPTANCE OF AND AGREE TO BECOME BOUND
BY THE TERMS AND CONDITIONS OF THIS LICENSE. IF YOU DO NOT AGREE TO THETERMS OF THIS LICENSE, DO NOT INSTALL OR USE THIS SOFTWARE AND
PROMPTLY RETURN IT TO DEVART.

INTRODUCTION
This Devart end-user license agreement ("Agreement") is a legal agreement between you(either an individual person or a single legal entity) and Devart, for the use of ODAC software
application, source code, demos, intermediate files, printed materials, and online or electronic
documentation contained in this installation file. For the purpose of this Agreement, thesoftware program(s) and supporting documentation will be referred to as the "Software".

LICENSE
1. GRANT OF LICENSE
The enclosed Software is licensed, not sold. You have the following rights and privileges,
subject to all limitations, restrictions, and policies specified in this Agreement.
1.1. If you are a legally licensed user, depending on the license type specified in theregistration letter you have received from Devart upon purchase of the Software, you areentitled to either:
install and use the Software on one or more computers, provided it is used by 1 (one) for
the sole purposes of developing, testing, and deploying applications in accordance with thisAgreement (the "Single Developer License"); or
install and use the Software on one or more computers, provided it is used by up to 4 (four)developers within a single company at one physical address for the sole purposes ofdeveloping, testing, and deploying applications in accordance with this Agreement (the"Team Developer License"); or
install and use the Software on one or more computers, provided it is used by developers ina single company at one physical address for the sole purposes of developing, testing, and© 2019 Devart

General Information

40

deploying applications in accordance with this Agreement (the "Site License").
1.2. If you are a legally licensed user of the Software, you are also entitled to:
make one copy of the Software for archival purposes only, or copy the Software onto thehard disk of your computer and retain the original for archival purposes;
develop and test applications with the Software, subject to the Limitations below;
create libraries, components, and frameworks derived from the Software for personal use
only;
deploy and register run-time libraries and packages of the Software, subject to theRedistribution policy defined below.
1.3. You are allowed to use evaluation versions of the Software as specified in the Evaluation
section.
No other rights or privileges are granted in this Agreement.

2. LIMITATIONS
Only legally registered users are licensed to use the Software, subject to all of the conditionsof this Agreement. Usage of the Software is subject to the following restrictions.
2.1. You may not reverse engineer, decompile, or disassemble the Software.
2.2. You may not build any other components through inheritance for public distribution orcommercial sale.
2.3. You may not use any part of the source code of the Software (original or modified) tobuild any other components for public distribution or commercial sale.
2.4. You may not reproduce or distribute any Software documentation without express written
permission from Devart.
2.5. You may not distribute and sell any portion of the Software without integrating it into your
Applications as Executable Code, except Trial edition that can be distributed for free as
original Devart's ODAC Trial package.
2.6. You may not transfer, assign, or modify the Software in whole or in part. In particular, theSoftware license is non-transferable, and you may not transfer the Software installation
package.
2.7. You may not remove or alter any Devart's copyright, trademark, or other proprietary rights
notice contained in any portion of Devart units, source code, or other files that bear such a
notice.

3. REDISTRIBUTION
The license grants you a non-exclusive right to compile, reproduce, and distribute any new
software programs created using ODAC. You can distribute ODAC only in compiled
Executable Programs or Dynamic-Link Libraries with required run-time libraries and© 2019 Devart

41

Oracle Data Access Components

packages.
All Devart's units, source code, and other files remain Devart's exclusive property.

4. TRANSFER
You may not transfer the Software to any individual or entity without express written
permission from Devart. In particular, you may not share copies of the Software under “Single
Developer License” and “Team License” with other co-developers without obtaining proper
license of these copies for each individual.

5. TERMINATION
Devart may immediately terminate this Agreement without notice or judicial resolution in theevent of any failure to comply with any provision of this Agreement. Upon such termination
you must destroy the Software, all accompanying written materials, and all copies.

6. EVALUATION
Devart may provide evaluation ("Trial") versions of the Software. You may transfer or
distribute Trial versions of the Software as an original installation package only. If the Software
you have obtained is marked as a "Trial" version, you may install and use the Software for aperiod of up to 60 calendar days from the date of installation (the "Trial Period"), subject to theadditional restriction that it is used solely for evaluation of the Software and not in conjunction
with the development or deployment of any application in production. You may not use
applications developed using Trial versions of the Software for any commercial purposes.
Upon expiration of the Trial Period, the Software must be uninstalled, all its copies and allaccompanying written materials must be destroyed.

7. WARRANTYThe Software and documentation are provided "AS IS" without warranty of any kind. Devart
makes no warranties, expressed or implied, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose or use.

8. SUBSCRIPTION AND SUPPORTThe Software is sold on a subscription basis. The Software subscription entitles you to
download improvements and enhancement from Devart’s web site as they become available,
during the active subscription period. The initial subscription period is one year from the dateof purchase of the license. The subscription is automatically activated upon purchase, andmay be subsequently renewed by Devart, subject to receipt applicable fees. Licensed usersof the Software with an active subscription may request technical assistance with using the© 2019 Devart

General Information

42

Software over email from the Software development. Devart shall use its reasonableendeavours to answer queries raised, but does not guarantee that your queries or problems
will be fixed or solved.
Devart reserves the right to cease offering and providing support for legacy IDE versions.

9. COPYRIGHTThe Software is confidential and proprietary copyrighted work of Devart and is protected byinternational copyright laws and treaty provisions. You may not remove the copyright noticefrom any copy of the Software or any copy of the written materials, accompanying theSoftware.
This Agreement contains the total agreement between the two parties and supersedes anyother agreements, written, oral, expressed, or implied.

© 1997-2019
Devart. All Rights
Reserved.

2.10

Request Support

DAC Forum

Provide Feedback

Getting Support
This page lists several ways you can find help with using ODAC and describes the ODAC
Priority Support program.

Support Options
There are a number of resources for finding help on installing and using ODAC.
You can find out more about ODAC installation or licensing by consulting the Licensing and
FAQ sections.
You can get community assistance and technical support on the ODAC Community Forum.
You can get advanced technical assistance by ODAC developers through the ODAC
Priority Support program.
If you have a question about ordering ODAC or any other Devart product, please contact
sales@devart.com.

ODAC Priority Support
ODAC Priority Support is an advanced product support service for getting expedited individual
assistance with ODAC-related questions from the ODAC developers themselves. Priority
Support is carried out over email and has two business days response policy. Priority Support
is available for users with an active ODAC Subscription.
To get help through the ODAC Priority Support program, please send an email to© 2019 Devart

43

Oracle Data Access Components

support@devart.com describing the problem you are having. Make sure to include thefollowing information in your message:
The version of Delphi, C++Builder you are using.
Your ODAC Registration number.
Full ODAC edition name and version number. You can find both of these from the ODAC |ODAC About menu in the IDE.
Versions of the Oracle server and client you are using.
A detailed problem description.
If possible, a small test project that reproduces the problem. It is recommended to use
Scott or SYS schema objects only. Please include definitions for all and avoid using thirdparty components.

© 1997-2019
Devart. All Rights
Reserved.

2.11

Request Support

DAC Forum

Provide Feedback

Frequently Asked Questions
This page contains a list of Frequently Asked Questions for Oracle Data Access
Components.
If you have encounter a question with using ODAC, please browse through this list first. If thispage does not answer your question, refer to the Getting Support topic in ODAC help.
Installation and Deployment
1. I'm having a problem with installing ODAC or compiling ODAC-based projects...
You may be having a compatibility issue that shows up in one or more of the following forms:o Get a "Setup has detected already installed DAC packages which are incompatible withcurrent version" message during ODAC installation.
o Get a "Procedure entry point ... not found in ... " message when starting IDE.
o Get a "Unit ... was compiled with a different version of ..." message on compilation.
You can have such problems if you installed incompatible ODAC, SDAC, MyDAC or IBDAC
versions. All these products use common base packages. The easiest way to avoid the
problem is to uninstall all installed DAC products and then download from our site and install
the last builds.
2. What software should be installed on a client computer so that my applications that
use ODAC can run?
To use the full set of Oracle features, the client computer has to have Oracle client© 2019 Devart

General Information

44

software (OCI) installed. If you do not want to install OCI, you can use Direct mode, inwhich ODAC communicates with Oracle server without intermediate libraries. In order to
use the Direct mode, the operating system on the client computer must have TCP/IP
protocol support installed.
3. How can I quickly convert a project from BDE to ODAC?
To quickly migrate your project from BDE you can use the BDE Migration Wizard. To start it,
open your project and choose BDE Migration Wizard from the ODAC menu of your IDE.
Licensing and Subscriptions
1. Am I entitled to distribute applications written with ODAC?
If you have purchased a full version of ODAC, you are entitled to distribute pre-compiled
programs created with its use. You are not entitled to propagate any components inheritedfrom ODAC or using ODAC source code. For more information see the License.rtf file in yourODAC installation directory.
2. Can I create components using ODAC?
You can create your own components that are inherited from ODAC or that use the ODAC
source code. You are entitled to sell and distribute compiled application executables that use
such components, but not their source code and not the components themselves.
3. What licensing changes can I expect with ODAC 6.00?
The basic ODAC license agreement will remain the same. With ODAC 6.00, the ODAC
Edition Matrix will be reorganized and a new ODAC Subscription Program will be introduced.
4. What do the ODAC 6.00 Edition Levels correspond to?
ODAC 6.00 will come in six editions: Trial, Standard, Professional, Professional with Sources,
Developer, and Developer with Sources.
When you upgrade to the new version, your edition level will be automatically updated using
the following Edition Correspondence Table.

Edition Correspondence Table for Upgrading to ODAC 6.00

Old Edition Level- No
Correspondence ODAC Standard© 2019 Devart

New Edition Level
ODAC Standard
EditionODAC Professional

45

Oracle Data Access Components

Edition

EditionODAC Net Edition ODAC Professional
EditionODAC Professional ODAC Professional
Edition
Edition with Sources
ODAC Developer- No
Correspondence - Edition
ODAC Developer- No
Correspondence - Edition with Sources
ODAC Trial Edition ODAC Trial Edition

The feature list for each edition can be found in the ODAC documentation and the ODAC
website.
5. I have a registered version of ODAC. Will I need to pay to upgrade to futureversions?
After ODAC 6.00, all upgrades to future versions are free to users with an active ODAC
Subscription.
Users that have a registration for versions of ODAC prior to ODAC 6.00 will have to firstupgrade to ODAC 6.00 to jump in on the Subscription Program.
6. What are the benefits of the ODAC Subscription Program?
The ODAC ODAC Subscription Program is an annual maintenance and support service for
ODAC users.
Users with a valid ODAC Subscription get the following benefits:o Access to new versions of ODAC when they are releasedo Access to all ODAC updates and bug fixes
o Product support through the ODAC Priority Support programo Notification of new product versions
Priority Support is an advanced product support program which offers you expedited
individual assistance with ODAC-related questions from the ODAC developers themselves.
Priority Support is carried out over email and has a guaranteed two business day response
policy.

© 2019 Devart

General Information

46

The ODAC Subscription Program is available for registered users of ODAC 6.00 and higher.
7. Can I use my version of ODAC after my Subscription expires?
Yes, you can. ODAC version licenses are perpetual.
8. I want a ODAC Subscription! How can I get one?
You can renew your ODAC Subscription on the ODAC Ordering Page. For more information,please contact sales@devart.com.
You will be able to renew your ODAC Subscription by email or on the ODAC website. For
more information, please contact sales@deavrt.com.
9. Does this mean that if I upgrade to ODAC 6 from ODAC 5, I'll get an annual ODAC
Subscription for free?
Yes.
10.How do I upgrade to ODAC 6.00?
To upgrade to ODAC 6.00, you can get a Version Update from the ODAC Ordering Page. For
more information, please contact sales@devart.com.
Performance
1. How productive is ODAC?
From time to time we compare ODAC with other products, and ODAC always takes firstplace. For more information, please refer to the ODAC performance comparison results
posted on the ODAC website
2. Why does the Locate function work so slowly the first time I use it?
Locate is performed on the client. So if you had set FetchAll to False when opening yourdataset, cached only some of the rows on the client, and then invoked Locate, ODAC will
have to fetch all the remaining rows from the server before performing the operation. On
subsequent calls, Locate should work much faster.
If the Locate method keeps working slowly on subsequent calls or if you are working with
FetchAll=True, try the following. Perform local sorting by a field that is used in the Locate
method. Just assign corresponding field name to the IndexFieldNames property.
How To1. How can I find out which version of ODAC I am using ?
You can determine your ODAC version number in several ways:o During installation of ODAC, consult the ODAC Installer screen.
© 2019 Devart

47

Oracle Data Access Componentso After installation, see the history.html file in your ODAC installation directiory.
o At design-time, select Oracle | About ODAC from the main menu of your IDE.
o At run-time, check the value of the OdacVersion and DACVersion constants.
2. How can I stop the cursor from changing to an hour glass during query execution?
Just set the DBAccess.ChangeCursor variable to False anywhere in your program. The
cursor will stop changing after this command is executed.
3. How can I execute a query saved in the SQLInsert, SQLUpdate, SQLDelete, or
SQLRefresh properties of a ODAC dataset?
The values of these properties are templates for query statements, and they cannot be
manually executed. Usually there is no need to fill these properties because the text of thequery is generated automatically.
In special cases, you can set these properties to perform more complicated processing
during a query. These properties are automatically processed by ODAC during the executionof the Post, Delete, or RefreshRecord methods, and are used to construct the query to theserver. Their values can contain parameters with names of fields in the underlying data
source, which will be later replaced by appropriate data values.
For example, you can use the SQLInsert template to insert a row into a query instance asfollows.
o Fill the SQLInsert property with the parametrized query template you want to use.
o Call Insert.
o Initialize field values of the row to insert.
o Call Post.
The value of the SQLInsert property will then be used by ODAC to perform the last step.
Setting these properties is optional and allows you to automatically execute additional SQL
statements, add calls to stored procedures and functions, check input parameters, and/or
store comments during query execution. If these properties are not set, the ODAC dataset
object will generate the query itself using the appropriate insert, update, delete, or refresh
record syntax.
4. My program allows users to edit records directly in a DBGrid instance. How can I
disable record deletion?
If TOraQuery acts as TDataSet, it is very simple to prohibit deleting, inserting and/or
updating of records. Simply clear the relevant property (SQLDelete,© 2019 Devart

General Information

48

SQLInsert,SQLUpdate). The action with empty SQL statement will not be allowed.
5. How do I allow users to delete, insert, and edit records (e.g. in DBGrid), but ensure
deletions are not represented in the database?
Assign the following PL/SQL block to TOraQuery.SQLDelete:
begin
Null;
end;
6. How can I tune the NUMBER fields definition in ODAC?
There are three typed constants in the OraClasses.pas module: IntegerPrecision,
LargeIntPrecision and FloatPrecision. Using the values of these constants and the
EnableIntegers and EnableNumbers options, the Oracle NUMBER type is mapped to
ODAC field classes as follows.

Field
class
Precision <= IntegerPrecision, Scale = 0, TIntegerFi
EnableIntegers = True
eld
IntegerPrecision < Precision <=TLargeInt
LargeIntPrecision, Scale = 0,
Field
EnableIntegers = True
Precision > FloatPrecision, Scale > 0,
TOraNum
EnableNumbers = True
berField
TFloatFiel
In other casesdConditions

The default values of these constants are:IntegerPrecision = 9, LargeIntPrecision = 0, FloatPrecision = 15
7. How to enable support of TLargeIntField?
Set the value of the global constant LargeIntPrecision to 18.
General Questions
1. What are the advantages of ODAC compared to BDE?
BDE provides a more or less uniform way for accessing different servers (SQL Server,
MySQL, Oracle and so on)
ODAC is a set of components optimized for working specifically with Oracle, and has aserver-specific component interface and advanced design-time support.
As a result, there are a number of reasons why ODAC may be better than BDE for your© 2019 Devart

49

Oracle Data Access Components

Oracle-based application. Some of them are enumerated here. For more information refer to
the ODAC feature list.
o Incomparably higher speed of data access, fetching, and processingo Possibility to individually adjust and optimize execution parameters for every queryo Complete support of PL/SQLo Return of cursor from a stored procedure or anonymous PL/SQL block (by parameter)o Return of PL/SQL result sets from a stored procedure or anonymous PL/SQL blocko Support for asynchronous execution of querieso Possibility to break the execution of long-duration querieso Built-in system for debugging in run-timeo Convenient and simple-to-use standardized error processing mechanismo No need to install and configure BDE on client machines during deployment
2. What happened to the ODAC Net option and the TOraSession.Options.Net
property?
As of ODAC 6.00, the ODAC Net Option has been renamed to ODAC Direct mode, andTOraSession.Options.Net has been replaced with TOraSession.Options.Direct. You canconfigure ODAC to connect directly to Oracle over TCP/IP by setting
TOraSession.Options.Direct to True.
Note TOraSession.Options.Net has been retained for backwards-compatibility. This property
is depreciated as of ODAC 6.00. Use TOraSession.Options.Direct instead.
3. Are the ODAC connection components thread-safe?
In Client mode, ODAC is thread-safe. In Direct mode, we do not guarantee complete threadsafety and recommend setting up a separate Connection set for each thread that uses
ODAC.
4. Behaviour of my application has changed when I upgraded ODAC. How can I
restore the old behaviour with the new version?
We always try to keep ODAC compatible with previous versions, but sometimes we have tochange behaviour of ODAC in order to enhance its functionality, or avoid bugs. If either ofchanges is undesirable for your application, and you want to save the old behaviour, pleaserefer to the "Compatibility with previous versions" topic in ODAC help. This topic describes
such changes, and how to revert to the old ODAC behaviour.

© 2019 Devart

General Information50

5. When editing a DataSet, I get an exception with the message 'Update failed. Found%d records.' or 'Refresh failed. Found %d records.'
This error occurs when the database server is unable to determine which record to modify ordelete. In other words, there are either more than one record or no records that suit the
UPDATE criteria. Such situation can happen when you omit the unique field in a SELECT
statement (TCustomDADataSet.SQL) or when another user modifies the table
simultaneously. This exception can be suppressed. Refer to TCustomDADataSet.Options
topic in ODAC help for more information.
6. I would like to use MIDAS technology. Does ODAC support the IProvider interface?
Yes. Check out the Provider property of the TOraProvider component.
7. What's the difference between TOraQuery, TSmartQuery, and TOraTable?
All these components are inherited from TDataSet and have all its capabilities. However,each component has a number of differences.
o TOraQuery represents the most general way of executing queries and editing data. It is
the most universal component, while TSmartQuery and TOraTable are designed forconvenience only.
o TSmartQuery includes all the functionality of TOraQuery component, and provides
additional features: expand fields, that lets all data controls be aware of all the fields
belonging to updating table an not only those requested in SELECT clause, and smart
refresh (in Professional and Developer editions only).
o TOraTable makes it unnecessary to write SQL statements to perform both data updates
and data selection and emulates working with a local table. With TOraTable, you do nothave to use SQL at all, and only have to specify the name of the appropriate table orview.
8. Can ODAC and BDE functions be used side-by-side in a single application?
Yes. There is no problem with using both ODAC and BDE functions in the same
application.

© 1997-2019
Devart. All Rights
Reserved.

3

Request Support

DAC Forum

Provide Feedback

Getting Started
This section introduces Oracle Data Access Components. It contains the information on how
to install Oracle Data Access Components, quick walktroughs to get started developing© 2019 Devart

51

Oracle Data Access Components

applications with it, information on technical licensing and deployment, and brief description of
ODAC documentation and samples.
Installation
Migration Wizard
Logging On to Server
Creating Database Objects
Retrieving and Modifying Data
Inserting Data Into Tables
Working With Oracle Stored Procedures
Using Transactions© 1997-2019
Devart. All Rights
Reserved.

3.1

Request Support

DAC Forum

Provide Feedback

Installation
This topic contains the environment changes made by the ODAC installer. If you are having
problems with using ODAC or compiling ODAC-based products, check this list to make surethat your system is properly configured.
Compiled versions of ODAC are installed automatically by the ODAC Installer for all
supported IDEs except for Lazarus. Versions of ODAC with Source Code must be installed
manually. Installation of ODAC from sources is described in the supplied ReadmeSrc.html
file.

Table of Contents
1. Before installing ODAC
2. Installed packages
o Delphi/C++Builder Win32 project packages
o Additional packages for using ODAC managers and wizards
3. Environment Changes
o Delphio C++Buildero Lazarus
4. Installation of Additional Components and Add-ins
o TOraProvidero DBMonitor
5. Uninstalling© 2019 DevartGetting Started

52o Delphi and C++Buildero Lazarus

Before installing ODAC ...
Please read our Compatibility page and make sure that your system satisfies therequirements.
Two versions of ODAC cannot be simultaneously installed for the same IDE, and, since theDevart Data Access Components products have some shared bpl files, newer versions of
ODAC may be incompatible with older versions of MyDAC, IBDAC, and SDAC.
So before installing a new version of ODAC, uninstall any previous version of ODAC you may
have, and check if your new install is compatible with other Devart Data Access Components
products you have installed. For more information please see Using several products in one
IDE. If you run into problems or have any compatibility questions, please email
odac@devart.com
Note: You can avoid performing ODAC uninstallation manually when upgrading to a newversion by directing the ODAC installation program to overwrite previous versions. To do this,execute the installation program from the command line with a /force parameter (Start |Run and type odacXX.exe /force, specifying the full path to the appropriate version of theinstallation program).

Installed packages
Note:%ODAC% denotes the path to your ODAC installation directory.

Delphi/C++Builder Win32 project packages
Name
dacXX.bpl
dcldacXX.bpl
dacvclXX.bpl*
odacXX.bpl
dclodacXX.bpl
odacvclXX.bpl*
oraprovXX.bpl
crcontrolsXX.bpl© 2019 Devart

Description
Location
DAC run-time package Windows\System32
DAC design-time
Delphi\Binpackage
DAC VCL support
Delphi\Binpackage
ODAC run-time package Windows\System32
ODAC design-time
Delphi\Binpackage
VCL support package
Delphi\Bin
TOraProvider
Delphi\Bincomponent
TCRDBGrid component Delphi\Bin53Oracle Data Access Components

Additional packages for using ODAC managers and wizards
Name
Description
datasetmanagerXX. DataSet Manager
bpl
package
ODAC BDE Migration
oramigwizardXX.dll
wizardLocation
Delphi\Bin%ODAC%\Bin

Environment Changes
To compile ODAC-based applications, your environment must be configured to have accessto the ODAC libraries. Environment changes are IDE-dependent.
For all instructions, replace %ODAC% with the path to your ODAC installation directory

Delphi%ODAC%\Lib should be included in the Library Path accessible from Tools | Enviroment
options | Library.
The ODAC Installer performs Delphi environment changes automatically for compiled
versions of ODAC.

C++Builder
C++Builder 6:$(BCB)\ODAC\Lib should be included in the Library Path of the Default Project Options
accessible from Project | Options | Directories/Conditionals.
$(BCB)\ODAC\Include should be included in the Include Path of the Default Project Options
accessible from Project | Options | Directories/Conditionals.

C++Builder 2006 and higher:$(BCB)\ODAC\Lib should be included in the Library search path of the Default Project
Options accessible from Project | Default Options | C++Builder | Linker | Paths and Defines.
$(BCB)\ODAC\Include should be included in the Include search path of the Default
Project Options accessible from Project | Default Options | C++Builder | C++ Compiler |Paths and Defines.
The ODAC Installer performs C++Builder environment changes for compiled versions of
ODAC automatically.

LazarusThe ODAC installation program only copies ODAC files. You need to install ODAC packages© 2019 DevartGetting Started

54

to Lazarus IDE manually. Open %ODAC%\Source\Lazarus1\dclodac10.lpk (for Trial version%ODAC%\Packages\dclodac10.lpk) file in Lazarus and press the Install button. After that
Lazarus IDE will be rebuilded with ODAC packages.
Do not press the Compile button for the package. Compiling will fail because there are no
ODAC sources.
To check that your environment has been properly configured, try to compile one of the demo
projects included with ODAC. The ODAC demo projects are located in %ODAC%/Demos.

Installation of Additional Components and Add-ins
TOraProvider
If you use Delphi Enterprise Edition, Delphi Architect Edition, or C++Builder Enterprise
Edition, you can install the TOraProvider component by compiling and installing theoraprovXX.bpk package.

DBMonitor
DBMonitor is a an easy-to-use tool to provide visual monitoring of your database applications.
It is provided as an alternative to Borland SQL Monitor which is also supported by ODAC.
DBMonitor is intended to hamper an application that is being monitored as little as possible.
For more information, visit the DBMonitor page online.

Uninstalling
To uninstall the Compiled versions of ODAC, select Settings -> Control Panel -> Add orRemove Programs from the Start menu (Windows XP and earlier) or select Control Panelfrom the Start menu and click Uninstall a program in the Control Panel window (Windows
Vista and higher). Then select ODAC from the installed software list and click Uninstall(Windows XP and earlier) or Uninstall/Change (Windows Vista and higher).

Delphi and C++Builder
To uninstall Source versions of ODAC, select Install Packages... from the Components
menu and remove the following packages:
Devart Controls (CrControlsXXX.bpl)
Devart Data Access Components (dcldavXXX.bpl)
Devart Data Access GUI Related Components (dacvclXXX.bpl)
Devart DataSet Manager (DataSetManagerXXX.bpl)
Oracle Data Access Components (dclodacXXX.bpl)
Oracle Data Access GUI Related Components (odacvclXXX.bpl)© 2019 Devart55

Oracle Data Access Components

OraProvider Package (oraprovXXX.bpl)

Lazarus
To uninstall Source versions of ODAC, start the IDE, select Install/Uninstall Packages fromthe Packages menu, and remove the following packages.
dac10 xx.xx.xx.xx
dacvcl10 xx.xx.xx.xx
dcldac10 xx.xx.xx.xx
dclodac10 xx.xx.xx.xx
odac10 xx.xx.xx.xx
odacvxl10 xx.xx.xx.xx
After removing packages, you must also remove all the *dac*.* files from the Windows\System32, Delphi\Bin and delethe the %ODAC% folder.

© 1997-2019
Devart. All Rights
Reserved.

3.2

Request Support

DAC Forum

Provide Feedback

Migrating from BDE and DOA
Note: Migration Wizard is available only for Delphi IDE and is not available for C++Builder.
Migration Wizard allows you to convert your BDE or DOA projects to ODAC. This wizard
replaces BDE or DOA components in the specified project (dfm-and pas-files) with ODAC
ones.
To convert a project, perform the following steps.
Select Migration Wizard from ODAC menu
Select Replace BDE components to replace the corresponding components with ODAC
ones and click the Next button. If you need to replace DOA components, select DOA fromthe drop-down list on the right and click Next.
Select the location of the files to search - current open project or disc folder.
If you have selected Disc folder on the previous step, specify the required folder and specify
whether to process subfolders. Press the Next button.
Select whether to make backup (it is highly recommended to make a backup), backup
location, and log parameters, and press the Next button. Default backup location isRBackup folder in your project folder.
Check your settings and press the Finish button to start the conversion operation.
The project should be saved before conversion. You will be asked before saving it. Click© 2019 DevartGetting Started

56

Yes to continue project conversion.
After the project conversion it will be reopened.
The Wizard just replaces all standard BDE components. Probably you will need to makesome changes manually to compile your application successfully.
If some problems occur while making changes, you can restore your project from backup file.
To do this, perform the following steps.
Select Migration Wizard from ODAC menu
Select Restore original files from backup and press the Next button.
Select the backup file. By default it is RExpert.reu file in RBackup folder of your converted
project. Press the Next button.
Check your settings and press the Finish button to start the conversion operation.
Press Yes in the dialog that appeared.
Your project will be restored to its previous state.

© 1997-2019
Devart. All Rights
Reserved.

3.3

Request Support

DAC Forum

Provide Feedback

Logging On To ServerContents
Requirements
General information
Creating OraSessiono Design time creationo Run time creation
Opening connection
Closing connection
Modifying connection
Additional information
See Also

Requirements
In order to connect to Oracle server you need the server itself running, ODAC installed and
IDE running. If you have Oracle Client Software installed and want to use it, you need to know
TNS alias name, login and password. If you do not wish to use OCI, you have to know hostname or IP address, Oracle System Identifier (SID) or Oracle Servise Name, port, login and© 2019 Devart

57

Oracle Data Access Components

password.

General information
To establish a connection to server you have to provide some connection parameters to
ODAC. This information is used by OraSession component to find the server and login withcredentials of your account. The parameters are represented as connection string. You cancompose the connection string manually or have ODAC construct it for you.
There are two ways to connect to server: with and without Oracle Client Interface. This iscontrolled by Direct property. It indicates whether the Oracle Client Interface will be used forconnecting to server. By default Direct mode is disabled to preserve maximal functionality.
Switch to Direct mode if you want to work in a system without Oracle Client Software
installed.

Creating OraSession
Design time creation
The following assumes that you have IDE running, and you are currently focused on a form
designer.
1. Find the OraSession component on the ODAC tab of the component palette.
2. Double-click the component. Notice that new object appears on the designer underneaththe form. If this is first time you create the OraSession in this application it is named
OraSession1.
3. Click on the OraSession1 object and press F11 to focus on object's properties. Or doubleclick on OraSession1 to open the dialog.
4. If you connect through OCI, in the Server property provide TNS alias of the server.
5. If you use Direct mode, perform the following assignments:o set Direct to trueo Set the Server property to a string that contains the host address of the database server,
port number, and the Oracle System Identifier (SID) or Oracle Servise Name in thefollowing format: Host:Port:SID or Host:Port:sn=ServiceName
6. In the Username property specify your login. For example, scott.
7. In the Password property specify your password. For example, tiger.

Run time creation
Same operations performed in runtime look as follows (note that you have to add DB,
DBAccess, Ora units to the uses clause):[Delphi OCI]

© 2019 DevartGetting Started

58

uses DB, DBAccess, Ora;...
var
OraSession1: TOraSession;
begin
OraSession1 := TOraSession.Create(nil);
OraSession1.Server := 'ORASERVER';
OraSession1.Username := 'SCOTT';
OraSession1.Password := 'TIGER';[Delphi Direct]
uses DB, DBAccess, Ora;...
var
OraSession1: TOraSession;
begin
OraSession1 := TOraSession.Create(nil);
OraSession1.Options.Direct := True;
OraSession1.Server := 'LOCALHOST:1521:ORASERVER';
OraSession1.Username := 'SCOTT';
OraSession1.Password := 'TIGER';[C++ Builder OCI]
#pragma link "DBAccess"#pragma link "Ora"...
TOraSession *OraSession1 = new TOraSession(NULL);
OraSession1->Server = "ORASERVER";
OraSession1->Username = "SCOT";
OraSession1->Password = "TIGER";[C++ Builder Direct]#pragma link "DBAccess"#pragma link "Ora"...
TOraSession *OraSession1 = new TOraSession(NULL);
OraSession1->Options->Direct = True;
OraSession1->Server = "LOCALHOST:1521:ORASERVER";
OraSession1->Username = "SCOT";
OraSession1->Password = "TIGER";
You can do this all in single assignment. It actually does not matter whether connection stringis assigned directly or composed with particular properties. After you assign a value toConnectionString property all other properties are populated with parsed values. So you canchoose what is more convenient for you.
[Delphi OCI]
OraSession1.ConnectString := 'SCOTT/TIGER@ORASERVER';[Delphi Direct]
OraSession1.ConnectString := 'SCOTT/TIGER@LOCALHOST:1521:ORASERVER';[C++ Builder OCI]
© 2019 Devart

59

Oracle Data Access Components

OraSession1->ConnectString = "SCOTT/TIGER@ORASERVER';[C++ Builder Direct]
OraSession1->ConnectString = "SCOTT/TIGER@LOCALHOST:1521:ORASERVER';

Opening connection
Opening a connection is as simple as that:[Delphi]
OraSession1.Connect;[C++ Builder]
OraSession1->Connect();
Of course, the OraSession1 must have valid connection string assigned earlier. When you
call Connect, ODAC tries to find the host and connect to server. If any problem occurs it
raises an exception with brief explanation on what is wrong. Finally, when connection isestablished, the Connect method returns and Connected property is changed to True.
In design time you can connect to server in few steps:
1. In the dialog window provide necessary logon information.
2. Click Connect button to establish connection.
Or you can simply change Connected property to True in Properties window to establish
connection using current connection string.

Closing connection
To close a connection call its Disconnect method, or set its Connected property to False.
The following example summarizes aforementioned information and shows how to create,
setup, open, use and then close the connection.
[Delphi]var
OraSession1: TOraSession;
begin
OraSession1 := TOraSession.Create(nil);
OraSession1.ConnectString := 'SCOTT/TIGER@ORASERVER';
OraSession1.Connect;
ShowMessage(OraSession1.OracleVersion);
OraSession1.Disconnect;[C++ Builder]#pragma link "DBAccess"#pragma link "Ora"...
TOraSession *OraSession1 = new TOraSession(NULL);
OraSession1->Options->Direct = True;© 2019 DevartGetting Started

60

OraSession1->Server = "LOCALHOST:1521:ORASERVER";
OraSession1->Username = "SCOT";
OraSession1->Password = "TIGER";

Modifying connection
You can modify connection by changing properties of OraSession object. Keep in mind thatwhile some of the properties can be altered freely, most of them close connection when newvalue is assigned. For example, if you change Server property, it gets closed immediately,
and you have to reopen it manually.

Additional information
ODAC has wide set of features you can take advantage of. The following list enumerates
some of them so you can explore the advanced techniques to achieve better performance,balance network load or enable additional capabilities.
Asynchronous connection opening Connection pooling (refer to MSDN documentation for
information about connection pooling).
Asynchronous connection opening
Connection pooling

See Also
TOraSession© 1997-2019
Devart. All Rights
Reserved.

3.4

Request Support

DAC Forum

Provide Feedback

Creating Database Objects
This tutorial describes how to create tables, stored procedures and other objects at Oracle
server.

Contents
Requirements
General information
Using SQL*PlusUsing dbForge Studio for Oracle
Additional information

Requirements
In order to create database objects you have to connect to server. This process is described© 2019 Devart

61

Oracle Data Access Components

in details in the tutorial Logging onto the server.

General information
Database objects are created using Data Definition Language (DDL), which is a part of SQL.
The DDL statements can be executed on server by account that has necessary privileges.
There are two ways to manipulate a database. You can build DDL statements manually andrun them within Oracle SQL*Plus or component like OraQuery. Another way is to use IDE visual shells that provide graphical user interface to manage database. We will discuss bothways.

Using SQL*Plus
1. Launch the SQL*Plus and authorize yourself.
2. Type the following code and press Enter. This will create first of the tables we'll use fortutorial purposes. :CREATE TABLE dept (deptno INT PRIMARY KEY,
dname VARCHAR2(14),loc VARCHAR2(13))/
3. Run the following query. This is another table we'll use.
CREATE TABLE emp (
empno INT PRIMARY KEY,
ename VARCHAR2(10),job VARCHAR2(9),mgr INT,
hiredate DATE,
sal FLOAT,
comm FLOAT,
deptno INT REFERENCES dept)/
4. These two tables are enough to demonstrate basic functionality. Now you can type exit toexit the SQL*Plus.

Using dbForge Studio for Oracle
Sometimes it is very handy to modify data in design time. For more details, refer to theIntegration with dbForge Studio for Oracle section that describes one of the ways to edit data
in a grid.

Additional information
Actually there are lots of ways to create tables on server. Any tool or component that is© 2019 DevartGetting Started

62

capable of running a SQL query, can be used to manage database objects. For example,
OracleCommand suits fine for creating objects one by one, while OracleScript is designed forexecuting series of DDL/DML statements. For information on DDL statements syntax refer toOracle documentation.

© 1997-2019
Devart. All Rights
Reserved.

3.5

Request Support

DAC Forum

Provide Feedback

Retrieving and Modifying Data
Introducing
This tutorial describes how to use OraQuery component.

Requirements
This walkthrough supposes that you know how to connect to server, how to create thenecessary objects on the server, and how to insert the data to the created tables.

Retrieving and Updating Data
In this sample we are using OraQuery to retrieve and manipulate data. For more information,refer to the description of this class in our documentation.
[Delphi]program Project1;{$APPTYPE CONSOLE}
uses
SysUtils,
DB,
DBAccess,Ora;
procedure PrintDept(OraSession: TOraSession);var
OraQuery:TOraQuery;
i: integer;
begin
OraQuery := TOraQuery.Create(nil);
OraQuery.Session := OraSession;
OraQuery.SQL.Text := 'SELECT * FROM dept';
try
OraQuery.Open;for i:= 0 to OraQuery.Fields.Count - 1 do
Write(OraQuery.Fields[i].DisplayName+#09);
WriteLn;
while not OraQuery.Eof do
begin
for i:= 0 to OraQuery.Fields.Count - 1 do
Write(OraQuery.Fields[i].AsString+#09);© 2019 Devart

63

Oracle Data Access Components

WriteLn;
OraQuery.Next;
end;
finally
OraQuery.close;
OraQuery.Free;
end;
end;
procedure ModifyDept(OraSession: TOraSession; SQLText: string; action: strin
var
OraQuery:TOraQuery;
begin
OraQuery := TOraQuery.Create(nil);
OraQuery.Session := OraSession;
OraQuery.SQL.Text := SQLText;
try
OraQuery.Execute;Writeln;write(format('Rows in DEPT %s: %d', [action,OraQuery.RowsAffected]));finally
OraQuery.Free;
end;
end;
var
OraSession: TOraSession;
begin
OraSession := TOraSession.Create(nil);
OraSession.ConnectString := 'SCOTT/TIGER@ORCL1020';
try
OraSession.Connect;
PrintDept(OraSession);
ModifyDept(OraSession,'UPDATE DEPT SET LOC=''VEGAS'' WHERE DEPTNO > 20',
ModifyDept(OraSession, 'INSERT INTO dept (deptno, dname, loc) VALUES (50
ModifyDept(OraSession,'DELETE FROM dept WHERE deptno = 50','deleted');Readln;finally
OraSession.Free;
end;
end.
[C++ Builder]#include <vcl.h>#pragma hdrstop#include <tchar.h>#include <stdio.h>#include <DBAccess.hpp>#include <Ora.hpp>#pragma argsused
void PrintDept(TOraSession *OraSession){
TOraQuery *OraQuery = new TOraQuery(NULL);
OraQuery->SQL->Text = "SELECT * FROM dept";
OraQuery->Session = OraSession;
int i;
try{© 2019 DevartGetting Started

64

OraQuery->Open();for(i = 0; i< OraQuery->Fields->Count; i++)printf("%s\t",OraQuery->Fields->operator [](i)->DisplayName.t_str());
printf("\n");while (!OraQuery->Eof){for(i = 0; i< OraQuery->Fields->Count; i++)printf("%s\t",OraQuery->Fields->operator [](i)->AsString.t_str());
printf("\n");OraQuery->Next();}}__finally{
OraQuery->Free();}}void ModifyDept(TOraSession *OraSession, String SQLText, String Action){
TOraQuery *OraQuery = new TOraQuery(NULL);
OraQuery->SQL->Text = SQLText;
OraQuery->Session = OraSession;try{
OraQuery->Execute();printf("Rows in DEPT %s: %d", Action.t_str(), OraQuery->RowsAffected);
printf("\n");}__finally{
OraQuery->Free();}}
int _tmain(int argc, _TCHAR* argv[]){
TOraSession *OraSession = new TOraSession(NULL);
int i;
try{
OraSession->ConnectString = "SCOTT/TIGER@ORCL1020";
OraSession->Connect();
PrintDept(OraSession);
ModifyDept(OraSession, "UPDATE DEPT SET LOC='VEGAS' WHERE DEPTNO > 20","up
ModifyDept(OraSession, "INSERT INTO dept (deptno, dname, loc) VALUES (50,'
ModifyDept(OraSession, "DELETE FROM dept WHERE deptno = 50","deleted");system("pause");}__finally{
OraSession->Free();}return 0;}© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

65

3.6

Oracle Data Access Components

Inserting Data Into Tables
This tutorial describes how to use OraQuery component to insert data into tables by meansof executing SQL queries.
Requirements
General information
Inserting data in run time
Design time setup
Additional information

Requirements
This walkthrough supposes that you know how to connect to server (tutorial Logging onto theserver) and that necessary objects are already created on the server (tutorial Creating
database objects).

General information
Data on server can be modified (inserted, changed or deleted) using Data Manipulation
Language (DML), which is a part of SQL. The DML statements can be executed on server byaccount that has necessary privileges.
There are two ways to manipulate a database. You can build DML statements manually andrun them within some component like OraQuery. Another way is to use design-time featuresthat provide graphical user interface to manage database. We will discuss both ways.
The goal of this tutorial is to insert the following data into tables dept and emp:
Table dept

deptno

dname

loc

10
20
30
40

ACCOUNTINGRESEARCH
SALES
OPERATIONSNEW YORKDALLASCHICAGOBOSTON

Table emp

empno

ename

job

mgr

7369

SMITH

CLERK

7902

7499

ALLEN

7521

WARD

SALESM 7698
AN
SALESM 7698
AN

hiredate
17.12.1980
20.02.19
81
22.02.19
81

sal

comm

deptno

800

NULL

20

1600

300

30

1250

500

30

© 2019 DevartGetting Started

7566
7654
7698
7782
7788
7839
7844

MANAGE 7839
R
MARTIN SALESM 7698
AN
BLAKE MANAGE 7839
R
CLARK MANAGE 7839
R
SCOTT ANALYS 7566
T
PRESID NULLKING
ENT
TURNER SALESM 7698
AN
JONES

7876

ADAMS

CLERK

7788

7900

JAMES

CLERK

7698

7902

FORD

ANALYS 7566
T

7934

MILLER

CLERK

7782

02.04.19
81
28.09.19
81
01.05.19
81
09.06.19
81
13.07.19
87
17.11.19
81
08.09.19
81
13.07.19
87
03.12.19
81
03.12.19
81
23.01.19
82

2975

NULL

20

1250

1400

30

2850

NULL

30

2450

NULL

10

3000

NULL

20

5000

NULL

10

1500

0

30

1100

NULL

20

950

NULL

30

3000

NULL

20

1300

NULL

10

66

Inserting data in run time
To insert the first row into table dept you can use the following statement:
INSERT INTO dept (deptno, dname, loc) VALUES (10,'ACCOUNTING','NEW YORK')
The following code fragment executes the query:[Delphi]var
OraSession1: TOraSession;
OraQuery1: TOraQuery;
begin
OraSession1 := TOraSession.Create(nil);
OraQuery1:= TOraQuery.Create(nil);
OraSession1.ConnectString := 'SCOTT/TIGER@ORASERVER';
OraQuery1.SQL.Text := 'INSERT INTO dept (deptno, dname, loc) VALUES (10,''
OraQuery1.Session := OraSession1;
OraSession1.LoginPrompt := False;try
OraSession1.Connect;try
OraQuery1.Execute;
ShowMessage(IntToStr(OraQuery1.RowsAffected)+' rows were affected.');except© 2019 Devart

67

Oracle Data Access Components

ShowMessage('Error encountered during INSERT operation.');end;
finally
OraSession1.disconnect;
OraQuery1.Free;
OraSession1.Free;
end;[C++ Builder]

TOraSession *OraSession1 = new TOraSession(NULL);
TOraQuery *OraQuery1 = new TOraQuery(NULL);
OraSession1->ConnectString = "SCOTT/TIGER@ORCL1020";
OraQuery1->SQL->Text = "INSERT INTO dept (deptno, dname, loc) VALUES (10,'OraQuery1->Session = OraSession1;
OraSession1->LoginPrompt = false;try{
OraSession1->Connect();try{
OraQuery1->Execute();ShowMessage(IntToStr(OraQuery1->RowsAffected)+" rows were affected.");}catch(const Exception& e){
ShowMessage("Error encountered during INSERT operation.");}}__finally{
OraSession1->Disconnect();
OraQuery1->Free();
OraSession1->Free();}
The sample first creates a connection with hardcoded connection string. Then it creates
OraQuery object, assigns the query text and connection to the OraQuery instance.
Connection is opened then. The Execute method of OraQuery runs SQL statement in the
Text property. The RowsAffected property stores the number of rows affected by the query.
This method is not intended to run SELECT statements. We will discuss retrieving data inother tutorials.
If the query is executed successfully you are notified about number of affected rows. If someerror occurs you get the error message. The connection is closed anyway. It is
recommended that you use try ... finally clauses to make sure the connections areclosed properly.

Design time setup
Same operations in design time include following steps:
Place OraSession component on a designer.

© 2019 DevartGetting Started

68

1. Setup its properties and open connection by changing the Connected property to True or
double-click on the component, in the dialog window provide necessary logon informationand press Connect button.
2. Place OraQuery component on the designer.
3. In its Session property select name of the OraSession instance on the designer.
4. Click on the ellipsis in SQL property in Properties window double-click the component in
the OraQuery editor on the SQL tab and enter the following query:
INSERT INTO dept VALUES (20,'SALES','DALLAS')
and press the Execute button.

Additional information
Actually there are lots of ways to insert data into tables. Any tool or component that is capableof running a SQL query, can be used to manage data. Some components are best for
performing certain tasks. For example, OraLoader is the fastest way to insert data, OraScript
is designed for executing series of statements. For more information on these components
refer to ODAC reference.

See Also
Getting Started
dbForge Studio for Oracle
OraQuery Class
OraLoader Class
OraScript Class© 1997-2019
Devart. All Rights
Reserved.

3.7

Request Support

DAC Forum

Provide Feedback

Working With Oracle Stored ProceduresThis section describes how to create and use Oracle stored procedures and functions withODAC.
It supposes that you know how to connect to server, how to create the necessary objects on
the server, and how to manipulate with the data stored in database tables. The section
describes stored procedures using for typed DataSets.
This section contains the following articles:
Stored Procedures - General Information
Contains general information about stored procedures and functions and describes how tocreate them.
Using Stored Procedures via the TOraStoredProc Class© 2019 Devart

69

Oracle Data Access Components

Contains an information about using stored procedures with the help of TOraStoredProc
class.
Using Package Procedures
Describes approaches of the stored procedure usage when they are included into the
Oracle packages.

See Also
Stored Procedures - General Information
Using Stored Procedures via the TOraStoredProc class
Using Package Procedures© 1997-2019
Devart. All Rights
Reserved.
3.7.1

Request Support

DAC Forum

Provide Feedback

Stored Procedures - General Information
This section contains information about general aspects of stored procedures usage.
A stored procedure is a schema object that consists of a set of SQL statements and other
PL/SQL constructs, grouped together, stored in the database, and run as a unit to solve a
specific problem or perform a set of related tasks. Procedures let you combine the ease andflexibility of SQL with the procedural functionality of a structured programming language.
Large or complex processing that might require the execution of several SQL statements ismoved into stored procedures, and all applications call the procedures only.
Objects similar to stored procedures are stored functions. Almost everything that is true forprocedures, holds for functions as well. The main difference between these objects is thatfunction has a return value, and procedure has not.
A stored procedures and functions may have input, output, and input/output parameters.
Input parameter is a parameter whose value is passed into a stored procedure/function
module. The value of an IN parameter is a constant; it can't be changed or reassigned within
the module.
For example, the following procedure inserts a row into the Dept table:

CREATE PROCEDURE dept_insert (pDeptno INTEGER, pDname VARCHAR2, pLoc VARCHAR
BEGIN
INSERT INTO dept(deptno, dname, loc) VALUES (pDeptno, pDname, pLoc);
END;
It needs to receive the values to be inserted into the new record, and thus the procedure has
three input parameters, corresponding to each field of the table. The procedure may be
executed inside a PL/SQL block like follows:
begin
dept_insert (10, 'Accounting', 'New York');end;© 2019 DevartGetting Started

70

Output parameter is a parameter whose value is passed out of the stored procedure/function
module, back to the calling PL/SQL block. An OUT parameter must be a variable, not a
constant. It can be found only on the left-hand side of an assignment in the module. You
cannot assign a default value to an OUT parameter outside of the module's body. In otherwords, an OUT parameter behaves like an uninitialized variable. In the following sample, thestored procedure returns the count of records in table Dept:CREATE PROCEDURE dept_count (cnt OUT INTEGER)ASBEGIN
SELECT COUNT(*) INTO cnt FROM dept;
END;
An input/output parameter is a parameter that functions as an IN or an OUT parameter orboth. The value of the IN/OUT parameter is passed into the stored procedure/function and a
new value can be assigned to the parameter and passed out of the module. An IN/OUT
parameter must be a variable, not a constant. However, it can be found on both sides of anassignment. In other words, an IN/OUT parameter behaves like an initialized variable.
Besides scalar variables, a stored procedure can return result sets, i.e. the results of a
SELECT statement. In Oracle, the cursor variables are used for this case. A cursor may beinterpreted as a reference to the result set. The following sample demonstrates how asimplest select statement can be wrapped in a stored procedure:
CREATE PROCEDURE get_all_depts_proc (cur OUT SYS_REFCURSOR) AS
BEGIN
OPEN cur FOR SELECT * FROM dept;END;
The same SELECT statement can be used via a stored function as follows:
CREATE OR REPLACE FUNCTION get_all_depts_func RETURN SYS_REFCURSORAS
cur SYS_REFCURSOR;
BEGIN
OPEN cur FOR SELECT * FROM dept;
RETURN cur;
END;
Here the cursor is passed as the return value instead of being an output parameter.

See Also:
Using Stored Procedures via the TOraStoredProc class
Package Procedures© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

71

3.7.2

Oracle Data Access Components

Using Stored Procedures via the TOraStoredProc ClassThis topic describes how to use Oracle stored procedures and functions with ODAC by thehelp of TOraStoredProc class.
The following sample demonstrates the work with an Oracle stored procedure using the
get_all_depts_proc procedure from the previous section. Since the out parameter of theprocedure is the cursor, it is possible to work with the procedure as with a simple DataSet.
Note: If several out parameters in the procedure are cursors, then TOraStoredProc will work
only with the first one of them as with a DataSet.
[Delphi]program Project1;{$APPTYPE CONSOLE}
uses
SysUtils,
DB,
DBAccess,Ora;
procedure PrintDept(OraSession: TOraSession);
var
OraStoredProc: TOraStoredProc;
i: integer;
begin//procedure creation
OraStoredProc := TOraStoredProc.Create(nil);
OraStoredProc.Session := OraSession;//setting the stored procedure nameOraStoredProc.StoredProcName := 'get_all_depts_proc';//The ParamCheck property must be set to True for automatic//definition of parameters used in the stored procedure
OraStoredProc.ParamCheck := True;try//execution of the stored procedure
OraStoredProc.Execute;//retrieving data from the cursor returned by the procedurefor i:= 0 to OraStoredProc.FieldCount - 1 do
Write(OraStoredProc.Fields[i].DisplayName+#09);
WriteLn;
while not OraStoredProc.Eof do
begin
for i:= 0 to OraStoredProc.Fields.Count - 1 do
Write(OraStoredProc.Fields[i].AsString+#09);
WriteLn;
OraStoredProc.Next;
end;
finally
OraStoredProc.close;
OraStoredProc.Free;
end;
end;
var
© 2019 DevartGetting Started

72

OraSession: TOraSession;
begin
OraSession := TOraSession.Create(nil);
OraSession.ConnectString := 'SCOTT/TIGER@ORCL1020';
try
OraSession.Connect;
PrintDept(OraSession);
readln;finally
OraSession.Free;
end;
end.
[C++ Builder]#include <vcl.h>#pragma hdrstop#include <tchar.h>#include <stdio.h>#include <DBAccess.hpp>#include <Ora.hpp>#pragma argsused
void PrintDept(TOraSession *OraSession){
TOraStoredProc *OraStoredProc = new TOraStoredProc(NULL);
OraStoredProc->StoredProcName = "get_all_depts_proc";
OraStoredProc->Session = OraSession;
int i;
try{
OraStoredProc->Execute();for(i = 0; i< OraStoredProc->Fields->Count; i++)printf("%s\t",OraStoredProc->Fields->operator [](i)->DisplayName.t_str())
printf("\n");while (!OraStoredProc->Eof){for(i = 0; i< OraStoredProc->Fields->Count; i++)printf("%s\t",OraStoredProc->Fields->operator [](i)->AsString.t_str());
printf("\n");OraStoredProc->Next();}}__finally{
OraStoredProc->Free();}}
int _tmain(int argc, _TCHAR* argv[]){
TOraSession *OraSession = new TOraSession(NULL);
int i;
try{
OraSession->ConnectString = "SCOTT/TIGER@ORCL1020";
OraSession->Connect();
PrintDept(OraSession);
system("pause");© 2019 Devart

73

Oracle Data Access Components}__finally{
OraSession->Free();}return 0;}

See Also
Stored Procedures - General Information
Using Package Procedures© 1997-2019
Devart. All Rights
Reserved.
3.7.3

Request Support

DAC Forum

Provide Feedback

Using Package ProceduresThis topic describes how to create and use Oracle stored procedures and functions within
the Oracle packages with ODAC.
In Oracle databases, stored procedures and functions may be grouped into specific sets
which are called packages. To call a package procedure, one needs only to add the package
name before the procedure's name, like "package.get_all_depts_proc". However, with ODAC
using of packages may be even easier due to typed and untyped. The first ones are theclasses generated by the Package Wizard, the second ones are instances of the
TOraPackage class.
Untyped OraPackage may be set to represent any package specified by the name, provided
that this package is available for the connection used. TOraPackage class has a set of
methods intended to execute procedures and retrieve their descriptions.
Typed OraPackage is a class representing the only specific package. For each procedure orfunction of this package, instances of corresponding typed OraPackage have a special
method. Such approach allows to invoke stored procedures just like usual object methods.
Typed Oracle packages can be created using Oracle Package Wizard. For more informationon this see Using Package Wizard for working with PL/SQL Packages.

See Also
Stored Procedures - General Information
Using Stored Procedures via the TOraStoredProc class© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartGetting Started

3.8

74

Working With PL/SQL
This section describes how to create and use Oracle PL/SQL blocks ODAC.
It supposes that you know how to connect to server, how to create the necessary objects on
the server, and how to manipulate with the data stored in database tables. The section
describes stored procedures using for typed DataSets.
This section contains the following articles:
PL/SQL - General Information
Contains general information PL/SQL blocks and describes how to create them.
Using PL/SQL via the TOraSQL Class
Contains an information about using PL/SQL with the help of TOraSQL class.

© 1997-2019
Devart. All Rights
Reserved.
3.8.1

Request Support

DAC Forum

Provide Feedback

PL/SQL - General Information
PL/SQL (Procedural Language/Structured Query Language, also known as Pretty Lazy/
Structured Query Language) is Oracle Corporation's procedural extension language for SQL
and the Oracle relational database. PL/SQL's general syntax resembles that of Ada. PL/SQL
is one of three key programming languages embedded in the Oracle Database, along with
SQL itself and Java. PL/SQL is available in Oracle Database (since version 7).
Introduction
Basic Code Structure
Data Types
Control Operators
Application Sample

Introduction
PL/SQL supports variables, conditions, loops and exceptions. Arrays are also supported,though in a somewhat unusual way, involving the use of PL/SQL collections. PL/SQL
collections are a slightly advanced topic. Implementations from version 8 of Oracle Databaseonwards have included features associated with object-orientation. PL/SQL program units(essentially code containers) can be compiled into the Oracle database. Programmers canthus embed PL/SQL units of functionality into the database directly. They also can write
scripts containing PL/SQL program units that can be read into the database using the Oracle
SQL*Plus tool. Once the program units have been stored into the database, they become© 2019 Devart

75

Oracle Data Access Components

available for execution at a later time. While programmers can readily embed Data
Manipulation Language (DML) statements directly into their PL/SQL code using straightforward SQL statements, Data Definition Language (DDL) requires more complex "Dynamic
SQL" statements to be written in the PL/SQL code. However, DML statements underpin the
majority of PL/SQL code in typical software applications. In the case of PL/SQL dynamic
SQL, early versions of the Oracle Database required the use of a complicated Oracle
DBMS_SQL package library. More recent versions have however introduced a simpler "Native
Dynamic SQL", along with an associated EXECUTE IMMEDIATE syntax. Oracle Corporation
customarily extends package functionality with each successive release of the Oracle
Database.

Basic Code Structure
An application on PL/SQL consists of blocks (anonymous and named). A block can include
nested blocks, aka subblocks. The general shape of a PL/SQL-block:<<label>>
DECLARETYPE / item / FUNCTION / PROCEDURE declarations
BEGIN
Statements
EXCEPTION
EXCEPTION handlers
END label;

Data Types
The PL/SQL language supports the following type categories:
nested data types, including collections and records;
scalar;compound;reference;
LOB-types;
Object data types.

Control Operators
selection statements:
IF - THEN - END IF;
IF - THEN - ELSE - END IF;
IF - THEN - ELSIF - END IF;
CASE - WHEN - THEN - END CASE;© 2019 DevartGetting Started

76

loop statements:
LOOP - END LOOP;
WHILE - LOOP - END LOOP;
FOR - LOOP - END LOOP;
EXIT;
EXIT WHEN;
GO TO statements:
GOTO label_name;Application Sample
Example of a program that updates data in the table and displays the number of changed
records in the console
DECLAREcnt NUMBER;
BEGIN
SELECT DEPTNOINTO cnt
FROM DEPT
WHERE DEPTNO = 10;
UPDATE DEPT SET LOC='VEGAS' WHERE DEPTNO = 10;
DBMS_OUTPUT.PUT_LINE('Rows in DEPT updated '||sql%rowcount);
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('Row for update in DEPT no found') ;WHEN TOO_MANY_ROWS THEN
DBMS_OUTPUT.put_line('Query returm more that one row');
END;

See also:
Using PL/SQL via the TOraSQL Class© 1997-2019
Devart. All Rights
Reserved.
3.8.2

Request Support

DAC Forum

Provide Feedback

Using PL/SQL via the TOraSQL ClassThis topic describes how to use PL/SQL with ODAC by the help of TOraSQL class.
For work with PL/SQL blocks, the TOraSQL component is used, that allows usingparameters and macros in PL/SQL code.
A sample application updating data in a table and returning the number of modified records tothe console:[Delphi]OraSQL1.SQL.Text := 'DECLARE' + #13#10 +© 2019 Devart

77

Oracle Data Access Components' cnt NUMBER;' + #13#10 +'BEGIN' + #13#10 +'SELECT DEPTNO' + #13#10 +' INTO cnt' + #13#10 +'FROM DEPT' + #13#10 +'WHERE DNAME = :DNAME;' + #13#10 +' UPDATE EMP SET SAL=SAL + 100 WHERE DEPTNO = cnt;' +' :RES := sql%rowcount;' + #13#10 +'EXCEPTION' + #13#10 +' WHEN NO_DATA_FOUND THEN' + #13#10 +'DBMS_OUTPUT.PUT_LINE(''Row for update in EMP no foun
' WHEN TOO_MANY_ROWS THEN' + #13#10 +'DBMS_OUTPUT.put_line(''Query returm more that one'END;';OraSQL1.ParamByName('DNAME').DataType := ftString;
OraSQL1.ParamByName('DNAME').ParamType := ptInput;
OraSQL1.ParamByName('DNAME').AsString := 'ACCOUNT';OraSQL1.ParamByName('RES').DataType := ftInteger;
OraSQL1.ParamByName('RES').ParamType := ptOutput;
OraSQL1.Execute;
ShowMessage(Format('Rows in EMP updated: %d',[OraSQL1.ParamByName('RES').A[C++ Builder]
OraSQL1->SQL->Text = "DECLARE\n"" cnt NUMBER;\n""BEGIN\n""SELECT DEPTNO\n"" INTO cnt\n""FROM DEPT\n""WHERE DNAME = :DNAME;\n"" UPDATE EMP SET SAL=SAL + 100 WHERE DEPTNO = cnt;\n"" :RES := sql%rowcount;\n""EXCEPTION\n"" WHEN NO_DATA_FOUND THEN\n""DBMS_OUTPUT->PUT_LINE('Row for update in EMP no found');\n"" WHEN TOO_MANY_ROWS THEN\n""DBMS_OUTPUT->put_line('Query returm more that one row');\n""END;";OraSQL1->ParamByName("DNAME")->DataType = ftString;
OraSQL1->ParamByName("DNAME")->ParamType = ptInput;
OraSQL1->ParamByName("DNAME")->AsString = "ACCOUNT";OraSQL1->ParamByName("RES")->DataType = ftInteger;
OraSQL1->ParamByName("RES")->ParamType = ptOutput;
OraSQL1->Execute();© 1997-2019
Devart. All Rights
Reserved.

3.9

Request Support

DAC Forum

Provide Feedback

Using Transactions
Understanding Transactions
A transaction is one or several operations considered as a single unit of work which is© 2019 DevartGetting Started

78

completed entirely or have no effect at all ("all-or-nothing"). If a failure occurs at one point in
the transaction, all of the updates can be rolled back to their pre-transaction state. A
transaction must conform to the ACID properties - atomicity, consistency, isolation, anddurability-in order to guarantee data consistency.
If a transaction involves multiple tables in the same database, then explicit transactions in PL/
SQL often perform better. You can use COMMIT and ROLLBACK statements in your SQL to
fix and discard respectively the previous commands in your current PL/SQL block. For more
information, see Oracle PL/SQL documentation.
Otherwise, a transaction with plain SQL can be implemented via TOraTransaction
TOraSession classes. For example, you can use TOraSession: start transaction on
TOraSession, execute several SQL statements via TOraDataSet, and commit/rollback all
operations when it is necessary. See the sample from the Local Transaction topic.
This article describes the way to manipulate transactions from your application (without
envolving PL/SQL transactions) - this is the most common case of working with transactions.
Concerning your task, you can choose the type of transaction to implement - local or
distributed. A transaction considered to be a local transaction when it is a single-phasetransaction and is handled by the database directly. A distributed transaction is a transactionthat affects several resources, it is coordinated by a transaction monitor and uses fail-safe
mechanisms (such as two-phase commit) for transaction resolution.
Note: transaction will be global if either TransactionId or TransactionName property is set or if
GlobalCoordinator property is gcMTS.

Local Transactions
To start local transaction with TOraTransaction component, set DefaultSession property of
the component to a session on which transaction will be performed. Set IsolationLevel
property optionally. Then call StartTransaction method of the TOraTransaction component.
To manage transaction use Commit, Rollback, Savepoint, RollbackToSavepoint methods.
[Delphi]var
OraSession: TOraSession;
OraTransaction: TOraTransaction;
begin
OraSession := TOraSession.Create(nil);
OraTransaction := TOraTransaction.Create(nil);try
OraSession.ConnectString := 'login/password@SID';
OraSession.Connect;
OraTransaction.AddSession(OraSession);
OraTransaction.IsolationLevel := ilReadCommitted;
OraTransaction.StartTransaction;
try
OraSession.ExecSQL('INSERT INTO Dept(DeptNo, DName) Values(50, ''DEVEL© 2019 Devart

79Oracle Data Access Components

OraSession.ExecSQL('INSERT INTO Dept(DeptNo, DName) Values(60, ''PRODU
OraTransaction.Commit;
ShowMessage('Both records are written to database.');exceptOraTransaction.Rollback;
ShowMessage('Neither record was written to database.');end;
finally
OraTransaction.Free;
OraSession.Free;
end;
end;
[C++ Builder]

TOraSession *OraSession = new TOraSession(NULL);
TOraTransaction *OraTransaction = new TOraTransaction(NULL);
try{
OraSession->ConnectString = "SCOTT/TIGER@ORCL1020";
OraSession->Connect();
OraTransaction->AddSession(OraSession);
OraTransaction->IsolationLevel = ilReadCommitted;
OraTransaction->StartTransaction();try{
OraSession->ExecSQL("INSERT INTO Dept(DeptNo, DName) Values(50, 'DEVELOPM
OraSession->ExecSQL("INSERT INTO Dept(DeptNo, DName) Values(60, 'PRODUCTIShowMessage("Both records are written to database.");}catch(const Exception& e){
OraTransaction->Rollback();
ShowMessage("Neither record was written to database.");}}__finally{
OraSession->Disconnect();
OraTransaction->Free();
OraSession->Free();}© 1997-2019
Devart. All Rights
Reserved.

3.10

Request Support

DAC Forum

Provide Feedback

Demo Projects
ODAC includes a number of demo projects that show off the main ODAC functionality anddevelopment patterns.
The ODAC demo projects consist of one large project called OdacDemo with demos for all
main ODAC components, use cases, and data access technologies, and a number ofsmaller projects on how to use ODAC in different IDEs and how to integrate ODAC with third-© 2019 DevartGetting Started

80

party components.
Most demo projects are built for Delphi and Embarcadero RAD Studio. There are only two
ODAC demos for C++Builder. However, the C++Builder distribution includes source code forall other demo projects as well.

Where are the ODAC demo projects located?
In most cases all the ODAC demo projects are located in "%Odac%\Demos\".
In Delphi 2007 for Win32 under Windows Vista all the ODAC demo projects are located in "My
Documents\Devart\Odac for Delphi 2007\Demos", for example "C:\Documents and Settings\All Users\Documents\Devart\Odac for Delphi 2007\Demos\".
The structure of the demo project directory depends on the IDE version you are using.
For most new IDEs the structure will be as following.
Demos|—OdacDemo [The main ODAC demo project]|—Performance [Demo project, that compares performance of ODAC
with another components (BDE, ADO, dbExpress)]|—ThirdParty||— [A collection of demo projects on integration with third-

party components]|—Miscellaneous|— [Some other demo projects on design technologies]
OdacDemo is the main demo project that shows off all the ODAC functionality. The otherdirectories contain a number of supplementary demo projects that describe special use
cases. The list of all samples in the ODAC demo project and the description for the
supplementary projects is provided in the following section.
Note: This documentation describes ALL the ODAC demo projects. The actual demo
projects you will have installed on your computer depends on your ODAC version, ODAC
edition, and the IDE version you are using. The integration demos may require installation of
third-party components to compile and work properly.

Instructions for using the ODAC demo projects
To explore an ODAC demo project,
1. Launch your IDE.
2. In your IDE, choose File|Open Project from the menu bar.
3. Find the directory you have installed ODAC to and open the Demos folder.

© 2019 Devart

81Oracle Data Access Components

4. Browse through the demo project folders located here and open the project file of the demo
you would like to use.
5. Compile and launch the demo. If it exists, consult the ReadMe.txt file for more details.
The executed version of the demo will contain a sample application written with ODAC or anavigable list of samples and sample descriptions. To use each sample properly, you willneed to connect to a working Oracle server.
The included sample applications are fully functional. To use the demos, you have to set up aconnection to Oracle first. You can do that by clicking on the "Connect" button.
Many demos may also use some database objects. If so, they will have two object
manipulation buttons, "Create" and "Drop". If your demo requires additional objects, click"Create" to create necessary database objects. When you are done with the demo, click"Drop" to remove all the objects used for the demo from your Oracle database.
Note: The ODAC demo directory includes two sample SQL scripts for creating and dropping
all the test schema objects used in the ODAC demos. You can modify and execute this script
manually, if you want. This will not change the behavior of the demos.
You can find a complete walkthrough for the main ODAC demo project in the Getting Started
topic. Other ODAC demo projects include a ReadMe.txt file with individual building andlaunching instructions.

Demo project descriptions
OdacDemo
OdacDemois one large project which includes three collections of demos.
Working with components
A collection of samples that show how to work with the basic ODAC components.
General demos
A collection of samples that show off the ODAC technology and demonstrate some ways
to work with data.
Oracle-specific demos
A collection of samples that demonstrate how to incorporate Oracle features in databaseapplications.
OdacDemo can be opened from %Odac%\Demos\OdacDemo\odacdemo.dpr (.bdsproj). The
following table describes all demos contained in this project.

Working with Components© 2019 DevartGetting Started

Name

82

Description
Uses the TOraAlerter component to send messages between
sessions through DBMS_ALERT and DBMS_PIPE Oracle package
Alerterfunctionality.
Note: Requires execute privileges on DBMS_ALERT.
Demonstrates how to subscribe, receive, and reflect DML or DDL
ChangeNotifica changes on objects associated with queries.
tion
Note: Requires CHANGE NOTIFICATION privilege. This functionallity
is available only for Oracle 10.2g or higher.
Demonstrates how to customize the ODAC connect dialog . Changes
the standard ODAC connect dialog to two custom connect dialogs.
ConnectDialog The first customized sample dialog is inherited from the TForm class,and the second one is inherited from the default ODAC connect
dialog class.
Demonstrates how to work with the TCRDBGrid component. Shows
CRDBGrid
off main TCRDBGrid features, like filtering, searching, stretching,using compound headers, and more.
ErrorHandler Demonstrates using the TOraErrorHandler for exception handling andtranslating error messages.
Uses the TOraLoader component to load data into a server table
quickly. Demonstrates Direct and DML modes for loading data. In
Direct mode, data is loaded through DirectPath API, which loads big
Loadervolumes of data into a table faster than while using INSERT
statement. In DML mode, data is processed with the DML arrayfeature of Oracle. It also compares two TOraLoader data loading
handlers: GetColumnData and PutData.
Demonstrates working with TOraQuery , which is one of the mostuseful ODAC components. Includes many TOraQuery usage
scenarios. Demonstrates how to execute queries in both standard
Query
and NonBlocking mode and how to edit data and export it to XML
files.
Note: This is a very good introductory demo. We recommend startingwith it when first becoming familiar with ODAC.
Demonstrates how to use ODAC to work with Oracle Streams
Advanced Queuing. Implements notification on new messages.
QueueShows how to create and manage Oracle Queues. Demonstrates the
TOraQueue , TOraQueueTable , and TOraQueueAdmin components.
Note: Requires DBMS_AQ and DBMS_AQADM privileges.
Uses TSmartQuery to customize refreshing, sorting, and server-side
record management in a data grid. Shows how to perform local
Smartfiltering, demonstrates several different kinds of record locking andrefreshing, and working with FetchAll mode.
Uses TOraSQL to execute SQL statements and PL/SQL blocks.
Sql
Demonstrates how to work in standard and NonBlocking modes, how
to work with parameters in SQL, and how to break long-duration query© 2019 Devart

83

Oracle Data Access Components

StoredProc

Table
Trace
Transaction

UpdateSQL

VirtualTable

execution.
Uses TOraStoredProc to access an editable recordset represented
by an Oracle cursor from an Oracle stored procedure in the client
application.
Demonstrates how to use TOraTable to work with data from a single
table on the server without writing any SQL queries manually.
Performs server-side data sorting and filtering and retrieves results
for browsing and editing.
Uses TOraTrace to work with Oracle SQL and PL/SQL tracing.
Demonstrates main approaches for setting up distributed
transactions with the TOraTransaction component. Shows how tomanage transactions, tune the transaction isolation level, and selectthe coordinator for a distributed transaction.
Demonstrates using the TOraUpdateSQL component to customize
update commands. Lets you optionally use TOraSQL and TOraQueryobjects for carrying out insert, delete, query, and update commands.
Demonstrates working with the TVirtualTable component. This
sample shows how to fill virtual dataset with data from other datasets,
filter data by a given criteria, locate specified records, perform file
operations, and change data and table structure.

General Demos
Name

Description
Demonstrates how to perform the most important tasks of working
CachedUpdate with data in CachedUpdates mode, including highlightingsuncommitted changes, managing transactions, and committingchanges in a batch.
Demonstrates ODAC's local storage functionality. This sample shows
FilterAndIndex how to perform local filtering, sorting and locating by multiple fields,
including by calculated and lookup fields.
Uses ODAC functionality to work with master/detail relationships. This
sample shows how to use local master/detail functionality.
MasterDetail
Demonstrates different kinds of master/detail linking, including linking
by SQL, simple fields, and calculated fields.
Uses ODAC functionality to work with BLOB fields and graphics. The
sample demonstrates how to retrieve binary data from Oracle
Picturesdatabase and display it on visual components. Sample also shows
how to load and save pictures to files and to the database.
Demonstrates how ODAC can be used in multithreaded applications.
Threads
This sample allows you to set up several threads and test ODAC's
performance with multithreading.

© 2019 DevartGetting Started

84

Oracle-specific Demos
Name
ArraysBFile

BlobPictures

Clob

CursorDMLArray
FetchCursors

Long

LongStrings
MultiCursors

MultiQueries

NestedTables© 2019 Devart

Description
Demonstrates working with Oracle arrays . This sample lets you viewand control how arrays are represented in dataset fields by theSparseArrays and ObjectView properties.
Shows the basics of working with file binary data stored in filesystems located outside Oracle databases. This sample uses the
TBFileField field type of ODAC.
Demonstrates working with Oracle BLOB data types. The sample
shows how to get binary data from the table, how to change BLOB
fields using UPDATE statements, and how to insert a new record byexecuting stored procedure with a BLOB parameter. Also it shows off
some extended BLOB handling functionality like local caching control,
compression type changing, and more.
Demonstrates working with Oracle CLOB data types. The sample
shows how to get a character stream from a table, how to change
CLOB fields using UPDATE statements, and how to save and load
data to/from a file. It also demonstrates several different ways of
performing CLOB insertion.
Uses ODAC functionality to work with Oracle Cursors . Shows how tofetch data from a Cursor parameter by setting TOraDataSet.Cursor to
the TOraParam.AsCursor .
Demonstrates how to multiply execute SQL statements with different
parameters by using ODAC functionality for the Oracle DML arrayfeature.
Uses TOraQuery to retrieve several Oracle cursors at once, fetch data
in a batch, and close the cursors.
Demonstrates working with Oracle LONG data types. The sample
shows how to get character string from a table, update LONG fields
and insert a new record. Also shows how to perform file operations
with LONG fields.
Demonstrates ODAC functionality for working with long string fields(fields that have more than 256 characters). Shows different ways of
their displaying as memo fields and string fields.
Shows how to use one TOraQuery object to retrieve and update datafrom several tables by using several REF CURSOR parameters.
Shows how Oracle queries are handled in multithreaded applications.
This sample project lets you compare opening multiple queries within
a single session or different sessions by setting NonBlocking andFetchAll =False modes.
Demonstrates using the TOraNestedTable component to work with
Oracle nested tables. This sample project fills a TOraNestedTable
dataset instance with the result set of a query to a table with a nested

85

Oracle Data Access Components

table field. It shows how to work with the data contained in nested
table fields. Note that the nested table accessing interface is similar
to the interface for accessing cursor data in a dataset representationof a table with CURSOR fields.
Demonstrates working with Oracle object fields. This sample shows
Objects
how to clone objects and access and modify object field properties.
Uses TOraAlerter in Pipe mode to organize cross-session message
Pipes
exchanging.
Demonstrates using PL/SQL Table types as parameters. Working
PLSQLTable
with PL/SQL Table types in PL/SQL lets you imitate array functionality
provided by other programming languages.
Uses TOraAlerter in Pipe mode to indicate the progress of longProgressor
duration Oracle processes.
Demonstrates connecting to Oracle with the Oracle Proxy session
ProxySession functionality. This type of connection allows to quickly establish
connections without specifying a password.
Note: Requires the CONNECT THROUGH privilege
Refs
Demonstrates using the REF Oracle data type in queries.
Uses the Smart Refresh features of TSmartQuery to notify your datachanges to other subscribed users. This sample is based on the
SmartRefresh TOraAlerter component.
Note: Smart Refresh is only available in ODAC Professional Edition
and ODAC Developer Edition.
Uses the TOraXMLField class to work with Oracle SYS.XMLTYPE
XMLTypetype LOB or Schema-based data. This sample project shows how to
perform all the basic operations with this data type.

Supplementary Demo Projects
ODAC also includes a number of additional demo projects that describe some special use
cases, show how to use ODAC in different IDEs and give examples of integrating it with thirdparty components. These supplementary ODAC demo projects are sorted into subfolders in
the %Odac%\Demos\ directory.

Location

Name

Description

ThirdParty

Demonstrates how ODAC can beused with FastReport components.
This project consists of two parts.
The first part consists of several
FastReportpackages that integrate ODAC
components into the FastReport
editor. The second part is a demo
application that lets you design and© 2019 DevartGetting Started

Miscellaneouspreview reports with ODAC
technology in the FastReport editor.
Uses InfoPower components todisplay recordsets retrieved with
ODAC. This demo project displays
InfoPower an InfoPower grid component andfills it with the result of an ODAC
query. Shows how to link ODAC
data sources to InfoPower
components.
A collection of sample projects thatshow how to use ODAC components
as data sources for IntraWeb
applications. Contains IntraWeb
samples for setting up a connection,
IntraWeb querying a database and modifying
data and working with
CachedUpdates and MasterDetail
relationships. Starting with Oracle
10.2g and higher lets you see theeffect of setting
TOraCachedUpdates.
Lets you launch and view a
QuickRepo QuickReport application based on
ODAC. This demo project lets yourt
modify the application in designtime.
Uses ODAC data sources to createa ReportBuilder report that takes
data from an Oracle database.
ReportBuil Shows how to set up a
ReportBuilder document in designder
time and how to integrate ODAC
components into the Report Builder
editor to perform document design inrun-time.
General demo project that shows
how to create ODAC-based
applications with C++Builder. Lets
CBuilder you execute SQL scripts and workwith result sets in a grid. This is oneof the two ODAC demos for C++Builder.
Dll© 2019 Devart

86

Demonstrates creating and loading
DLLs for ODAC-based projects.

87Oracle Data Access Components

This demo project consists of twoparts - an OraDll project that createsa DLL of a form that sends a queryto the server and displays its results,
and an OraExe project that can be
executed to display a form forloading and running this DLL. Allows
you to build a dll for one ODACbased project and load and test it
from a separate application.
Uses external procedures to save
LOB data to file on an Oracle serverand store the file name and file date
ExternalPr in a database. This demo projectoc
uses the external procedure DLL filedescribed in the Writing Oracle
external procedures with ODAC
topic.
Demonstrates the recommended
approach to working with unstablenetworks. This sample lets you
perform transactions and updates inseveral different modes, simulate
sudden session termination, andFailOverview what happens to your data state
when connections to the server are
unexpectedly lost. Shows off
CachedUpdates, LocalMasterDetail,
FetchAll, Pooling, and different
Failover modes.
Demonstrates using the
SDO_GEOMETRY Oracle type with
ODAC. This project reads
Geometry SDO_GEOMETRY objects from thedatabase and draws figures stored
in these objects. The project allows
you to edit figures and save them tothe database.

Midas

Demonstrates using MIDAS
technology with ODAC. This project
consists of two parts: a MIDAS
server that processes requests tothe database and a thin MIDAS
client that displays an interactive
grid. This demo shows how to build© 2019 DevartGetting Started

OdacDemo© 1997-2019
Devart. All Rights
Reserved.

3.11

88

thin clients that display interactive
components and delegate all
database interactions to the server
application for processing.
Measures ODAC performance on
several types of queries. This project
lets you compare ODAC
Performan performance to BDE, ADO, anddbExpress. Tests the followingcefunctionality: Fetch, Master/Detail,Stored Procedure Call, Data
Loading, Multi Executing, and Insert/
Post.
Demonstrates working with the
TVirtualTable component. This
sample shows how to fill virtual
dataset with data from other
VirtualTabl datasets, filter data by a given
eCB
criteria, locate specified records,
perform file operations, and change
data and table structure. This is oneof the two demo projects for C++Builder.
OdacDemo [Win32 version of the main ODAC
demo project - see above]
Request Support

DAC Forum

Provide Feedback

Deployment
ODAC applications can be built and deployed with or without run-time libraries. Using runtime libraries is managed with the "Build with runtime packages" check box in the Project
Options dialog box.

Deploying Windows applications built without run-time
packages
You do not need to deploy any files with ODAC-based applications built without run-time
packages, provided you are using a registered version of ODAC.
You can check your application does not require run-time packages by making sure the "Build
with runtime packages" check box is not selected in the Project Options dialog box.

© 2019 Devart

89Oracle Data Access Components

Trial Limitation Warning
If you are evaluating deploying Windows applications with ODAC Trial Edition, you will need to
deploy the following DAC BPL files:

dacXX.bpl
odacXX.bpl

alwaysalwaysand their dependencies (required IDE BPL files) with your application, even if it is built without
run-time packages:

rtlXX.bpl
dbrtlXX.bpl
vcldbXXX.bpl

alwaysalwaysalways

Deploying Windows applications built with run-time
packages
You can set your application to be built with run-time packages by selecting the "Build withruntime packages" check box in the Project Options dialog box before compiling yourapplication.
In this case, you will also need to deploy the following BPL files with your Windows
application:

dacXX.bpl
alwaysodacXX.bpl
alwaysdacvclXX.bpl
if your application uses the OdacVcl unit
odacvclXX.bpl if your application uses the OdacVcl unit
crcontrolsXX.bpl if your application uses the CRDBGrid component© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.

4

Using ODAC
This section describes basics of using Oracle Data Access Components
Updating Data with ODAC Dataset Components
Connecting in Direct Mode
Master/Detail Relationships
Data Type Mapping
Data Encryption© 2019 Devart

Using ODAC

90

Working in an Unstable Network
Disconnected Mode
Increasing Performance
MacrosDataSet Manager
Connection Pooling
Automatic Key Field Value Generation
TOraLoader Component
TOraTransaction Component
TOraQueue, TOraQueueAdmin and TOraQueueTable Components
TOraChangeNotification Component
BLOB and CLOB Data Types
Unicode Character Data
Objects
XMLTYPE Data TypeVARRAY Data TypeDML Array
PL/SQL Tables
Writing Oracle External Procedures with ODACTransparent Application Failover Support
DBMonitor
Writing GUI Applications with ODAC
Compatibility with Previous Versions
Integration with dbForge Studio for Oracle
64-bit Development with Embarcadero RAD Studio XE2
Database Specific Aspects of 64-bit Development
Demo Projects
Deployment© 1997-2019
Devart. All Rights
Reserved.

4.1

Request Support

DAC Forum

Provide Feedback

Updating Data with ODAC Dataset Components
ODAC dataset components which descend from TCustomDADataSet provide different ways
for reflecting local changes on the server.
The first approach is to use automatic generation of update SQL statements. When using this© 2019 Devart

91

Oracle Data Access Components

approach you should either specify Key Fields (the KeyFields property) or include RowID field
into you SELECT SQL statement to avoid requesting of KeyFields from the server. When
SELECT statement uses multiple tables, you can use UpdatingTable property to specify
which table will be updated. If UpdatingTable is blank, the first table of the FROM clause will
be used. When using sophisticated SELECT SQL statements (statements that use multiple
tables, Synonyms, DBLinks, aggregated fields) we recommend to enable ExtendedFieldsInfo
option. When this option is enabled, additional requests to the server may be performed toobtain more information about updating objects. This helps to generate correct updating SQL
statements but may result in performance decrease. To avoid editing the fields that will not be
used in update SQL statements use the SetFieldsReadOnly option. You can increase
performance by refreshing fields using RETURNING clause when insert or update is
performed. To enable this feature enable DMLRefresh and ReturnParams options.
Another approach is to set update SQL statements using SQLInsert, SQLUpdate and
SQLDelete properties. Use them to specify SQL statements that will be used forcorresponding data modifications. It is useful when generating data modification statements is
not possible (for example when working with data of a cursor, returned by a stored procedure)or you need to execute some specific statements. You may also assign TOraUpdateSQL
component to the UpdateObject property. TOraUpdateSQL component holds all updating
SQL statements in one place. You can generate all these SQL statements using ODAC
design time editors. For more careful customization of data update operations you can use
InsertObject, ModifyObject and DeleteObject properties of TOraUpdateSQL component.

See Also
TSmartQuery
TOraQuery
TOraStoredProc
TOraTable
TOraUpdateSQL© 1997-2019
Devart. All Rights
Reserved.

4.2

Request Support

DAC Forum

Provide Feedback

Connecting in Direct Mode
ODAC Professional Edition allows you to connect to Oracle in two ways: in Client mode,using Oracle Client software, or in Direct mode, over TCP/IP. The chosen connection modeis regulated by the TOraSession.Options.Direct property.

ODAC connection modes© 2019 Devart

Using ODAC

92

By default, ODAC, like most applications that work with Oracle, uses the Oracle Call Interface(OCI) to connect to the Oracle database server. This is referred to as connecting in Clientmode, and it is the usual way to develop Oracle applications with a third-generation language.
All OCI routines are stored in external libraries, so the executables for applications that workthrough OCI are small. However, working through OCI requires Oracle client software to beinstalled on target workstations. It is inconvenient and causes additional installation andadministration expenses. Furthermore, there are some situations in which installation of
Oracle client is not advisable or may be even impossible; for example, when deploying anapplication to remote machines which do not have qualified administration.
To overcome these problems, ODAC Professional Edition includes an option to connect toOracle directly over the network using the TCP/IP protocol. This is referred to as connecting
in Direct mode. Connecting in Direct mode does not require Oracle client software to beinstalled on target machines. The only requirement for running an ODAC-based applicationthat uses the Direct mode is that the operating system must support the TCP/IP protocol.

Setting up Direct mode connections
To connect to Oracle server using Direct mode, set up your TOraSession object as follows.
Set your TOraSession object's Options.Direct property to True
Set your TOraSession object's Server to a string that contains the host address of thedatabase server, port number, and the Oracle System Identifier (SID) or Oracle Servise
Name in the following format:
If Oracle servers has SID equal to Service Name, then Connection String is the following (theformat):Host:Port:SID
If Oracle Server has SID different from Service Name, then the Connection String format is
the following:
Host:Port:sid=SID - for connection with using SID
Host:Port:sn=ServiceName
Host:Port/ServiceName - for connection with using Service Name.
Where
Host is the server's IP address or DNS name.
Port is the port number that the server listens to.
SID is a system identifier that specifies an Oracle database instance name.
ServiceName is a system alias to an Oracle database instance (or many instances).
Note that the syntax used to set up the Server property is different in Direct mode and in
Client mode. In Client mode, the Server property must be set to the TNS name of the Oracle© 2019 Devart

93Oracle Data Access Components

server.
Note that if sid= prefix is unavailable or sn= isn't defined, then by default connection will beestablished using SID.
Here is an example that illustrates connecting to Oracle in Direct mode. The Oracle server's
IP address is 205.227.44.44, its port number is 1521 (this is the most commonly used port for
Oracle), and 'orcl' is the SID (this is the standard Oracle SID).
var
Session: TOraSession;. . .
Session.Options.Direct := True;
Session.Username := 'Scott';Session.Password := 'tiger';
Session.Server := '205.227.44.44:1521:orcl';
Session.Connect;
For connection using SID:...
Session.Server := '205.227.44.44:1521:sid=orcl';...
For connection using Service Name:...
Session.Server := '205.227.44.44:1521:sn=orcl';...
This is all you need to do to enable Direct mode connections in your application. You do nothave to rewrite other parts of your code.
To return to working through OCI, just set TOraSession.Options.Direct to False and update
the Session to the TNS name of your server.
You can connect to Multi-Threaded Server using Direct mode. The server must be configured
to use specific port and TTC protocol. This can help you avoid firewall conflicts.
Note: Direct mode is available in ODAC Professional Edition, and can be evaluated with
Oracle Trial Edition. Attempting to set the TOraSession.Options.Direct property to True in
ODAC Standard Edition will generate a "Feature is not supported" error.

Comparison of Client mode vs. Direct mode
Applications that use Client mode and those that use Direct mode have similar size andperformance. The security of using the Direct mode is the same as using Client without
Oracle Advanced Security. ODAC in Direct mode uses DES authentication and does not now
support Oracle Advanced Security.
Advantages of using Direct mode
Installation and administration of Oracle client software are not required.

© 2019 Devart

Using ODAC

94

System requirements are reduced.
Direct mode limitations
Connect using TCP/IP protocol only
TOraLoader direct loading is not supported.
Certain problems may occur when using firewalls.
Direct mode does not support NLS conversion on the client side.
Transparent Application Failover is not supported.
OS authentication feature are not available.
Change notification feature (TOraChangeNotification component) cannot be used.
Connecting in Direct mode is managed transparently by the TOraSession object, and you caneasily return to connecting through OCI in Client mode at any time if restrictions above
become critical for you.

See Also
TOraSession.Server
TOraSession.Options
TOraSQL.BreakExec
TCustomDADataSet.BreakExec© 1997-2019
Devart. All Rights
Reserved.

4.3

Request Support

DAC Forum

Provide Feedback

Master/Detail Relationships
Master/detail (MD) relationship between two tables is a very widespread one. So it is very
important to provide an easy way for database application developer to work with it. Lets
examine how ODAC implements this feature.
Suppose we have classic MD relationship between "Department" and "Employee" tables.
"Department" table has field Dept_No. Dept_No is a primary key.
"Employee" table has a primary key EmpNo and foreign key Dept_No that binds "Employee"
to "Department".
It is necessary to display and edit these tables.
ODAC provides two ways to bind tables. First code example shows how to bind two
TCustomOraDataSet components (TOraQuery, TSmartQuery, TOraTable or even
TOraStoredProc) into MD relationship via parameters.
procedure TForm1.Form1Create(Sender: TObject);var
Master, Detail: TOraQuery;© 2019 Devart

95

Oracle Data Access Components

MasterSource: TDataSource;
begin// create master dataset
Master := TOraQuery.Create(Self);
Master.SQL.Text := 'SELECT * FROM Department';// create detail dataset
Detail := TOraQuery.Create(Self);
Detail.SQL.Text := 'SELECT * FROM Employee WHERE Dept_No = :Dept_No';// connect detail dataset with master via TDataSource component
MasterSource := TDataSource.Create(Self);
MasterSource.DataSet := Master;
Detail.MasterSource := MasterSource;// open master dataset and only then detail dataset
Master.Open;
Detail.Open;end;
Pay attention to one thing: parameter name in detail dataset SQL must be equal to the fieldname or the alias in the master dataset that is used as foreign key for detail table. After
opening detail dataset always holds records with Dept_No field value equal to the one in thecurrent master dataset record.
There is an additional feature: when inserting new records to detail dataset it automatically fills
foreign key fields with values taken from master dataset.
Now suppose that detail table "Department" foreign key field is named DepLink but not
Dept_No. In such case detail dataset described in above code example will not autofill
DepLink field with current "Department".Dept_No value on insert. This issue is solved insecond code example.
procedure TForm1.Form1Create(Sender: TObject);var
Master, Detail: TOraQuery;
MasterSource: TDataSource;
begin// create master dataset
Master := TOraQuery.Create(Self);
Master.SQL.Text := 'SELECT * FROM Department';// create detail dataset
Detail := TOraQuery.Create(Self);
Detail.SQL.Text := 'SELECT * FROM Employee';// setup MD
Detail.MasterFields := 'Dept_No';// primary key in Department
Detail.DetailFields := 'DepLink'; // foreign key in Employee// connect detail dataset with master via TDataSource component
MasterSource := TDataSource.Create(Self);
MasterSource.DataSet := Master;
Detail.MasterSource := MasterSource;// open master dataset and only then detail dataset
Master.Open;
Detail.Open;end;
In this code example MD relationship is set up using MasterFields and DetailFields properties.
Also note that there are no WHERE clause in detail dataset SQL.
© 2019 Devart

Using ODAC

96

To defer refreshing of detail dataset while master dataset navigation you can use DetailDelay
option.
Such MD relationship can be local and remote, depending on the
TCustomDADataSet.Options.LocalMasterDetail option. If this option is set to True, dataset
uses local filtering for establishing master-detail relationship and does not refer to the server.
Otherwise detail dataset performs query each time when record is selected in masterdataset. Using local MD relationship can reduce server calls number and save server
resources. It can be useful for slow connection. CachedUpdates mode can be used for detaildataset only for local MD relationship. Using local MD relationship is not recommended when
detail table contains too many rows, because in remote MD relationship only records that
correspond to the current record in master dataset are fetched. So, this can decrease
network traffic in some cases.

See Also
TCustomDADataSet.Options
TMemDataSet.CachedUpdates© 1997-2019
Devart. All Rights
Reserved.

4.4

Request Support

DAC Forum

Provide Feedback

Data Type Mapping

Overview
Data Type Mapping is a flexible and easily customizable gear, which allows mapping
between DB types and Delphi field types.
In this article there are several examples, which can be used when working with all supported
DBs. In order to clearly display the universality of the Data Type Mapping gear, a separate DB
will be used for each example.

Data Type Mapping Rules
In versions where Data Type Mapping was not supported, ODAC automatically set
correspondence between the DB data types and Delphi field types. In versions with Data
Type Mapping support the correspondence between the DB data types and Delphi field types
can be set manually.
Here is the example with the numeric type in the following table of a Oracle database:
CREATE TABLE NUMBER_TYPES(ID NUMBER NOT NULL,VALUE1 NUMBER(4,0),© 2019 Devart

97Oracle Data Access Components

VALUE2 NUMBER(10,0),
VALUE3 NUMBER(15,0),
VALUE4 NUMBER(5,2),
VALUE5 NUMBER(10,4),
VALUE6 NUMBER(15,6),
CONSTRAINT PK_NUMBER_TYPES PRIMARY KEY (ID))
And Data Type Mapping should be used so that:the numeric fields with Scale=0 in Delphi would be mapped to one of the field types:
TSmallintField, TIntegerField or TlargeintField, depending on Precision
to save precision, the numeric fields with Precision>=10 and Scalе<= 4 would be mapped
to TBCDField
and the numeric fields with Scalе>= 5 would be mapped to TFMTBCDField.
The above in the form of a table:

Oracle data type

Default Delphi field typenumeric(4,0)
numeric(10,0)
numeric(15,0)
numeric(5,2)
numeric(10,4)
numeric(15,6)

ftFloatftFloatftFloatftFloatftFloatftFloatDestination Delphi field
type
ftSmallint
ftInteger
ftLargeint
ftFloat
ftBCD
ftFMTBCD

To specify that numeric fields with Precision <= 4 and Scale = 0 must be mapped toftSmallint, such a rule should be set:var
DBType: Word;
MinPrecision: Integer;
MaxPrecision: Integer;
MinScale: Integer;
MaxScale: Integer;
FieldType: TfieldType;begin
DBType:= oraNumber;
MinPrecision := 0;
MaxPrecision := 4;
MinScale:= 0;
MaxScale:= 0;
FieldType:= ftSmallint;
OraSession.DataTypeMap.AddDBTypeRule(DBType, MinPrecision, MaxPrecision, M
end;This is an example of the detailed rule setting, and it is made for maximum
visualization.Usually, rules are set much shorter, e.g. as follows:© 2019 Devart

Using ODAC

98

OraSession.DataTypeMap.Clear;// rule for numeric(4,0)
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 0,4, 0,0, ftSma// rule for numeric(10,0)
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 5,
10, 0,
0, ftInt// rule for numeric(15,0)
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 11, rlAny, 0,
0, ftLar// rule for numeric(5,2)
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 0,
9, 1, rlAny, ftFlo// rule for numeric(10,4)
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 10, rlAny, 1,
4, ftBCD// rule for numeric(15,6)
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 10, rlAny, 5, rlAny, ftFMTRules order
When setting rules, there can occur a situation when two or more rules that contradict toeach other are set for one type in the database. In this case, only one rule will be applied —the one, which was set first.
For example, there is a table in an Oracle database:
CREATE TABLE PERSON(IDNUMBERNOT NULL,FIRSTNAMEVARCHAR2(20),LASTNAME
VARCHAR2(30),GENDER_CODE
VARCHAR2(1),BIRTH_DTTM
DATE,CONSTRAINT PK_PERSON PRIMARY KEY (ID))
TBCDField should be used for NUMBER(10,4), and TFMTBCDField - for NUMBER(15,6)
instead of default fields:

Oracle data type
NUMBER(5,2)
NUMBER(10,4)
NUMBER(15,6)

Default Delphi field typeftFloatftFloatftFloatDestination field typeftFloat
ftBCD
ftFMTBCD

If rules are set in the following way:

OraSession.DataTypeMap.Clear;
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 0,9, rlAny, rlAny, ftFl
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 0, rlAny,
0,
4, ftBC
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 0, rlAny,0, rlAny, ftFM
it will lead to the following result:

Oracle data type© 2019 Devart

Delphi field type

99

Oracle Data Access Components

NUMBER(5,2)
NUMBER(10,4)
NUMBER(15,6)

ftFloat
ftBCD
ftFMTBCD

But if rules are set in the following way:

OraSession.DataTypeMap.Clear;
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 0, rlAny,0, rlAny, ftFM
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 0, rlAny,
0,
4, ftBC
OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 0,9, rlAny, rlAny, ftFl
it will lead to the following result:

Oracle data type
NUMBER(5,2)
NUMBER(10,4)
NUMBER(15,6)

Delphi field typeftFMTBCD
ftFMTBCD
ftFMTBCDThis happens because the rule

OraSession.DataTypeMap.AddDBTypeRule(oraNumber, 0, rlAny, 0, rlAny, ftFMTBCD
will be applied for the NUMBER fields, whose Precision is from 0 to infinity, and Scale is from0 to infinity too. This condition is met by all NUMBER fields with any Precision and Scale.
When using Data Type Mapping, first matching rule is searched for each type, and it is used
for mapping. In the second example, the first set rule appears to be the first matching rule forall three types, and therefore the ftFMTBCD type will be used for all fields in Delphi.
If to go back to the first example, the first matching rule for the NUMBER(5,2) type is the firstrule, for NUMBER(10,4) - the second rule, and for NUMBER(15,6) - the third rule. So in thefirst example, the expected result was obtained.
So it should be remembered that if rules for Data Type Mapping are set so that two or morerules that contradict to each other are set for one type in the database, the rules will beapplied in the specifed order.

Defining rules for Connection and Dataset
Data Type Mapping allows setting rules for the whole connection as well as for each DataSetin the application.
For example, such table is created in Oracle:
CREATE TABLE PERSON© 2019 Devart

Using ODAC(ID
NUMBERNOT NULLFIRSTNAMEVARCHAR2(20),LASTNAME
VARCHAR2(30),GENDER_CODE
VARCHAR2(1),BIRTH_DTTM
DATE,CONSTRAINT PK_PERSON PRIMARY KEY (ID)
)

100

,

It is exactly known that the birth_dttm field contains birth day, and this field should be ftDate in
Delphi, and not ftDateTime. If such rule is set:
OraSession.DataTypeMap.Clear;
OraSession.DataTypeMap.AddDBTypeRule(OraDate, ftDate);
all DATETIME fields in Delphi will have the ftDate type, that is incorrect. The ftDate type was
expected to be used for the DATETIME type only when working with the person table. In thiscase, Data Type Mapping should be set not for the whole connection, but for a particular
DataSet:
OraQuery.DataTypeMap.Clear;
OraQuery.DataTypeMap.AddDBTypeRule(OraDate, ftDate);
Or the opposite case. For example, DATETIME is used in the application only for datestorage, and only one table stores both date and time. In this case, the following rules setting
will be correct:
OraSession.DataTypeMap.Clear;
OraSession.DataTypeMap.AddDBTypeRule(OraDate, ftDate);
OraQuery.DataTypeMap.Clear;
OraQuery.DataTypeMap.AddDBTypeRule(OraDate, ftDateTime);
In this case, in all DataSets for the DATETIME type fields with the ftDate type will be created,
and for OraQuery - with the ftDateTime type.
The point is that the priority of the rules set for the DataSet is higher than the priority of therules set for the whole connection. This allows both flexible and convenient setting of Data
Type Mapping for the whole application. There is no need to set the same rules for each
DataSet, all the general rules can be set once for the whole connection. And if a DataSet withan individual Data Type Mapping is necessary, individual rules can be set for it.

Rules for a particular field
Sometimes there is a need to set a rule not for the whole connection, and not for the wholedataset, but only for a particular field.
e.g. there is such table in a Oracle database:
CREATE TABLE ITEM(ID NUMBER NOT NULL,© 2019 Devart

101

Oracle Data Access Components

NAME VARCHAR2(50) NOT NULL,GUID VARCHAR2(38),
CONSTRAINT PK_ITEM PRIMARY KEY (ID))
The guid field contains a unique identifier. For convenient work, this identifier is expected tobe mapped to the TGuidField type in Delphi. But there is one problem, if to set the rule like
this:
OraQuery.DataTypeMap.Clear;
OraQuery.DataTypeMap.AddDBTypeRule(oraVarchar2, ftGuid);then both name and guid fields will have the ftGuid type in Delphi, that does not correspond towhat was planned. In this case, the only way is to use Data Type Mapping for a particularfield:
OraQuery.DataTypeMap.AddFieldNameRule('GUID', ftGuid);
In addition, it is important to remember that setting rules for particular fields has the highest
priority. If to set some rule for a particular field, all other rules in the Connection or DataSet willbe ignored for this field.

Ignoring conversion errors
Data Type Mapping allows mapping various types, and sometimes there can occur the
problem with that the data stored in a DB cannot be converted to the correct data of theDelphi field type specified in rules of Data Type Mapping or vice-versa. In this case, an error
will occur, which will inform that the data cannot be mapped to the specified type.
For example:

Database value

Destination field type'text value'

ftInteger

1000000

ftSmallint

15,1

ftInteger

Error
String cannot be converted
to Integer
Value is out of range
Cannot convert float to
integer

But when setting rules for Data Type Mapping, there is a possibility to ignore data conversion
errors:
OraSession.DataTypeMap.AddDBTypeRule(oraVarchar2, ftInteger, True);In this case, the correct conversion is impossible. But because of ignoring data conversion
errors, Data Type Mapping tries to return values that can be set to the Delphi fields or DB
fields depending on the direction of conversion.

© 2019 Devart

Using ODAC

Database value

Destination field
type

Result'text value'

ftInteger

0

1000000

ftSmallint

32767

15,1

ftInteger

15

102

Result description
0 will be returned if
the text cannot be
converted to number
32767 is the max
value that can be
assigned to the
Smallint data type15,1 was truncated to
an integer value

Therefore ignoring of conversion errors should be used only if the conversion results are
expected.

© 1997-2019
Devart. All Rights
Reserved.

4.5

Request Support

DAC Forum

Provide Feedback

Data Encryption
ODAC has built-in algorithms for data encryption and decryption. To enable encryption, you
should attach the TCREncryptor component to the dataset, and specify the encrypted fields.
When inserting or updating data in the table, information will be encrypted on the client side inaccordance with the specified method. Also when reading data from the server, thecomponents decrypt the data in these fields "on the fly".
For encryption, you should specify the data encryption algorithm (the EncryptionAlgorithm
property) and password (the Password property). On the basis of the specified password, thekey is generated, which encrypts the data. There is also a possibility to set the key directly
using the SetKey method.
When storing the encrypted data, in addition to the initial data, you can also store additional
information: the GUID and the hash. (The method is specified in the
TCREncryptor.DataHeader property).
If data is stored without additional information, it is impossible to determine whether the datais encrypted or not. In this case, only the encrypted data should be stored in the column,
otherwise, there will be confusion because of the inability to distinguish the nature of the data.
Also in this way, the similar source data will be equivalent in the encrypted form, that is notgood from the point of view of the information protection. The advantage of this method is thesize of the initial data equal to the size of the encrypted data.
To avoid these problems, it is recommended to store, along with the data, the appropriate
GUID, which is necessary for specifying that the value in the record is encrypted and it must

© 2019 Devart

103

Oracle Data Access Components

be decrypted when reading data. This allows you to avoid confusion and keep in the same
column both the encrypted and decrypted data, which is particularly important when using an
existing table. Also, when doing in this way, a random initializing vector is generated before
the data encryption, which is used for encryption. This allows you to receive different results
for the same initial data, which significantly increases security.
The most preferable way is to store the hash data along with the GUID and encrypted
information to determine the validity of the data and verify its integrity. In this way, if there wasan attempt to falsify the data at any stage of the transmission or data storage, whendecrypting the data, there will be a corresponding error generated. For calculating the hash
the SHA1 or MD5 algorithms can be used (the HashAlgorithm property).
The disadvantage of the latter two methods - additional memory is required for storage of theauxiliary information.
As the encryption algorithms work with a certain size of the buffer, and when storing theadditional information it is necessary to use additional memory, TCREncryptor supports
encryption of string or binary fields only (ftString, ftWideString, ftBytes, ftVarBytes, ftBlob,
ftMemo, ftWideMemo). If encryption of string fields is used, firstly, the data is encrypted, andthen the obtained binary data is converted into hexadecimal format. In this case, data storage
requires two times more space (one byte = 2 characters in hexadecimal).
Therefore, to have the possibility to encrypt other data types (such as date, number, etc.), it isnecessary to create a field of the binary or BLOB type in the table, and then convert it into thedesired type on the client side with the help of data mapping.
It should be noted that the search and sorting by encrypted fields become impossible on theserver side. Data search for these fields can be performed only on the client after decryptionof data using the Locate and LocateEx methods. Sorting is performed by setting the
TMemDataSet.IndexFieldNames property.
Example.
Let's say there is an employee list of an enterprise stored in the table with the following data:
full name, date of employment, salary, and photo. We want all these data to be stored in theencrypted form. Write a script for creating the table:
CREATE TABLE EMP (EMPNO NUMBER,
ENAME VARCHAR2(2000),
HIREDATE VARCHAR2(200),
SAL VARCHAR2(200),
FOTO BLOB,CONSTRAINT PK_EMP PRIMARY KEY (EMPNO));
As we can see, the fields for storage of the textual information, date, and floating-point
number are created with the VARCHAR2 type. This is for the ability to store encrypted
information, and in the case of the text field - to improve performance. Write the code to© 2019 Devart

Using ODAC

104

process this information on the client.
OraQuery.SQL.Text := 'SELECT * FROM EMP';
OraQuery.Encryption.Encryptor := OraEncryptor;
OraQuery.Encryption.Fields := 'ENAME, HIREDATE, SAL, FOTO';
OraEncryptor.Password := '11111';
OraQuery.DataTypeMap.AddFieldNameRule ('ENAME', ftString);
OraQuery.DataTypeMap.AddFieldNameRule ('HIREDATE', ftDateTime);
OraQuery.DataTypeMap.AddFieldNameRule ('SAL', ftFloat);
OraQuery.Open;© 1997-2019
Devart. All Rights
Reserved.

4.6

Request Support

DAC Forum

Provide Feedback

Working in an Unstable Network
The following settings are recommended for working in an unstable network:
TCustomDAConnection.Options.LocalFailover = True
TCustomDAConnection.Options.DisconnectedMode = True
TDataSet.CachedUpdates = True
TCustomDADataSet.FetchAll = True
TCustomDADataSet.Options.LocalMasterDetail = True
AutoCommit = True
These settings minimize the number of requests to the server. Using
TCustomDAConnection.Options.DisconnectedMode allows DataSet to work without an active
connection. It minimizes server resource usage and reduces connection break probability. I.
e. in this mode connection automatically closes if it is not required any more. But every
explicit operation must be finished explicitly. That means each explicit connect must be
followed by explicit disconnect. Read Working with Disconnected Mode topic for more
information.
Setting the FetchAll property to True allows to fetch all data after cursor opening and to close
connection. If you are using master/detail relationship, we recommend to set the
LocalMasterDetail option to True.
It is not recommended to prepare queries explicitly. Use the CachedUpdates mode for
DataSet data editing. Use the TCustomDADataSet.Options.UpdateBatchSize property to
reduce the number of requests to the server.
If a connection breaks, a fatal error occurs, and the OnConnectionLost event will be raised if
the following conditions are fulfilled:
There are no active transactions;
There are no opened and not fetched datasets;
There are no explicitly prepared datasets or SQLs.
If the user does not refuse suggested RetryMode parameter value (or does not use the© 2019 Devart

105

Oracle Data Access Components

OnConnectionLost event handler), ODAC can implicitly perform the following operations:
Connect;
DataSet.ApplyUpdates;
DataSet.Open;
I.e. when the connection breaks, implicit reconnect is performed and the corresponding
operation is reexecuted. We recommend to wrap other operations in transactions and fulfill
their reexecuting yourself.
The using of Pooling in Disconnected Mode allows to speed up most of the operations
because of connecting duration reducing.

See Also
FailOver demoWorking with Disconnected Mode
TCustomDAConnection.Options
TCustomDAConnection.Pooling© 1997-2019
Devart. All Rights
Reserved.

4.7

Request Support

DAC Forum

Provide Feedback

Disconnected Mode
In disconnected mode a connection opens only when it is required. After performing all server
calls connection closes automatically until next server call is required. Datasets remain
opened when connection closes. Disconnected Mode may be useful for saving server
resources and operating in an unstable or expensive network. Drawback of using
disconnected mode is that each connection establishing requires some time for authorization.
If connection is often closed and opened it can slow down application work. We recommend
to use pooling to solve this problem. For additional information see
TCustomDAConnection.Pooling.
To enable disconnected mode set TCustomDAConnection.Options.DisconnectedMode toTrue.
In disconnected mode a connection is opened for executing requests to the server (if it was
not opened already) and is closed automatically if it is not required any more. If the connection
was explicitly opened (the Connect method was called or the Connected property was
explicitly set to True), it does not close until the Disonnect method is called or the Connected
property is set to False explicitly.
The following settings are recommended to use for working in disconnected mode:
TDataSet.CachedUpdates = True
TCustomDADataSet.FetchAll = True
TCustomDADataSet.Options.LocalMasterDetail = True
© 2019 Devart

Using ODAC

106

AutoCommit = True
These settings minimize the number of requests to the server.

Disconnected mode features
If you perform a query with the FetchAll option set to True, connection closes when all data is
fetched if it is not used by someone else. If the FetchAll option is set to false, connection does
not close until all data blocks are fetched.
If explicit transaction was started, connection does not close until the transaction iscommitted or rolled back.
If the query was prepared explicitly, connection does not close until the query is unprepared or
its SQL text is changed.
If dataset uses TCustomDADataSet.LockMode set to lmLockImmediate, connection opens
when user starts to edit the record, and closes after user posts or cancels changes.

See Also
TCustomDAConnection.Options
FetchAll
Devart.Odac.TOraQuery.LockMode
TCustomDAConnection.Pooling
TCustomDAConnection.Connect
TCustomDAConnection.Disonnect
Connected
Working in unstable network© 1997-2019
Devart. All Rights
Reserved.

4.8

Request Support

DAC Forum

Provide Feedback

Batch Operations
Data amount processed by modern databases grows steadily. In this regard, there is anacute problem – database performance. Insert, Update and Delete operations have to be
performed as fast as possible. Therefore Devart provides several solutions to speed up
processing of huge amounts of data. So, for example, insertion of a large portion of data to a
DB is supported in the TOraLoader. Unfortunately, TOraLoader allows to insert data only – it
can’t be used for updating and deleting data.
The new version of Devart Delphi Data Access Components introduces the new mechanism
for large data processing — Batch Operations. The point is that just one parametrized Modify
SQL query is executed. The plurality of changes is due to the fact that parameters of such a© 2019 Devart

107

Oracle Data Access Components

query will be not single values, but a full array of values. Such approach increases the speedof data operations dramatically. Moreover, in contrast to using TOraLoader, Batch operations
can be used not only for insertion, but for modification and deletion as well.
Let’s have a better look at capabilities of Batch operations with an example of the
BATCH_TEST table containing attributes of the most popular data types.

Batch_Test table generating script
CREATE TABLE BATCH_TEST(ID
INTEGER NOT NULL PRIMARY KEY,
F_INTEGER INTEGER,
F_FLOAT FLOAT,F_STRING VARCHAR2(250),
F_DATE DATE)

Batch operations execution
To insert records into the BATCH_TEST table, we use the following SQL query:

INSERT INTO BATCH_TEST VALUES (:ID, :F_INTEGER, :F_FLOAT, :F_STRING, :F_DATWhen a simple insertion operation is used, the query parameter values look as follows:

Parameters:ID
1:F_INTEGER
100:F_FLOAT
2.5:F_STRING:F_DATE‘String Value 1' 01.09.2015

After the query execution, one record will be inserted into the BATCH_TEST table.
When using Batch operations, the query and its parameters remain unchanged. However,parameter values will be enclosed in an array:

Parameters
:ID
1
2
3
4
5

:F_INTEGER
100
200
300
400
500

:F_FLOAT
2.5
3.15
5.08
7.53430.4555:F_STRING‘String Value 1'‘String Value 2'‘String Value 3'‘String Value 4'‘String Value 5':F_DATE
01.09.2015
01.01.2000
09.09.2010
10.10.2015
01.09.2015

Now, 5 records are inserted into the table at a time on query execution.
How to implement a Batch operation in the code?

Batch INSERT operation sample© 2019 Devart

Using ODAC

108

Let’s try to insert 1000 rows to the BATCH_TEST table using a Batch Insert operation:var
i: Integer;
begin// describe the SQL query
OraQuery1.SQL.Text := 'INSERT INTO BATCH_TEST VALUES (:ID, :F_INTEGER, :F_// define the parameter types passed to the query :OraQuery1.Params[0].DataType := ftInteger;
OraQuery1.Params[1].DataType := ftInteger;
OraQuery1.Params[2].DataType := ftFloat;
OraQuery1.Params[3].DataType := ftString;
OraQuery1.Params[4].DataType := ftDateTime;// specify the array dimension:
Query1.Params.ValueCount := 1000;// populate the array with parameter values:
for i := 0 to Query1.Params.ValueCount - 1 do begin
OraQuery1.Params[0][i].AsInteger := i + 1;
OraQuery1.Params[1][i].AsInteger := i + 2000 + 1;
OraQuery1.Params[2][i].AsFloat := (i + 1) / 12;
OraQuery1.Params[3][i].AsString := 'Values ' + IntToStr(i + 1);
OraQuery1.Params[4][i].AsDateTime := Now;end;// insert 1000 rows into the BATCH_TEST table
OraQuery1.Execute(1000);
end;
This command will insert 1000 rows to the table with one SQL query using the prepared arrayof parameter values. The number of inserted rows is defined in the Iters parameter of the
Execute(Iters: integer; Offset: integer = 0) method. In addition, you can pass anotherparameter – Offset (0 by default) – to the method. The Offset parameter points the arrayelement, which the Batch operation starts from.
We can insert 1000 records into the BATCH_TEST table in 2 ways.
All 1000 rows at a time:
Query1.Execute(1000);
2×500 rows:// insert first 500 rows
OraQuery1.Execute(500, 0);// insert next 500 rows
OraQuery1.Execute(500, 500);
500 rows, then 300, and finally 200:// insert 500 rows
Query1.Execute(500, 0);// insert next 300 rows starting from 500
OraQuery1.Execute(300, 500);// insert next 200 rows starting from 800
Query1.Execute(200, 800);

Batch UPDATE operation sample© 2019 Devart

109

Oracle Data Access Components

With Batch operations we can modify all 1000 rows of our BATCH_TEST table just thissimple:var
i: Integer;
begin// describe the SQL query
Query1.SQL.Text := 'UPDATE BATCH_TEST SET F_INTEGER=:F_INTEGER, F_FLOAT=:F// define parameter types passed to the query:
Query1.Params[0].DataType := ftInteger;
Query1.Params[1].DataType := ftFloat;
Query1.Params[2].DataType := ftString;
Query1.Params[3].DataType := ftDateTime;
Query1.Params[4].DataType := ftInteger;// specify the array dimension:
Query1.Params.ValueCount := 1000;// populate the array with parameter values:
for i := 0 to 1000 - 1 do begin
Query1.Params[0][i].AsInteger := i - 2000 + 1;
Query1.Params[1][i].AsFloat := (i + 1) / 100;
Query1.Params[2][i].AsString := 'New Values ' + IntToStr(i + 1);
Query1.Params[3][i].AsDateTime := Now;
Query1.Params[4][i].AsInteger := i + 1;
end;// update 1000 rows in the BATCH_TEST table
Query1.Execute(1000);end;

Batch DELETE operation sample
Deleting 1000 rows from the BATCH_TEST table looks like the following operation:var
i: Integer;
begin// describe the SQL query
OraQuery1.SQL.Text := 'DELETE FROM BATCH_TEST WHERE ID=:ID';// define parameter types passed to the query:
OraQuery1.Params[0].DataType := ftInteger;// specify the array dimension
OraQuery1.Params.ValueCount := 1000;// populate the arrays with parameter values
for i := 0 to 1000 - 1 do
OraQuery1.Params[0][i].AsInteger := i + 1;// delete 1000 rows from the BATCH_TEST table
OraQuery1.Execute(1000);
end;

Performance comparison
The example with BATCH_TEST table allows to analyze execution speed of normal
operations with a database and Batch operations:© 2019 Devart

Using ODAC

Operation TypeInsertUpdateDelete110

25 000 records
Standard Operation
Batch Operation (sec.)(sec.)
17.64
0.59
18.28
1.20
16.19
0.45
The less, the better.

It should be noted, that the retrieved results may differ when modifying the same table ondifferent database servers. This is due to the fact that operations execution speed may differ
depending on the settings of a particular server, its current workload, throughput, network
connection, etc.

Thing you shouldn’t do when accessing parameters in Batch operations!
When populating the array and inserting records, we accessed query parameters by index. It
would be more obvious to access parameters by name:for i := 0 to 9999 do begin
OraQuery1.Params.ParamByName('ID')[i].AsInteger := i + 1;
OraQuery1.Params.ParamByName('F_INTEGER')[i].AsInteger := i + 2000 + 1;
OraQuery1.Params.ParamByName('F_FLOAT')[i].AsFloat := (i + 1) / 12;
OraQuery1.Params.ParamByName('F_STRING')[i].AsString := 'Values ' + IntToS
OraQuery1.Params.ParamByName('F_DATE')[i].AsDateTime := Now;
end;
However, the parameter array would be populated slower, since you would have to define theordinal number of each parameter by its name in each loop iteration. If a loop is executed
10000 times – performance loss can become quite significant.

© 1997-2019
Devart. All Rights
Reserved.

4.9

Request Support

DAC Forum

Provide Feedback

Increasing PerformanceThis topic considers basic stages of working with DataSet and ways to increase performanceon each of these stages.

Connect
If your application performs Connect/Disconnect operations frequently, additional
performance can be gained using pooling mode (TCustomDAConnection.Pooling = True). It
reduces connection reopening time greatly (hundreds times). Such situation usually occurs in
web applications.
© 2019 Devart

111

Oracle Data Access Components

ExecuteIf your application executes the same query several times, you can use theTCustomDADataSet.Prepare method or set the TDADataSetOptions.AutoPrepare property toincrease performance. For example, it can be enabled for Detail dataset in Master/Detail
relationship or for update objects in TDAUpdateSQL. The performance gain achieved this way
can be anywhere from several percent to several times, depending on the situation.
To execute SQL statements a TOraSQL component is more preferable than TOraQuery. It
can give several additional percents performance gain.
Using DML Array parameters, combined with query preparing can give a considerable
performance gain. For example if you need to perform an insert query plenty of times, it isrecommended to do it the following way to get the best performance. At first, set parameterdata types, and then prepare the query. After that, set param Lengths and fill them withvalues. Finally, execute the query. For instance:
OraSQL1.ParamByName('Param1').DataType := ftInteger;
OraSQL1.Prepare;
OraSQL1.ParamByName('Param1').Param[0].Length := 1000;
for i := 1 to 1000
OraSQL1.ParamByName('Param1').Param[0].ItemAsInteger[i] := 123;
OraSQL1.Execute;
If you execute many different SELECT statements, you can gain additional performance bysetting the TOraSQL.StatementCache property to True. This feature is available only with
Oracle 9.2i and higher. The TOraSession.Options.StatementCache property should be set toTrue to use this feature. But using the StatementCache property you may easy step overmaximum open cursors on Oracle server. And thus you must be attentive when using thisoption.
If the TCustomDADataSet.Options.StrictUpdate option is set to False, the RowsAffected
property is not calculated and becomes equal zero. This can improve performance of query
executing, so if you need to execute many data updating statements at once and you don't
mind affected rows count, set this option to False.

Fetch
In some situations you can increase performance a bit by using
TCustomDADataSet.Options.CompressBlobMode. Sometimes using
TOraDataSet.Options.DeferredLobRead can give some additional performance, because
Lobs will be read when they are required. You can also set
TOraSession.Options.OptimizerMode to adjust the fetch performance.
Oracle optimizer can be tuned to increase performance of SQL statements executing anddata fetching.

© 2019 Devart

Using ODAC

112

You can also tweak your application performance by using the following properties ofTCustomDADataSet descendants:
FetchRows
Options.FlatBuffers
Options.LongStrings
UniDirectional
See the descriptions of these properties for more details and recommendations.

Navigate
The Locate function works faster when dataset is locally sorted on KeyFields fields. Local
dataset sorting can be set with the IndexFieldNames property. Performance gain can be large
if the dataset contains a large number of rows.
Lookup fields work faster when lookup dataset is locally sorted on lookup Keys.
Setting the TDADataSetOptions.CacheCalcFields property can improve performance whenlocally sorting and locating on calculated and lookup fields. It can be also useful whencalculated field expressions contain complicated calculations.
Setting the TDADataSetOptions.LocalMasterDetail option can improve performance greatly
by avoiding server requests on detail refreshes. Setting the TDADataSetOptions.DetailDelay
option can be useful for avoiding detail refreshes when switching master DataSet records
frequently.

UpdateIf your application updates datasets in the CachedUpdates mode, then setting theTCustomDADataSet.Options.UpdateBatchSize option to more than 1 can improve
performance several hundred times more by reducing the number of requests to the server.
Specifying update SQL statements in a dataset improves performance because of omitting
SQL statements generation and automatic preparation of internal updating datasets that are
created for every kind of update SQL statements.
You can also increase the data sending performance a bit (several percents) by using
Dataset.UpdateObject.ModifyObject, Dataset.UpdateObject, etc. Little additional performance
improvement can be reached by setting the AutoPrepare property for these objects.

InsertIf you are about to insert a large number of records into a table, you should use the
T:Devart.Odac.TOraLoader component instead of Insert/Post methods, or execution of the
INSERT commands multiple times in a cycle. Sometimes usage of© 2019 Devart

113

Oracle Data Access Components

T:Devart.Odac.TOraLoader improves performance several times.

© 1997-2019
Devart. All Rights
Reserved.

4.10

Request Support

DAC Forum

Provide Feedback

MacrosMacros help you to change SQL statements dynamically. They allow partial replacement of
the query statement by user-defined text. Macros are identified by their names which are thenreferred from SQL statement to replace their occurrences for associated values.
First step is to assign macros with their names and values to a dataset object.
Then modify SQL statement to include macro names into desired insertion points. Prefix
each name with & ("at") sign to let ODAC discriminate them at parse time. Resolved SQL
statement will hold macro values instead of their names but at the right places of theiroccurrences. For example, having the following statement with the TableName macro name:
SELECT * FROM &TableName
You may later assign any actual table name to the macro value property leaving your SQL
statement intact.
Query1.SQL.Text := 'SELECT * FROM &TableName';
Query1.MacroByName('TableName').Value := 'Dept';
Query1.Open;ODAC replaces all macro names with their values and sends SQL statement to the serverwhen SQL execution is requested.
Note that there is a difference between using TMacro AsString and Value properties. If you set
macro with the AsString property, it will be quoted. For example, the following statements will
result in the same result Query1.SQL property value.
Query1.MacroByName('StringMacro').Value := '''A string''';Query1.MacroByName('StringMacro').AsString := 'A string';
Macros can be especially useful in scripts that perform similar operations on different objects.
You can use macros that will be replaced with an object name. It allows you to have the same
script text and to change only macro values. For example, the following is a script thatcreates a new user account and grants required privileges.
Script1.SQL.Add('CREATE USER &Username IDENTIFIED BY &Password;');Script1.SQL.Add('GRANT &Privileges TO &Username;');To execute the script for another user you do not have to change the script SQL property, you
can just set required macro values.
You may also consider using macros to construct adaptable conditions in WHERE clauses ofyour statements.

© 2019 Devart

Using ODAC

114

See Also
TMacroTCustomDADataSet.MacroByName
TCustomDADataSet.Macros© 1997-2019
Devart. All Rights
Reserved.

4.11

Request Support

DAC Forum

Provide Feedback

DataSet Manager

DataSet Manager window
The DataSet Manager window displays the datasets in your project. You can use the DataSet
Manager window to create a user interface (consisting of data-bound controls) by dragging
items from the window onto forms in your project. Each item has a drop-down control list
where you can select the type of control to create prior to dragging it onto a form. You cancustomize the control list with additional controls, including the controls you have created.

Using the DataSet Manager window, you can:Create forms that display data by dragging items from the DataSet Manager window onto
forms.
© 2019 Devart

115

Oracle Data Access Components

Customize the list of controls available for each data type in the DataSet Manager window.
Choose which control should be created when dragging an item onto a form in your
Windows application.
Create and delete TField objects in the DataSets of your project.

Opening the DataSet Manager window
You can display the DataSet Manager window by clicking DataSet Manager on the Tools
menu. You can also use IDE desktop saving/loading to save DataSet Manager window
position and restore it during the next IDE loads.

Observing project DataSets in the DataSet Manager
Window
By default DataSet Manager shows DataSets of currently open forms. It can also extract
DataSets from all forms in the project. To use this, click Extract DataSets from all forms inproject button. This settings is remembered. Note, that using this mode can slow down
opening of the large projects with plenty of forms and DataSets. Opening of such projects canbe very slow in Delphi 6 and Borland Developer Studio 2006 and can take up to several tensof minutes.
DataSets can be grouped by form or connection. To change DataSet grouping click theGrouping mode button or click a down. You can also change grouping mode by selecting
required mode from the DataSet Manager window popup menu.

© 2019 Devart

Using ODAC

116

Creating Data-bound Controls
You can drag an item from the DataSet Manager window onto a form to create a new databound control. Each node in the DataSet Manager window allows you to choose the type ofcontrol that will be created when you drag it onto a form. You must choose between a Gridlayout, where all columns or properties are displayed in a TDataGrid component, or a Details
layout, where all columns or properties are displayed in individual controls.
To use grid layout drag the dataset node on the form. By default TDataSource and TDBGrid
components are created. You can choose the control to be created prior to dragging byselecting an item in the DataSet Manager window and choosing the control from the item's
drop-down control list.

To use Details layout choose Details from the DataSet node drop-down control list in the
DataSet Manager window. Then select required controls in the drop-down control list for each
DataSet field. DataSet fields must be created. After setting required options you can drag the
DataSet to the form from the DataSet wizard. DataSet Manager will create TDataSourcecomponent, and a component and a label for each field.

© 2019 Devart

117

Oracle Data Access Components

Adding custom controls to the DataSet Manager window
To add custom control to the list click the Options button on the DataSet Manager toolbar. A
DataSet Manager - Customize controls dialog will appear. Using this dialog you can set
controls for the DataSets and for the DataSet fields of different types. To do it, click DataSets
node or the node of field of required type in DB objects groups box and use Add and Remove
buttons to set required control list. You can also set default control by selecting it in the list of
assigned DB controls and pressing Default button.

© 2019 Devart

Using ODAC

118

The default configuration can easily be restored by pressing Reset button in the DataSet
Manager - Options dialog.

Working with TField objects
DataSet Manager allows you to create and remove TField objects. DataSet must be active towork with its fields in the DataSet Manager. You can add fields, based on the database table
columns, create new fields, remove fields, use drag-n-drop to change fields order.
To create a field based on the database table column right-click the Fields node and selectCreate Field from the popup menu or press <Insert>. Note that after you add at least one fieldmanually, DataSet fields corresponding to data fields will not be generated automatically when
you drag the DataSet on the form, and you can not drag such fields on the form. To add allavailable fields right-click the Fields node and select Add all fields from the popup menu.
To create new field right-click the Fields node and select New Field from the popup menu orpress <Ctrl+Insert>. The New Field dialog box will appear. Enter required values and press
OK button.
To delete fields select these fields in the DataSet Manager window and press <Delete>.
DataSet Manager allows you to change view of the fields displayed in the main window. Open© 2019 Devart

119Oracle Data Access Components

the Customize controls dialog, and jump to the Options page.

You can chose what information will be added to names of the Field and Data Field objects inthe main window of DataSet Manager. Below you can see the example.

© 1997-2019
Devart. All Rights
Reserved.

4.12

Request Support

DAC Forum

Provide Feedback

Using Connection Pooling
Connection pooling enables an application to use a connection from a pool of connections
that do not need to be reestablished for each use. Once a connection has been created andplaced in a pool, an application can reuse that connection without performing the complete
connection process.
Using a pooled connection can result in significant performance gains, because applications
can save the overhead involved in making a connection. This can be particularly significant for
middle-tier applications that connect over a network or for applications that connect anddisconnect repeatedly, such as Internet applications.
To use connection pooling set the Pooling property of the TCustomDAConnection component
to True. Also you should set the PoolingOptions of the TCustomDAConnection. These© 2019 Devart

Using ODAC

120

options include MinPoolSize, MaxPoolSize, Validate, ConnectionLifeTime. Connections
belong to the same pool if they have identical values for the following parameters:
MinPoolSize, MaxPoolSize, Validate, ConnectionLifeTime, Server, Username, Password ,TOraSession.Username, TOraSession.Server, TOraSession.ConnectMode,
TOraSession.Options.UseOCI7 . When a connection component disconnects from thedatabase the connection actually remains active and is placed into the pool. When this or
another connection component connects to the database it takes a connection from the pool.
Only when there are no connections in the pool, new connection is established.
ODAC connection pool is thread safe. Multiple threads of an application can connect to the
database and disconnect from it using TCustomDAConnection components with poolingenabled at the same time. Connection pool uses the most optimal algorithms for fast andreliable work.
Connections in the pool are validated to make sure that a broken connection will not be
returned for the TCustomDAConnection component when it connects to the database. The
pool validates connection when it is placed to the pool (e. g. when the TCustomDAConnection
component disconnects). If connection is broken it is not placed to the pool. Instead the poolfrees this connection. Connections that are held in the pool are validated every 30 seconds.
All broken connections are freed. If you set the PoolingOptions.Validate to True, a connection
also will be validated when the TCustomDAConnection component connects and takes aconnection from the pool. When some network problem occurs all connections to the
database can be broken. Therefore the pool validates all connections before any of them will
be used by a TCustomDAConnection component if a fatal error is detected on one
connection.
The pool frees connections that are held in the pool during a long time. If no new connections
are placed to the pool it becomes empty after approximately 4 minutes. This pool behaviour isintended to save resources when the count of connections in the pool exceeds the count thatis needed by application. If you set the PoolingOptions.MinPoolSize property to a non-zerovalue, this prevents the pool from freeing all pooled connections. When connection count in
the pool decreases to MinPoolSize value, remaining connection will not be freed except if they
are broken.
The PoolingOptions.MaxPoolSize property limits the count of connections that can be activeat the same time. If maximum count of connections is active and someTCustomDAConnection component tries to connect, it will have to wait until any ofTCustomDAConnection components disconnect. Maximum wait time is 30 seconds. If active
connections' count does not decrease during 30 seconds, the TCustomDAConnection
component will not connect and an exception will be raised.
You can limit the time of connection's existence by setting the
PoolingOptions.ConnectionLifeTime property. When the TCustomDAConnection component© 2019 Devart

121

Oracle Data Access Components

disconnects, its internal connection will be freed instead of placing to the pool if thisconnection is active during the time longer than the value of the
PoolingOptions.ConnectionLifeTime property. This property is designed to make loadbalancing work with the connection pool.
To force freeing of a connection when the TCustomDAConnection component disconnects,
the RemoveFromPool method of TCustomDAConnection can be used. You can also free allconnection in the pool by using the class procedures Clear or AsyncClear of
TOraConnectionPoolManager. These procedures can be useful when you know that allconnections will be broken for some reason.
It is recommended to use connection pooling with the DisconnectMode option of theTCustomDAConnection component set to True. In this case internal connections can beshared between TCustomDAConnection components. When some operation is performedon the TCustomDAConnection component (for example, an execution of SQL statement) thiscomponent will connect using pooled connection and after performing operation it will
disconnect. When an operation is performed on another TCustomDAConnection component
it can use the same connection from the pool.
Also, ODAC supports proxy connection pooling. When proxy pooling is used, TOraSession
components can connect to a database with different Username and Password properties
but all connections in the pool use PoolingOptions.ProxyUsername andPoolingOptions.ProxyPassword. When connecting, TOraSession component creates a newconnection. It uses Username, Password properties and a connection from the pool as aproxy connection. The proxy connection pool allows you to use a single pool for all sessions
with different Username and Password properties.
You can use OCI connection pooling or MTS connection pooling. To use these types ofpooling set the PoolingOptions.PoolType to ptOCI or ptMTS. In this case the pool is createdand managed by the Oracle client or by MTS.

See Also
TCustomDAConnection.Pooling
TCustomDAConnection.PoolingOptions
TOraSession.PoolingOptions
Working with Disconnected Mode

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 Devart

Using ODAC

4.13

122

Automatic Key Field Value Generation
When editing dataset it is often convenient to generate key field(s) values automaticallyinstead of filling them manually. In the most common way application developer generates
primary key value basing it on previously created sequence. There are three ways to do it.
First, application independent way - developer creates AFTER INSERT trigger that fills thefield value. But here he faces the problem with getting value inserted by trigger back todataset. This problem can be easily solved in ODAC by specifying return parameters. For
instance:...
// suppose that AFTER INSERT trigger fills DepNo field
OraQuery.SQL.Text := 'SELECT DepNo, DepName, Location FROM Department';
OraQuery.SQLInsert.Text := 'INSERT INTO Department (DepNo, DepName, Location'VALUES(DepNo, DepName, Location) ' +'RETURNING DepNo INTO :DepNo';...
Second way is custom key field value generation. Developer can fill key field value in
TOraDataSet.BeforePost event handler. But in this case he should manually execute queryand retrieve sequence value. So this way may be useful only if some special value
processing is needed.
The third way, using KeySequence is the simplest. Developer only needs to specify two
properties and key field values are generated automatically. There is no need to create trigger
or perform custom BeforePost processing.

...
OraQuery.SQL.Text := 'SELECT DepNo, DepName, Location FROM Department';
OraQuery.KeyFields := 'DepNo';// key field
OraQuery.KeySequence := 'DepSequence'; // sequence that will generate values...

See also
KeySequence© 1997-2019
Devart. All Rights
Reserved.

4.14

Request Support

DAC Forum

Provide Feedback

TOraLoader Component
There are ceses when you need to put large amount of data to Oracle database. Of course,
you may construct INSERT SQL statement and execute it with TOraSQL component. But ittakes a lot of time. You can greatly speed up loading time of data by using DML arrayfeatures. Oracle 8i has better way to do it. With Oracle 8i using the direct path load interface
is possible. The direct path load interface allows to access the direct path load engine of the
Oracle database server to perform the functions of the Oracle SQL*Loader utility. This© 2019 Devart

123

Oracle Data Access Components

functionality provides the ability to load data from external files into Oracle database objects,
either a table or a partition of a partitioned table.
ODAC simplifies using direct path load interface by TOraLoader component. TOraLoader
allows you to load various formatted data. The capability of TOraLoader component to load
various formatted data is reached by reading external data in writing method itself.
To write your own loader you should:
create TOraLoader component;
set name of loading table to TableName;create and customize columns which will be loaded (use TOraLoader component editor atdesign time);
write your own event handler: OnGetColumnData or OnPutData
call Load method to start loading.

See Also
TOraLoader
TDPColumn© 1997-2019
Devart. All Rights
Reserved.

4.15

Request Support

DAC Forum

Provide Feedback

TOraTransaction Component
TOraTransaction component can be used to manage either local or distributed (global)transactions.
To start local transaction with TOraTransaction component, set DefaultSession property of
the component to a session on which transaction will be performed. Set IsolationLevel
property optionally. Then call StartTransaction method of the TOraTransaction component.
To manage transaction use Commit, Rollback, Savepoint, RollbackToSavepoint methods.
Global transactions can be performed on one or more sessions connected to the same or to
the different databases. These sessions can be established from different applications andcomputers. On each of these sessions a separate branch of transaction is performed. Global
transaction can be coordinated either by internal mechanism of TOraTransaction or Microsoft
Transaction Manager DTC. This behavior can be tuned by GlobalCoordinator property. In
case of using internal mechanism you should specify TransactionId and BranchQualifier foreach session to identify global transaction. Global transaction can be managed using
Commit, Rollback, Savepoint, RollbackToSavepoint, Detach and Resume methods of
TOraTransaction. If an OraSession uses global transaction, it must have non-empty
InternalName property. For more information about global transaction please refer to Oracle
documentation.

© 2019 Devart

Using ODAC

124

Note: transaction will be global if either TransactionId or TransactionName property is set or if
GlobalCoordinator property is gcMTS.
Here is a sample code that starts and commits global transaction:var
Id: TBytes;
begin
OraSession1.InternalName := 'SampleName1';
OraSession2.InternalName := 'SampleName2';
OraSession1.Connect;
OraSession2.Connect;
SetLength(Id, 2);
id[0] := 7; id[1] := 3;
OraTransaction.TransactionId := Id;
SetLength(Id, 1);
id[0] := 1;
OraTransaction.AddSession(OraSession1, Id);
id[0] := 2;
OraTransaction.AddSession(OraSession2, Id);
OraTransaction.StartTransaction;
OraSQL1.Session := OraSession1;
OraSQL2.Session := OraSession2;
OraSQL1.Execute;
OraSQL2.Execute;
OraTransaction.Commit;
end;
The following example demonstrates a global transaction with two branches created fromdifferent applications. After performing update these applications detach their transaction
branches. Then third application (transaction manager) resumes all branches of thetransaction and performs two-phase commit.
// Appication 1
var
Id: TBytes;
begin
OraSession.InternalName := 'SampleName1';
OraSession.Connect;
SetLength(Id, 2);
id[0] := 7; id[1] := 3;
OraTransaction.TransactionId := Id;
SetLength(Id, 1);
id[0] := 1;
OraTransaction.AddSession(OraSession, Id);
OraTransaction.StartTransaction;
OraSQL.Execute;
OraTransaction.Detach;end;// Appication 2
var
Id: TBytes;
begin
OraSession.InternalName := 'SampleName2';© 2019 Devart

125

Oracle Data Access Components

OraSession.Connect;
SetLength(Id, 2);
id[0] := 7; id[1] := 3;
OraTransaction.TransactionId := Id;
SetLength(Id, 1);
id[0] := 2;
OraTransaction.AddSession(OraSession, Id);
OraTransaction.StartTransaction;
OraSQL.Execute;
OraTransaction.Detach;end;// Application 3 (transaction manager that commits transaction)var
Id: TBytes;
begin
OraSession1.Connect;
OraSession2.Connect;
SetLength(Id, 2);
id[0] := 7; id[1] := 3;
OraTransaction.TransactionId := Id;
SetLength(Id, 1);
id[0] := 1;
OraTransaction.AddSession(OraSession1, Id);
id[0] := 2;
OraTransaction.AddSession(OraSession2, Id);
OraTransaction.Resume;
OraTransaction.Commit;
end;
The next example demonstrates using distributed transaction coordinated by MTS DTC:
begin
OraSession1.InternalName := 'SampleName1';
OraSession2.InternalName := 'SampleName2';
OraSession1.Connect;
OraSession2.Connect;
OraTransaction.GlobalCoordinator := gcMTS;
OraTransaction.AddSession(OraSession1);
OraTransaction.AddSession(OraSession2);
OraTransaction.StartTransaction;
OraSQL1.Session := OraSession1;
OraSQL2.Session := OraSession2;
OraSQL1.Execute;
OraSQL2.Execute;
OraTransaction.Commit;end;© 1997-2019
Devart. All Rights
Reserved.

4.16

Request Support

DAC Forum

Provide Feedback

TOraQueue, TOraQueueAdmin and TOraQueueTable
Components
TOraQueue, TOraQueueAdmin and TOraQueueTable components provide access to Oracle
Streams Advanced Queuing. Oracle Streams AQ provides database-integrated message© 2019 Devart

Using ODAC

126

queuing functionality. It is built on top of Oracle Streams and leverages the functions of Oracle
Database so that messages can be stored persistently, propagated between queues on
different computers and databases, and transmitted using Oracle Net Services and HTTP(S).
Because Oracle Streams AQ is implemented in database tables, all operational benefits ofhigh availability, scalability, and reliability are also applicable to queue data. Standard
database features such as recovery, restart, and security are supported by Oracle Streams
AQ. Like other database tables, queue tables can be imported and exported.
When applications communicate with each other, producer applications enqueue messages
and consumer applications dequeue messages. At the basic level of queuing, one producer
enqueues one or more messages into one queue. Each message is dequeued andprocessed once by one of the consumers. A message stays in the queue until a consumer
dequeues it or the message expires. A producer may stipulate the delay before the message
is available for the consumption, and the time after which the message expires. Likewise, aconsumer may wait when trying to dequeue a message if no message is available. An agent
program or application may act both as a producer and a consumer.
TOraQueue component provides access to functionality of DBMS_AQ Oracle package. User
must have AQ_USER_ROLE to work with this component. TOraQueue component can beused to enqueue and dequeue messages from the given queue. Queue message includes a
payload and message properties. Type of payload is defined for each queue. This can be
Oracle object type or 'RAW' type. RAW payload contains any array of bytes. To use
TOraQueue component set its Session and QueueName properties. Then one of Enqueue
method overloads can be used to enqueue message.
To enqueue message with RAW payload use the Enqueue method overload with string or
TBytes Payload parameter. For example:
var
MsgProp: TQueueMessageProperties;
begin
MsgProp := TQueueMessageProperties.Create;try
MsgProp.Priority := 2;
MsgProp.Delay := 30; // delay in sec before message can be dequeued
MsgProp.Expiration := 180; // message expiration in sec
OraQueue.Enqueue('123', MsgProp);
finally
MsgProp.Free;
end;
end;
To enqueue message to queue with object payload use Enqueue method overload with
TOraObject Payload parameter. For example:
var
MsgProp: TQueueMessageProperties;
Payload: TOraObject;
begin© 2019 Devart

127

Oracle Data Access Components

MsgProp := TQueueMessageProperties.Create;try
MsgProp.Priority := 2;
MsgProp.Delay := 30; // delay in sec before message can be dequeued
MsgProp.Expiration := 180; // message expiration in sec
Payload := TOraObject.Create;try
Payload.AllocObject(OraSession.OCISvcCtx, 'OBJ_MES');
Payload.AttrAsInteger['A'] := 3;
Payload.AttrAsString['B'] := 'Hello';
OraQueue.Enqueue(Payload, MsgProp);
finally
Payload.Free;
end;
finally
MsgProp.Free;
end;
end;
To dequeue message, use one of TOraQueue.Dequeue method overloads. If there are no
messages available for dequeuing, Dequeue method will wait until a message will beavailable. The following example demonstrates the usage of Dequeue method for a queuewith object payload:
varPayload: TOraObject;
a: integer;b: string;
begin
Payload := TOraObject.Create;try
OraQueue.Dequeue(Payload);a := Payload.AttrAsInteger['A'];b := Payload.AttrAsString['B'];
finally
Payload.Free;
end;
end;
To get notification when a message available to dequeuing appears in the queue use
TOraQueue.Listen method or set AsyncNotification property to True and write OnMessage
event handler.
Listen method listens on one or more queues on behalf of a list of agents. This method waits
until a message is available in one of the queues and then returns the agent that corresponds
this queue. Listen method should be called in separate thread to avoid program blocking. For
example:procedure TListenThread.Execute;var
Agents: TQueueAgents;
Agent: TQueueAgent;
Message: string;
begin
Agents := TQueueAgents.Create;© 2019 Devart

Using ODAC

128

try
Agents.Add.Address := 'QUEUE1'; // Address property should contain the q
Agents.Add.Address := 'QUEUE2';
Agent := TQueueAgent.Create;
trywhile not Terminated do begin
OraQueue.Listen(Agents, Agent);
OraQueue.Dequeue(Message);end;
finally
Agent.Free;
end;
finally
Agents.Free;
end;
end;
TOraQueueAdmin and TOraQueueTable components are used to administrate queues. User
must have AQ_ADMINISTRATOR_ROLE to work with these components. TOraQueueAdmin
and TOraQueueTable components can be used to create and drop queues and queue tables,
alter queue properties.
Queue can be persistent or non-persistent. To create persistent queue first a queue tablemust be created. Use TOraQueueTable component to create a queue table. Set properties of
the component to required values and then call CreateQueueTable method. Use
AlterQueueTable method to alter a queue table properties and DropQueueTable method todrop a queue table.
When a queue table is created, TOraQueueAdmin component can be used to create aqueue. Set properties of the component to required values and then call CreateQueuemethod. Use AlterQueue method of TOraQueueAdmin to alter a queue properties andDropQueue method to drop a queue.
Before messages can be enqueued and dequeued enqueuing and dequeuing must be started
on the queue. Use StartQueue method of TOraQueueAdmin to start enqueuing anddequeuing on the queue.

© 1997-2019
Devart. All Rights
Reserved.

4.17

Request Support

DAC Forum

Provide Feedback

TOraChangeNotification Component
TOraChangeNotification component is used to register queries with the database and receive
notifications in response to DML or DDL changes on the objects associated with the queries.
The notifications are published by the database when the DML or DDL transaction commits.
When the database issues change notification, it can contain some or all of the following
information:- Names of the modified objects. For example, the notification can specify that the© 2019 Devart

129

Oracle Data Access Components

hr.employees table was changed.
- The type of change. For example, the message specifies whether the change was causedby an INSERT, UPDATE, DELETE, ALTER TABLE, or DROP TABLE.
- The ROWIDs of the changed rows and the type of DML that changed them.
- Global events such as STARTUP and SHUTDOWN (consistent only). In a Real Applications
Cluster, the database delivers a notification when the first instance on the database starts or
the last instance shuts down.
The notification contains only metadata about the changed rows or objects rather than thechanged data itself. For example, the database does not notify the client that monthly salary
increased from 5000 to 6000. To obtain more recent values for the changed objects or rows,
the client must query the database based on the information contained in the notification.
Database Change Notification is useful for an application that caches query result sets on
mostly read-only objects in the mid-tier to avoid network round trips to the database. Suchapplication can create a registration on the queries it is interested in caching using the change
notification service. On changes to objects referenced inside those queries, the databasepublishes a change notification when the underlying transaction commits. In response to thenotification, the application can refresh its cache by re-executing the queries.
TOraChangeNotification component represents dependency between an application and an
Oracle database based on the database events in which the application is interested. To
create subscription place on the form TOraChangeNotification component and assign it to
ChangeNotification properties of datasets. When you open a dataset subscription on changes
to database tables that dataset selects data from will be created. All datasets that use one
TOraChangeNotification component share one change notification subscription. A dataset isregistered in subscription when you open this dataset.
Components derived from TOraDataSet can automatically refresh their data in response tochange notification. To enable autorefresh set ReflectChangeNotify in TOraDataSet.Options
to True. Dataset refreshes when data in one of the tables that appear in query FROM clauseis changed. If dataset's SQL has ROWID in SELECT clause and changed table corresponds
UpdatingTable property of TOraDataSet then only changed rows are refreshed withRefreshRecord method. If TOraDataSet.SQLRefresh property is set it must use ROWID.
Otherwise refreshing may be incorrect. If TOraDataSet.SQL property doesn't contain ROWID
in SELECT clause or data is changed not in UpdatingTable but in other table that appears inquery FROM clause the dataset performs full refresh with Refresh method.
Change notification can be handled manually using OnChange event of
TOraChangeNotification component. For example:
procedure TForm1.OraChangeNotificationChange(Sender: TObject;
NotifyType: TChangeNotifyEventType; TableChanges: TNotifyTableChanges);vari, j: integer;begin© 2019 Devart

Using ODAC

130

if NotifyType <> cneObjChange thenExit;
for i := 0 to TableChanges.Count - 1 do begin
Memo.Lines.Add(TableChanges[i].TableName);
if cnoAllRows in TableChanges[i].Operations thenContinue;for j := 0 to TableChanges[i].RowChanges.Count - 1 do
Memo.Lines.Add(TableChanges[i].RowChanges[j].RowId);
end;
end;
For the best performance of change notification, the following guidelines are presented.
Registered objects are few and mostly read-only and modifications to these objects are rather
an exception than a rule. If the object is extremely volatile, then it will cause a large number ofinvalidation notifications to be sent, and potentially a lot of storage in the invalidation queue on
the server. If there are frequent and a large numbers of notifications, the OLTP throughput
can be slowed down due to the overhead of the notifications generation.It is also a good idea
to keep the number of duplicate registrations on any given object low (ideally one) in order toavoid the same notification message being replicated to multiple recipients.

See Also
TOraDataSet.Options
TOraChangeNotification© 1997-2019
Devart. All Rights
Reserved.

4.18

Request Support

DAC Forum

Provide Feedback

Working With Data
This section describes the basics of working with data. It contains the information on how towork with BLOB, CLOB, XMLTYPE, VARRAY data types, Unicode Character Data, Objects,
PL/SQL Tables, etc.
BLOB and CLOB Data Types
Unicode Character Data
Objects
XMLTYPE Data TypeVARRAY Data TypeDML Array
PL/SQL Tables© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

131

Oracle Data Access Components

4.18.1 BLOB and CLOB Data Types
ODAC components support Oracle 8 BLOB and CLOB data types. You can retrieve values of
LOB fields using TOraQuery component the same way as you do for LONG or LONG RAW
fields. The difference with usage of LOB data type becomes evident when you need toaccess these fields in SQL DML and PL/SQL statements.
For BLOB and CLOB data types only LOB locators (pointers to data) are stored in table
columns; actual BLOB and CLOB data is stored in separate tablespace. This is thedifference to the way that data of LONG or LONG RAW types is stored in database – tables
hold their immediate values.
When accessing LOB column, it is the locator which is returned, not the value itself as in thecase with LONG or LONG RAW data types.
For example consider this table definition.
CREATE TABLE ClobTable (Id NUMBER,
Name VARCHAR2(30),
Desc CLOB)
To update Desc column of this table we need to create CLOB, get its locator, write CLOB
data using this locator and excecute UPDATE statement to write the locator into the table
field.
The following SQL statement can be used to update ClobTable:
UPDATE ClobTable
SET
Name = :Name,
Desc = EMPTY_CLOB()
WHERE
Id = :Id
RETURNING
Desc
INTO
:Desc
You can use EMPTY_BLOB or EMPTY_CLOB Oracle function to create empty LOB. After
executing this statement LOB locator is returned into Desc parameter. Then ODAC writes
LOB data into database using this locator. You must set ParamType of Desc parameter toptInput.
It is important for ODAC to use ParamType property of parameters in LOB operations. If
ParamType is ptInput ODAC writes data to a server, if ParamType is ptOutput it reads data.
Another way to update ClobTable is using temporary LOB. Set TemporaryLobUpdate in
TOraDataSet.Options to True. Then ODAC will create temporary LOB and write data to it
before executing SQL statement.
When TemporaryLobUpdate option is True following statement can be used to update
ClobTable:© 2019 Devart

Using ODAC132

UPDATE ClobTable
SET
Name = :Name,
Desc = :Desc
WHERE
Id = :Id
ODAC will initialize Desc parameter with locator of temporary LOB before executing thisstatement.
TemporaryLobUpdate option should be set to True when calling stored procedure with IN or IN
OUT LOB parameter. To call procedure:
CREATE OR REPLACEPROCEDURE ClobTableUpdate (p_Id IN NUMBER, p_Name IN VARCHAR2,
p_Desc IN CLOB)IS
BEGIN0UPDATE ClobTable
SET
Name = p_Name,
Desc = p_Desc
WHERE
Id = p_Id;
END;
the following code can be used:
OraStroredProc.Options.TemporaryLobUpdate := True;
OraStroredProc.StoredProcName := 'ClobTableUpdate';
OraStroredProc.Prepare;
OraStroredProc.ParamByName('p_Id').AsInteger := Id;
OraStroredProc.ParamByName('p_Name').AsString := Name;
OraStroredProc.ParamByName('Desc').ParamType := ptInput;
OraStroredProc.ParamByName('Desc').AsOraClob.LoadFromFile(FileName);
OraStroredProc.Execute;
Note that LOB parameter can have ptInputOutput type only when TemporaryLobUpdate option
is set toTrue. Otherwise the type of LOB parameter must be ptInput or ptOutput.
You can also use dtBlob and dtMemo datatypes with LOB parameters to write ordinary DML
statements. In this case Oracle automatically converts LONG and LONG ROW values to
CLOB or BLOB data.
It is possible to control the way LOB objects are handled while the application fetches records
from the database. LOBs can be fetched either with other fields to the application or on
demand.This is determined by DeferredLobRead option in TOraDataSet component. Setting
TOraDataSet.Options.DeferredLobRead to false allows to reduce traffic over the network
since LOBs are only transferred on demand and to use less memory on the client side
because returned record sets do not hold contents of LOB fields.
For managing LOB compression, use TCustomDADataSet.Options.CompressBlobMode.
LOBs can be stored compressed on the client side, on the server side (in database) or on
both sides. By default it has cbNone value, that means no compression is provided. Use© 2019 Devart

133

Oracle Data Access Components

cbClient value to store compressed LOBs on client side. This saves client memory. LOB
data is stored unchanged in a database, other applications can read these LOBs as usual. If
cbServer value is used, LOB data is stored compressed in the database. It's decompressedon the client side. This saves server disk space and network traffic. Other application can't
process compressed LOB data as usual. To use compressed LOB data both on the clientand server sides use cbClientServer value. To use cbClient, cbServer, cbClientServer andcbNone constants you should add the MemData unit to the uses clause.
Set TOraDataSet.Options.CacheLobs to False to access streamed LOB values on theserver side without caching LOBs on the client side. Only requested portions of data arefetched in that case. Setting CacheBlobs to False may bring up the following benefits for timecritical applications: reduced traffic over the network since only required data are fetched, lessmemory is needed on the client side because LOB data is not cached on client side. This
option doesn't make sense if DeferredLobRead is set to False because in that case all LOB
values are fetched to the dataset.
Note: Internal compression functions are available in Borland Developer Studio 2006, Delphi
2005 and Delphi 7. To use BLOB compression under Delphi 6 and C++Builder you should
use your own compression functions. To use them set CompressProc and UncompressProc
variables declared in MemUtils unit.
type
TCompressProc = function(dest: IntPtr; destLen: IntPtr;
const source: IntPtr; sourceLen: longint): longint;
TUncompressProc = function(dest: IntPtr; destlen: IntPtr;
source: IntPtr; sourceLne: longint): longint;
varCompressProc: TCompressProc;
UncompressProc: TUncompressProc;
You can compress and decompress a single LOB. To do it set the TOraLob.Compressed
property. Set it to True to compress LOB data and to False to decompress LOB data.
Note that using compression and decompression operations will raise CPU usage and can
reduce application performance.

See Also
TOraLob
TDAParam.ParamType
TCustomDADataSet.Options
TOraDataSet.Options
BlobPic demo
Clob demo© 2019 Devart

Using ODAC

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

134

Provide Feedback

4.18.2 Unicode Character Data
Symbolic information in Oracle can be retrieved for the user as a different character encoding
according to the query. Oracle supports a number of encoding formats including Unicode.
ODAC components support UTF-16 Unicode encoding formats for data fields with OCI 8.0 or
higher. Any character of any language can be represented in UTF-16.
ODAC allows to represent string data using string and WideString types. You can use
TOraSession.UseUnicode property to enable this behaviour.This property value affects thedescription of queries and stored procedures. TOraSession.UseUnicode property does not
influence the parameters' types that were set manually.
Suppose that SIMPLE_TYPES table is created as:
CREATE TABLE SIMPLE_TYPES (ID NUMBER(6) NOT NULL,
F_CHAR CHAR(250),
F_VARCHAR VARCHAR2(300),
F_RAW RAW(250),)
Suppose we open following SELECT statement in dataset
SELECT a.RowId, a.* FROM SIMPLE_TYPES a
If TOraSession.UseUnicode is set to False you get the next fields list after dataset open:
RowId:
TStringField
ID:
TIntegerField
F_CHAR:
TStringField
F_VARCHAR: TStringField
F_RAW:
TVarBytesField
When you set TOraSession.UseUnicode to True the string fields' type changes:
RowId:
TWideStringField
ID:
TIntegerField
F_CHAR:
TWideStringField
F_VARCHAR: TWideStringField
F_RAW:
TWideStringField
Fields of TWideStringField type hold rows in UTF-16 Unicode format. To get the value of the
fields you can use TWideStringField.Value property. You can use FlatBuffers, LongString,
FieldsAsString, RawAsString, TrimFixedChar options of TOraDataSet which are compatible
with TOraSession.UseUnicode.
To use Unicode values as parameters previously you need to set the value of data type field
to ftWideString or ftFixedWideChar for the fields of VARHAR or CHAR types accordingly.
Otherwise after the execution of AsWideString or AsString operation data type field will be
ftString by default.
© 2019 Devart

135

Oracle Data Access Components

var
WS: WideString;
begin
...
with OraQuery1 do begin
Close;
SQL.Text:='SELECT * from SIMPLE_TYPES '+'WHERE '+' F_CHAR = :F_CHAR';
Params[0].DataType := ftFixedWideChar;
Params[0].AsWideString := WS;
Open;
...
If parameter has Unicode data type value, assigning value by using AsString property
converts String to WideString. And vice versa, if parameter doesn't have Unicode data typevalue, assigning value by AsWideString property converts WideString into String.
Also Unicode encoding is supported for ROWID, NUMBER, INTERVAL, TIMESTAMP, RAW,CLOB.
CLOB data type supports string data in UTF-16 Unicode encoding. You can set
TOraSession.UseUnicode property to True and get TMemoField of ftOraClob blob type. You
can update CLOB field and set its value to Unicode string the following way:var
WS: WideString;
begin
...
with OraQuery1 do begin
SQL.Text:='UPDATE ODAC_CLOB '+'SET '+' Value = EMPTY_CLOB() '+'WHERE '+'ID = :ID '+'RETURNING '+' Value '+'INTO '+
' :Value ';ParamByName('ID').AsFloat:=1;
ParamByName('Value').ParamType := ptInput;
ParamByName('Value').AsCLOBLocator.IsUnicode := True;
ParamByName('Value').AsCLOBLocator.Write(0, Length(WS)*2, PWideChar(WS))// orParamByName('Value').AsWideString := WS;
Execute;...

See Also
TOraSession.Options
TOraDataSet.Options© 2019 Devart

Using ODAC

136

TOraDataSet.OptionsDS© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

4.18.3 Objects
ODAC allows you to query and update columns of Oracle object type. You can access toattributes of object column as to fields of dataset using TDataSet.FieldByName or
TDataSet.Fields. Dataset represents object attributes in two ways depending on the value of
ObjectView property. If ObjectView is True attributes are stored hierarchically in the Fields
property, that means any attributes of the object column are represented by child field of theobject field and don't appear sequentially after the object field in the TFields.Fields array.
When ObjectView is False, the attributes are stored sequentially in the Fields property, thatmeans any child fields of the object field are stored after the object field as siblings in the
Fields array.
For example we have such types and table
CREATE TYPE TAddress AS OBJECT (Country VARCHAR2(30),City VARCHAR2(30),Street VARCHAR2(30),
Apartment NUMBER);
CREATE TYPE TPerson AS OBJECT (Name VARCHAR2(30),Address TAddress,
Phone VARCHAR2(20),BirthDate DATE);CREATE TABLE ODAC_Emp (Person TPerson,
Job VARCHAR2(9),HireDate DATE,Sal NUMBER(7,2));
If you execute this query
SELECT * FROM ODAC_Emp
to learn the name of an employee you can write
Value:= Query.FieldByName('PERSON.NAME').AsString;If ObjectView is True object column is represented by TADTField and to access the object
attribute use child field by TADTField.Fields
Value:= TADTField(Query.FieldByName('PERSON')).
Fields.FieldByName('NAME')).AsString;
Another way to get the value of an attribute is using TOraObject. Use TOraDataSet.GetObject© 2019 Devart

137

Oracle Data Access Components

method to get reference to the needed object.
So, the previous example may be rewritten this way
Value := Query.GetObject('PERSON').AttrAsString['NAME'];
Also ODAC supports object parameters. Use this feature when writing statements to update
dataset rows. So, to insert a new row in ODAC_Emp table it is enough to assign thisstatement to SQLInsert property.
INSERT INTO ODAC_Emp(PERSON, JOB, HIREDATE, SAL)VALUES(:PERSON, :JOB, : HIREDATE, :SAL)
To execute this INSERT statement only by TOraQuery or TOraSQL component use
TOraParam.AsObject property to set attributes' value of PERSON parameter. But before you
should assign dtObject to TOraParam.DataType property and allocate object handle by
TOraParam.AllocObject method.
var
OraSQL: TOraSQL;. . .
OraSQL.SQL.Text := 'INSERT INTO ODAC_Emp' +'(PERSON, JOB, HIREDATE, SAL)' +'VALUES (:PERSON, :JOB, : HIREDATE, :SAL)';
with OraSQL.ParamByName('Person').AsObject do begin
AllocObject(OraSession.OCISvcCtx, 'TPerson');
AttrAsString['Name'] := 'JON';
AttrAsString['Address.Country'] := 'USA';
AttrAsString['Address.City'] := 'Boston';
AttrAsInteger['Address.Apartment'] := 133;
AttrAsDateTime['BirthDate'] := EncodeDate(1970, 7, 23);
end;
OraSQL.ParamByName('Job').AsString := 'MANAGER';OraSQL.ParamByName('HireDate').AsDateTime := EncodeDate(1998, 5, 14);
OraSQL.ParamByName('Sal').AsInteger := 1700;
OraSQL.Execute;

See Also
TOraObject
Object demo

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

4.18.4 XMLTYPE Data Type
Oracle 9i introduced a new data type, XMLTYPE, to facilitate native handling of XML data inthe database. XMLTYPE has built-in member functions that operate on XML content. For
example, you can use XMLTYPE functions to create, extract, and index XML datastored in© 2019 Devart

Using ODAC

138

Oracle 9i database. XMLTYPE data type can be used as the data type of columns in tables
and views. XMLTYPE data type uses following storage methods:
Large objects (LOBs). LOB storage maintains content accuracy to the original XML (whitespaces and all). Here the XML documents are stored composed as whole documents likefiles. XML stored as a whole document in the database and retrieve it as a whole document.
You do not need to perform piece-wise updates on XML documents.
Structured storage (tables and views). Structured storage maintains DOM (Document
Object Model) fidelity.
ODAC can work with fields of XMLTYPE data type. For example,suppose we have following
table with XMLTYPE field:
CREATE TABLE xml_tab(
ID NUMBER(10),XMLField XMLTYPE)
After creating TOraQuery and execution of the next SELECT statement
SELECT * FROM xml_tab
TOraXMLField object will be created for XMLTYPE type which holds retrieved XML document.
XMLTYPE fields are cached in ODAC on opening a table. Update of XMLTYPE fields will be
posted to the server after the execution of corresponding DML query.
You can update or append XMLTYPE fields to the table the following way:

Edit; // or Insert, Append;
TOraXMLField(FieldByName('X')).AsXML.AsString :='<root> <node1>v1</node1> <node2 name1=''222''>v2</node2> <node1>v3</node1
Post;
Or you can write:

Edit; // or Insert, Append;
TOraXMLField(FieldByName('X')).AsString :='<root> <node1>v1</node1> <node2 name1=''222''>v2</node2> <node1>v3</node1
Post;
You can use TOraXMLField.AsXML property to get XMLTYPE document as an TOraXML
object. Using this object you can query XMLTYPE data and extract its portions by calling
TOraXML.Exists and TOraXML.Extract functions. Both these functions use a subset of the
W3C XPath recommendation to navigate through the document. XMLTYPE uses the built-in
Oracle XML parser and processor, and that's why it provides better performance andscalability when used inside the server. TOraXML.Transform function takes in XMLTYPE
instance and XSLT stylesheet. It applies the stylesheet to the XML document and returns atransformed XML instance.
You can treat the XMLTYPE as a parameter in DML statements as shown below.
Close;
SQL.Text := 'UPDATE xml_tab SET© 2019 Devart

XMLField = :XMLField WHERE ID = 101';

139

Oracle Data Access Components

with Params[0].AsXML do begin
OCISvcCtx := OraSession1.OCISvcCtx;
AsString := '<test></test>';end;
Execute;Or you can create the XMLTYPE value from TOraLob.

with Params[0].AsXML do begin
OraLob := TOraLob.Create(OraSession1.OCISvcCtx);
try
OraLob.CreateTemporary(ltClob);
OraLob.Write(0, Length('<test_lob></test_lob>'), PChar('<test_lob></test
OraLob.WriteLob;
AllocObject(OraSession1.OCISvcCtx, OraLob);
finally
OraLob.Free;
end;
end;
Execute;XML Schema is a schema definition language written in XML. It can be used to describe thestructure and other various semantics of conforming instance documents. When using
Oracle XML DB, you must first register your XML schema. Than you can use the XML
schema URLs while creating XMLTYPE tables, columns, and views. You can use XML
schema to declare which elements and attributes can be used and what kinds of element
nesting, and data types are allowed in the XML documents that are being stored orprocessed. For example, user can create XML document based on the following schema,
create table with XMLTYPE field and initialize the field value.
declaredoc varchar2(1000) :='<schema targetNamespace="http://www.oracle.com/PO.xsd"
xmlns:po="http://www.oracle.com/PO.xsd"
xmlns="http://www.w3.org/2001/XMLSchema"><complexType name="PurchaseOrderType"><sequence><element name="PONum" type="decimal"/><element name="Company"><simpleType><restriction base="string"><maxLength value="100"/></restriction></simpleType></element></sequence></complexType><element name="PurchaseOrder" type="po:PurchaseOrderType"/></schema>';
begin
dbms_xmlschema.registerSchema('http://www.oracle.com/PO.xsd', doc);
end;/create table po_tab(
id number,© 2019 Devart

Using ODAC

140

po sys.XMLTYPE)XMLTYPE column po
XMLSCHEMA "http://www.oracle.com/PO.xsd"
element "PurchaseOrder";insert into po_tab values(
1,
XMLTYPE('<PurchaseOrder xmlns="http://www.oracle.com/PO.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/PO.xsd"><PONum>1001</PONum><Company>Oracle Corp</Company></PurchaseOrder>'));ODAC supports schema-based XML documents processing. You can open TOraQuery and
get TOraXML object with schema-based document the same way as for LOB-based
XMLTYPE. You can get value document calling TOraXMLField.AsString or TOraXML.AsString.
Extract, Exists, Transform, GetSchema, Validate, and IsSchemaBased functions of TOraXML
are available for this XML document type.
with OraQuery1 do begin
RetDoc := TOraXML.Create();
RetDoc.OCISvcCtx := OraSession1.OCISvcCtx;
trywith TOraXMLField(FieldByName('XMLTYPE')).AsXML do begin
GetSchema(RetDoc, SchemaURL, RootElem);
Str := RetDoc.AsString;end;
finally
RetDoc.Free;
end;
end;

See Also
TOraXML
TOraXMLField
TOraLob© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

4.18.5 VARRAY Data Type
Everything considered in Working with objects is right for Arrays. Some problems appear
when you need to use large arrays in dataset. As ODAC creates one field for each array item
great number of TField objects are created. As a result the perfomance decreases. So ODAC
has the limitation and creates fields for first 1000 items. However you can access all items© 2019 Devart

141

Oracle Data Access Components

with TOraArray object. Another way is to set TOraQuery.SparseArray to True and accessarray items by TArrayField object.
If such types are created
CREATE TYPE TODACArray1 AS VARRAY (5) OF NUMBER;
CREATE TYPE TODACArray2 AS VARRAY (4) OF CHAR(10);CREATE TABLE ODAC_Array (Code NUMBER,
Title VARCHAR2(10),Arr1 TODACArray1,
Arr2 TODACArray2,);
To access array items you can call FieldByName method. For example
Value := Query.FieldByName('Arr1[0]').AsInteger;
If ObjectField property is True this code is correct
Value := TArrayField(Query.FieldByName('Arr1')).Fields[0].AsInteger;
Using TOraDataSet.GetArray you can access array items through TOraArray object
Value:= Query.GetArray('Arr1').ItemAsInteger[0];You can use VARRAY type for parameters of SQL and PL/SQL statements. You need toassign dtArray to TOraParam.DataType and use TOraParam.AsArray property to accessarray items.
For example:
var
OraSQL: TOraSQL;. . .
OraSQL.SQL.Text := 'INSERT INTO ODAC_Array (Code, Arr1, Arr2)' +'VALUES (:Code, :Arr1, :Arr2)';
OraSQL.ParamByName('Code').AsInteger := 10;with OraSQL.ParamByName('Arr1').AsArray do begin
AllocObject(OraSession.OCISvcCtx, 'TODACArray1');
ItemAsInteger[0] := 12;
AttrAsInteger['[1]'] := 10;
ItemAsInteger[3] := 133;end;with OraSQL. ParamByName('Arr2').AsArray do begin
OCISvcCtx:= OraSession.OCISvcCtx;
AllocObject('TODACArray2');
AttrAsString['[2]']:= 'eeee';
ItemAsString[0]:= 'FFFFF';
end;
OraSQL.Execute;

See Also
TOraArray
Array demo

© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 Devart

Using ODAC

142

Devart. All Rights
Reserved.
4.18.6 DML Array
Using of array binding feature can greatly speed up the execution of the application on insert
or update big volume of data. The main advantage is that array binding allows you to execute
several INSERT SQL statements with the different parameters at once. Note that you accessserver only once - that increases speed of update a lot.
The following is a sample of using DML Array.
The following table is used in this sample.
CREATE TABLE dept(
deptno NUMBER(2) CONSTRAINT pk_dept PRIMARY KEY,
dname VARCHAR2(14),loc VARCHAR2(13));
At first, you should open a session:
OraSession.UserName := 'scott';
OraSession.Password := 'tiger';
OraSession.Server := 'Ora';
OraSession.Connect;
After that you should specify SQL statement for the execution:

OraSQL.SQL.Text := 'INSERT INTO dept VALUES(:deptno_p, :dname_p, :loc_p)';
Colons in the SQL text mean parameters with the values which will be specified later.
Now you should specify parameter type for each parameter from the SQL text and the Length
property of the parameters, which should be equal to the number of SQL statement
executions.
OraSQL.ParamByName('deptno_p').DataType := ftInteger;
OraSQL.ParamByName('deptno_p').Length := 4;
OraSQL.ParamByName('dname_p').DataType := ftString;
OraSQL.ParamByName('dname_p').Length := 4;
OraSQL.ParamByName('loc_p').DataType := ftString;
OraSQL.ParamByName('loc_p').Length := 4;
You should call Prepare method before specifying values for the highest efficiency.
OraSQL.Prepare;
Each item of the array must correspond to the single execution of the SQL statement.
OraSQL.ParamByName('deptno_p').ItemAsInteger[1] := 10;
OraSQL.ParamByName('dname_p').ItemAsString[1] := 'ACCOUNTING';
OraSQL.ParamByName('loc_p').ItemAsString[1] := 'NEW YORK';OraSQL.ParamByName('deptno_p').ItemAsInteger[2] := 20;
OraSQL.ParamByName('dname_p').ItemAsString[2] := 'RESEARCH';© 2019 Devart

143

Oracle Data Access Components

OraSQL.ParamByName('loc_p').ItemAsString[2] := 'DALLAS';OraSQL.ParamByName('deptno_p').ItemAsInteger[3] := 30;
OraSQL.ParamByName('dname_p').ItemAsString[3] := 'SALES';OraSQL.ParamByName('loc_p').ItemAsString[3] := 'CHICAGO';OraSQL.ParamByName('deptno_p').ItemAsInteger[4] := 40;
OraSQL.ParamByName('dname_p').ItemAsString[4] := 'OPERATIONS';OraSQL.ParamByName('loc_p').ItemAsString[4] := 'BOSTON';
After accomplishing previous steps you should call Execute method that assumes aparameter specifying how many times SQL statement will be executed. Note that the value of
this method argument must be equal to the number of parameters value elements. Now you
can execute SELECT * FROM Dept with any Oracle tool (you can use dbForge Studio for
Oracle for this purpose) and see four new records appended.
OraSQL.Execute(4);© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

4.18.7 Cursors
Since Oracle 7.3 the REF CURSOR type has been available to allow recordsets to be
returned from stored procedures and functions.
Oracle 9i introduced the predefined SYS_REFCURSOR type, meaning we no longer have todefine our own REF CURSOR types.

Using Ref Cursors
The example below uses a ref cursor to return a subset of records in the EMP table.
The following procedure opens a query using a SYS_REFCURSOR output parameter. Noticethe cursor is not closed in the procedure. It is up to the calling code to manage the cursor
once it has been opened.
CREATE OR REPLACE PROCEDURE sp_get_emp (p_deptno
BEGIN
OPEN p_recordset FOR
SELECT ename,empno,
deptnoFROM
emp
WHERE deptno = p_deptno
ORDER BY ename;
END sp_get_emp;/IN

emp.deptno%TYPE, p_r

Using cursors in ODACIn ODAC work with cursors may be implemented using the following components:© 2019 Devart

Using ODAC

TOraQuery , TOraStoredProc , TOraSQL .
Below is a sample working with cursors in TOraStoredProc :Delphiprogram Project1;{$APPTYPE CONSOLE}{$R *.res}
uses
System.SysUtils, Ora;var
OraSession: TOraSession;
OraStoredProc: TOraStoredProc;
begin
OraSession := TOraSession.Create(nil);try
OraSession.ConnectString := 'scott/tiger@orc';
OraSession.Connect;
WriteLn('Использование TOraStoredProc');
OraStoredProc := TOraStoredProc.Create(nil);try
OraStoredProc.Session := OraSession;
OraStoredProc.StoredProcName := 'sp_get_emp';
OraStoredProc.Prepare;
OraStoredProc.ParamByName('p_deptno').AsInteger := 10;
OraStoredProc.Execute;
while not OraStoredProc.Eof do begin
Writeln(OraStoredProc.FieldByName('ename').AsString);
OraStoredProc.Next;
end;
finally
OraStoredProc.Free;
end;
finally
OraSession.Free;
readln;end;
end.
C++Builder#include <vcl.h>#pragma hdrstop#include <tchar.h>#include <stdio.h>#include <Ora.hpp>#pragma argsused
int _tmain(int argc, _TCHAR* argv[]){
TOraSession *OraSession = new TOraSession(NULL);
try{
OraSession->ConnectString = "scott/tiger@orcl1120";
OraSession->Connect();
TOraStoredProc *OraStoredProc = new TOraStoredProc(NULL);
try{© 2019 Devart

144

145

Oracle Data Access Components

OraStoredProc->StoredProcName = "sp_get_emp";
OraStoredProc->Prepare();OraStoredProc->ParamByName("p_deptno")->AsInteger = 10;
OraStoredProc->Session = OraSession;
OraStoredProc->Execute();while (!OraStoredProc->Eof){
printf("%s\n", OraStoredProc->FieldByName("ename")->AsString.t_str());
OraStoredProc->Next();}}__finally{
OraStoredProc->Free();}}__finally{
OraSession->Free();system("pause");}return 0;}
If several output parameters in the procedure are cursors, then TOraStoredProc will work
only with the first one as with a DataSet. To retrieve other DataSets, the asCursor method
must be used:
OraQuery.Cursor := OraSession.ParamByName('Cur2').AsCursor;
OraQuery.Open;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

4.18.8 PL/SQL Tables
ODAC allows you to use PL/SQL arrays known as PL/SQL Tables as parameters ofanonymous PL/SQL blocks or as parameters of stored procedures. As ordinary arrays, PL/
SQL arrays can be used for storing the same data accessible by index.
We will use standard Dept table in our sample. If you don't have this table at your databasesee SQL script at Demos\InstallDemoObjects.sql folder. Following sample demonstrates
how to update several records from Dept table simultaneously using parameter of PL/SQL
Table type.
Here is a PL/SQL block used in our sample:
DECLAREi INTEGER;
BEGIN
i:= 1;
FOR rec IN (SELECT DeptNo FROM Scott.Dept
WHERE RowNum <= 10 ORDER BY DeptNo)
LOOP© 2019 Devart

Using ODAC

146

UPDATE Scott.Dept
SET DName = :NameArr(i)WHERE DeptNo = Rec.DeptNo;
i:= i + 1;
END LOOP;
END;
There is one parameter in the text of the sample PL/SQL block with NameArr name. It has
PL/SQL Table type. This SQL updates DName field of Dept table with the values fromNameArr array.
At first, you should open a session:
OraSession.UserName := 'scott';
OraSession.Password := 'tiger';
OraSession.Server := 'Ora';
OraSession.Connect;
After that you should specify SQL statement for the execution:
OraSQL.SQL.Add('DECLARE');OraSQL.SQL.Add(' i INTEGER;');OraSQL.SQL.Add('BEGIN');
OraSQL.SQL.Add(' i:= 1;');
OraSQL.SQL.Add(' FOR rec IN (SELECT DeptNo FROM Scott.Dept');
OraSQL.SQL.Add('
WHERE RowNum <= 10 ORDER BY DeptNo)');OraSQL.SQL.Add(' LOOP');
OraSQL.SQL.Add('
UPDATE Scott.Dept');
OraSQL.SQL.Add('
SET DName = :NameArr(i)');OraSQL.SQL.Add('
WHERE DeptNo = Rec.DeptNo;');OraSQL.SQL.Add('i:= i + 1;');
OraSQL.SQL.Add(' END LOOP;');
OraSQL.SQL.Add('END;');
The NameArr parameter value should be specified later.
Then you need to specify that the parameter with NameArr name has PL/SQL Table type. To
do it, you should set Table property to True and Length property of the parameter to therequired value. If Dept table has four records, the size of the array also must be four.
OraSQL.ParamByName('NameArr').Table := True;
OraSQL.ParamByName('NameArr').DataType := ftString;
OraSQL.ParamByName('NameArr').Length := 4;
After that you need to set values for the array items of NameArr parameter. The amount ofarray items must be equal to the value of Length property.
OraSQL.ParamByName('NameArr').ItemAsString[1] := 'London';
OraSQL.ParamByName('NameArr').ItemAsString[2] := 'Berlin';
OraSQL.ParamByName('NameArr').ItemAsString[3] := 'Geneva';
OraSQL.ParamByName('NameArr').ItemAsString[4] := 'Vienna';
Now you can execute SQL by calling Execute method of TOraSQL component.
OraSQL.Execute;© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

147

Oracle Data Access Components

Reserved.

4.19

Writing Oracle External Procedures with ODAC
External procedure is a procedure stored in a dynamic link library (DLL), or libunit in the caseof a Java class method. Different programming languages can be used for external
procedures creation - C, C++, Object Pascal, Java. External procedure can be called directlyfrom PL/SQL and SQL. You can use ODAC components for writing external procedures forOracle database. A small example of external procedure using ODAC components is listed
below.
For example, let's create an external procedure that saves LOB to file and stores the filename and the file date in a database. Suppose we have the following table to store file names
and dates:
CREATE TABLE scott.odac_file_list(
id integer PRIMARY KEY,
file_name VARCHAR2(100),
file_date TIMESTAMP)
Let's create a DLL ExtProc containing our external procedure add_file.
All external procedures and functions in DLL must be listed in the library exports clause.
Before calling any OCI functions in DLL InitOCI procedure must be called. When OCI is nolonger needed FreeOCI procedure must be called.
In declaration of procedure add_file cdecl directive must be used. It is necessary to call
OCIExtProcGetEnv function, that returns environment, service context and error handles. A
call to OCIExtProcGetEnv function is required to make OCI callbacks to database.
Then we will create a data module with TOraSession and TOraQuery components.
TOraSession component can be linked to external procedure service context by assigning
service context pointer to OCISvcCtx property of TOraSession. After such assignment we
can execute queries through OraSession.
An external procedure must not raise Delphi exceptions. All these exceptions must beprocessed inside the procedure and procedure can raise PL/SQL exceptions withOCIExtProcRaiseExcpWithMsg OCI function.
The source code of DLL, that contains add_file procedure is the following:library ExtProc;
uses
SysUtils,
Classes,
DB, Ora, OraCall, OraError, OraClasses,
Data in 'Data.pas' {dmData: TDataModule};{$R *.res}procedure add_file(Context: pOCIExtProcContext; Id: pOCINumber;
FileName: PChar; FileDate: pOCIDateTime; FileText: pOCILobLocator); cdecl;© 2019 Devart

Using ODAC

148

var
hEnv: pOCIEnv;
hSvcCtx: pOCISvcCtx;
hError: pOCIError;
dmData: TdmData;
OraLob: TOraLob;
begin
try
// get OCI service context
Check(OCIExtProcGetEnv(Context, hEnv, hSvcCtx, hError));dmData := TdmData.Create(nil);try// set sevice context handle in OraSession
dmData.OraSession.OCISvcCtx := hSvcCtx;
with dmData.OraSQL do begin
ParamByName('ID').DataType := TFieldType(ftNumber);ParamByName('ID').AsNumber.OCINumberPtr := Id;ParamByName('FILE_NAME').AsString := FileName;
ParamByName('FILE_DATE').DataType := ftTimeStamp;
ParamByName('FILE_DATE').AsTimeStamp.OCIDateTime := FileDate;
Execute;OraLob := TOraLob.Create(hSvcCtx);
try
OraLob.OCILobLocator := FileText;
OraLob.ReadLob;
OraLob.SaveToFile(FileName);
finally
OraLob.Free;
end;
end;
finallydmData.Free;end;
excepton e: EOraError do
OCIExtProcRaiseExcpWithMsg(Context, e.ErrorCode, PChar(e.Message), Len
on e: Exception do
OCIExtProcRaiseExcpWithMsg(Context, 20000, PChar(e.Message), Length(e.
end;
end;
exports
add_file;
begin// Load oci.dll and link OCI functions
InitOCI;end.
To use this external procedure compile the DLL and copy it to Oracle server. The DLL must
be copied to ORACLE_HOME\bin (Windows) or ORACLE_HOME/lib (UNIX). See Oracle
documentation about making the external procedures agent load external procedure libraries
from other paths.
External procedures DLL must be defined with CREATE LIBRARY statement. In ourExternalProc Demo the library is created as follows:
CREATE OR REPLACE LIBRARY Scott.ExtProcDemo AS© 2019 Devart

149

Oracle Data Access Components'C:\oracle\product\10.2.0\db_1\bin\ExtProc.dll'
Note: the path to the DLL passed to CREATE LIBRARY statement is case sensitive.
Then we define the external procedure:

CREATE PROCEDURE scott.add_file(
id NUMBER,
file_name VARCHAR2,
file_date TIMESTAMP,
file_text CLOB)AS LANGUAGE C
NAME "add_file"
LIBRARY scott.ExtProcDemo
WITH CONTEXTPARAMETERS (CONTEXT, id OCINUMBER, file_name STRING, file_date OCIDATETIME
The "LANGUAGE C" option shows that it is an external procedure written in the language
compatible with the C language call specification. The "NAME" option is the name of theprocedure in the DLL. "WITH CONTEXT" option enables OCI callbacks to the databaseduring an external procedure execution. That means an additional CONTEXT parameter ispassed to the procedure. It allows the procedure to use a connection to the database.
Now the add_file procedure can be called from an SQL query.
Note to execute external procedures Oracle Net files listener.ora and tnsnames.ora must be
configured for external procedures. See Oracle documentation about the configuration Oracle
net for external procedures.

SeeAlsoExternalProc demo

© 1997-2019
Devart. All Rights
Reserved.

4.20

Request Support

DAC Forum

Provide Feedback

Transparent Application Failover Support
Transparent application failover (TAF) is the ability of applications to automatically reconnect
to the database if the connection fails. If the server fails, the connection also fails. The nexttime the client tries to use the connection to execute a new SQL statement, for example, theoperating system displays an error to the client. At this point, the user must log in to the
database again. With TAF, however, Oracle automatically obtains a new connection to the
database. This allows the user to continue to work using the new connection as if the original
connection had never failed. If the client is not involved in a database transaction, then users
may not notice the failure of the server. Because this reconnection happens automatically, theclient application code may not need changes to use TAF. TAF automatically restores:
Client-Server Database Connections;© 2019 Devart

Using ODAC

150

Users' Database Sessions;Executing Commands;
Open Cursors Used for Fetching;
Active Transactions;Server-Side Program Variables.
Unfortunately, TAF cannot automatically restore some session properties. If the application
issued ALTER SESSION commands, then the application must reissue them after TAF
processing is complete
Frequently failure of one instance and failover to another takes time. Because of this delay,
you may want to inform users that failover is in progress. Additionally, the session on the initialinstance may have received some ALTER SESSION commands. These will not be
automatically reissued on the second instance. You may need to reissue these commandson the second instance.
To address such problems, you can use TOraSession.OnFailover event. The event is raised
during the session recovery process when connection is lost. When connection failure is
detected TOnFailover event is raised first time. Then application keeps raising it untilconnection is restored or user stops failover process.
Transparent Application Failover Restrictions:
All PL/SQL package states on the server are lost at failover.
ALTER SESSION statements are lost.
If failover occurs when a transaction is in process, then each subsequent call causes anerror message until the user issues Rollback call. Then a success message is issued. Be
sure to check this informational message to see if you must perform any additional
operations.
Continuing work on failed over cursors may cause an error message.
If the first command after failover is not a SELECT statement or fetch operation, an error
message results.
Failover only takes effect for Oracle 8.0 or higher.
At failover time, any queries in progress are reissued and processed again from the
beginning. This may result in the next query taking a long time if the original query took along time.
Preparing and Running the Sample
The tnsnames.ora file should be suitably modified for your database entry so that TAF tries toreconnect when the database connection is lost. The tnsnames.ora file is located in the<Oracle_Home>/network/Admin directory. Your database TNS entry should look like this :<DBFAILOVER.US.ORACLE.COM> =© 2019 Devart

151

Oracle Data Access Components(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = <myhostname>)(PORT = <1521>)))(CONNECT_DATA =(SERVICE_NAME = <dbfailover>)(FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC) (RETRIES=100)(DELAY=1))))
where <Oracle_Home> is the directory where your database or SQL* Plus client is installed.
Replace the values for the database parameters highlighted in bold with your databaseparameters.
Build and run the Query project from the ODAC demos. (Please ensure to perform thefollowing steps). Set TOraSession.Options.UseOCI7 to False. Write
TOraSession.OnFailover event as follows.
procedure TfmMain.OraSessionFailover(Sender: TObject;
FailoverState: TFailoverState; FailoverType: TFailoverType;var Retry: Boolean);
begincase FailoverState offsBegin: begin
ShowMessage('Failover Begin');
StatusBar1.Panels[0].Text := 'Trying to reconnect, Please wait...';
end;
fsAbort: begin
ShowMessage('Failover Aborted');
StatusBar1.Panels[0].Text := 'Failover Aborted';end;
fsEnd:ShowMessage('Failover End');fsError: begin
StatusBar1.Panels[0].Text := 'Failover Error. Retrying to connect ' +'to database. Please wait... ';Retry:=true;end;
fsReauth: begin
ShowMessage('Failover reauthenticating');
StatusBar1.Panels[0].Text := 'Failover reauthenticating';
end;
else
ShowMessage('Bad Failover');
StatusBar1.Panels[0].Text := 'Bad Failover';
end;
end;
When run, the sample shows a form with a blank data grid. The user should click "Open"button to start fetching the Dept table records.
For demonstrating TAF, user should restart the database from SQL* Plus using following
command:
To login as a DBA user type© 2019 Devart

Using ODAC

152

SQL> Connect sys/<your_sys_password>@<Your_TNSName> as sysdba
To shutdown and restart database type
SQL> startup force
After restarting the database, the user should return to the application and refresh the data byclicking "RefreshRecords". The Failover event is called and the Failover handler method
displays the appropriate messages in a message box and in the status bar of application. The
query will be executed again against the database using a new connection, data fetched anddisplayed in the data grid.

See Also
TOraSession.OnFailover© 1997-2019
Devart. All Rights
Reserved.

4.21

Request Support

DAC Forum

Provide Feedback

DBMonitor
To extend monitoring capabilities of ODAC applications there is an additional tool called
DBMonitor. It is provided as an alternative to Borland SQL Monitor which is also supported by
ODAC.
DBMonitor is an easy-to-use tool to provide visual monitoring of your database applications.
DBMonitor has the following features:
multiple client processes tracing;
SQL event filtering (by sender objects);
SQL parameter and error tracing.
DBMonitor is intended to hamper an application being monitored as little as possible.
To trace your application with DB Monitor you should follow these steps:
drop TOraSQLMonitor component onto the form;
turn moDBMonitor option on;
set to True the Debug property for components you want to trace;start DBMonitor before running your program.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

153

4.22

Oracle Data Access Components

Writing GUI Applications with ODAC
Since version 3.80 ODAC GUI part is standalone. This means that to make GUI elements
such as SQL cursors, connect form, connect dialog etc. available, you should explicitly
include OdacVcl unit in your application. This feature is needed for writing console
applications.

Delphi and C++Builder
By default ODAC does not require Forms, Controls and other GUI related units. Only
TConnectDialog, TOraErrorHandler and TOraAlerter components require the Forms unit.

© 1997-2019
Devart. All Rights
Reserved.

4.23

Request Support

DAC Forum

Provide Feedback

Compatibility with Previous Versions
We always try to keep ODAC compatible with previous versions, but sometimes we have tochange the behaviour of ODAC in order to enhance its functionality, or avoid bugs. This topic
describes such changes, and how to revert the old ODAC behaviour. We strongly
recommend not to turn on the old behaviour of ODAC. Use options described below only ifchanges applied to ODAC crashed your existent application.
Values of the options described below should be assigned in the initialization section of oneof the units in your project.

DBAccess.BaseSQLOldBehavior:
The BaseSQL property is similar to the SQL property, but it does not store changes made by
AddWhere, DeleteWhere, and SetOrderBy methods. After assigning an SQL text andmodifying it by one of these methods, all subsequent changes of the SQL property will not bereflected in the BaseSQL property. This behavior was changed in ODAC 5.55.1.26. To
restore old behavior, set the BaseSQLOldBehavior variable to True.

DBAccess.SQLGeneratorCompatibility:
If the manually assigned RefreshSQL property contains only "WHERE" clause, ODAC uses
the value of the BaseSQL property to complete the refresh SQL statement. In this situation all
modifications applied to the SELECT query by functions AddWhere, DeleteWhere are nottaken into account. This behavior was changed in ODAC 6.00.0.4. To restore the oldbehavior, set the BaseSQLOldBehavior variable to True.

MemDS.SendDataSetChangeEventAfterOpen:© 2019 Devart

Using ODAC

154

Starting with ODAC 6.20.0.11, the DataSetChange event is sent after the dataset gets open. It
was necessary to fix a problem with disappeared vertical scrollbar in some types of DBaware grids. This problem appears only under Windows XP when visual styles are enabled.
To disable sending this event, change the value of this variable to False.

MemDS.DoNotRaiseExcetionOnUaFail:
Starting with ODAC 6.20.0.12, if the OnUpdateRecord event handler sets the UpdateAction
parameter to uaFail, an exception is raised. The default value of UpdateAction is uaFail. So,
the exception will be raised when the value of this parameter is left unchanged.
To restore the old behaviour, set DoNotRaiseExcetionOnUaFail to True.

Ora.OraQueryCompatibilityMode:
Before ODAC 6, TOraQuery could be editable only when InsertSQL, UpdateSQL, andDeleteSQL properties are assigned. The ability to generate update SQL statements with
TOraQuery automatically was added in ODAC 6.00.0.4. Therefore, after upgrading yourODAC to the sixth version, all TOraQuery components in you project become editable, andcan be modified by the end users. To restore the old behavior, set the
OraQueryCompatibilityMode variable to True.

© 1997-2019
Devart. All Rights
Reserved.

4.24

Request Support

DAC Forum

Provide Feedback

Oracle Package Wizard
Oracle Package Wizard is designed for creating wrapper classes for PL/SQL Packages. It
greatly simplifies working with types and stored procedures containing in PL/SQL Packages.
Oracle Package Wizard supports:
All native Oracle types.
PL/SQL tables of any simple data type except boolean.
PL/SQL records, including nested records.
To create a wrapper class, perform the following steps:
1. Run Oracle Package Wizard from the ODAC menu.
2. Assign properties to connect to your Oracle server.
3. Choose the packages you want to be wrapped.
Note that items with unsupported parameter types cannot be selected. They are grayed out.
4. Select code generation options:© 2019 Devart

155

Oracle Data Access Components

Parameter type and method conventions
Use Numbers - when this option is checked, Wizard maps Oracle numbers with theprecision larger than 15 to ftNumber. Otherwise, they are mapped to ftFloat.
Use Integers - when this option is enabled, Wizard maps Oracle numbers with the precisionless than 10 to ftInteger. Otherwise, they are mapped to ftFloat or ftNumber.
Use TimeStamps - when this option is enabled, Wizard maps Oracle timestamps toftTimeStamp, ftTimeStampTZ, or ftTimeStampLTZ. Otherwise, timestamps are mapped toftDateTime.
Use DataSets - when this option is enabled, Wizard uses TOraDataSet parameters toreturn Orcale cursors. Otherwise TOraCursor parameters are used.
Use Unicode - when this option is enabled, Wizard creates fields of the ftWideString data
type. Otherwise, ftString is used.
Use variants as parameters - when this option is enabled, variants are used for all simple
parameter types.
Generate overloaded methods - when this option is enabled, overloaded methods are
created. Otherwise, overloaded subprograms are mapped to the methods with different
suffixes (1, 2, 3 and so on).

Identifier generation rules
Unchangedcase, CapitalizedCase, lowercase, UPPERCASE - these alternative options
define character case in identifier names.
Remove underscores - when this option is enabled, Wizard removes underscores fromgenerated identifiers.
Prefix objects with T - when this option is enabled, generated class names are prefixed with'T'.
Prefix parameters with A - when this option is enabled, method parameters are prefixed with'A'.

Target environment
Generate code for all versions of Delphi - when this option is enabled, generated code iscompatible with the following Delphi versions: Delphi 6, Delphi 7, Borland Developer Studio
2006, CodeGear Delphi 2007 for Win32. Otherwise, generated code will work surely only inthe current version of Delphi.
Generated code for - select Win32, CLR or Both to determine environments that generated
code will be compatible with.

© 2019 Devart

Using ODAC

156

5. Define files to be generated:o Select the target directory.
o Specify the unit name.
o Enable the "Add to project" option if you want to add the generated unit to the current
project.
o Enable the "Generate as components" option if you want to generate components
registration code.
o Choice the Component palette tab name that will be used for generating components
registration code.
o Enable the "Generate resources" option to generate resource files (*.res files for Win32
and *.bmp files for CLR). In case of a CLR code generation, you must specify the
Images subdirectory name.
Press the Generate button to generate classes for selected packages.

© 1997-2019
Devart. All Rights
Reserved.

4.25

Request Support

DAC Forum

Provide Feedback

Integration with dbForge Studio for Oracle
Starting with version 8.2.7, ODAC supports working with dbForge Studio for Oracle. dbForge
Studio for Oracle (formerly known as OraDeveloper Tools) is a powerful Oracle databasedevelopment environment.
This tutorial explains the integration between ODAC and dbForge Studio for Oracle.

Compatibility
ODAC supports dbForge Studio for Oracle in almost all Delphi and C++Builder versions
except the following: Delphi 2006, C++Builder 2006, Delphi 2005.

Choosing integration
It is possible to choose what tool will be used by ODAC. Moreover, it is possible to disable
integration with any tool whatsoever. It can be done in the Delphi main menu->ODAC>Database Tools menu. There you can choose one of the three options (two options for IDE
versions earlier than RAD Studio 2007):

OptionMeaningdbForge Studio for
Oracle Integration

All the functionality described below uses
dbForge Studio for Oracle

No Integration

All functionality described below is© 2019 Devart

157

Oracle Data Access Components

disabled and cannot be used

Using dbForge Studio for Oracle in the components
When dbForge Studio for Oracle integration is enabled, several ODAC components obtain
additional functionality.
Note: Using any submenus of the "dbForge Studio for Oracle" popup menu described below
opens dbForge Studio for Oracle (if it was not opened before).

TOraSession
The TOraSession component obtains an additional popup menu (available by right-click on
the component) named "dbForge Studio for Oracle". This menu contains the "Find in
Database Explorer" submenu. Clicking this submenu will cause the following steps to be
performed by ODAC and dbForge Studio for Oracle:
If TOraSession.ConnectString is blank, the "Connection is not defined" error is generated.
If TOraSession.ConnectString is not blank, ODAC sends the message to dbForge Studiofor Oracle to find in its Database Explorer the connection with the same connection
parameters as TOraSession has. Note that if dbForge Studio for Oracle was not running
until this moment, it starts running.
If dbForge Studio for Oracle found the appropriate connection in its Database Explorer, it
will make this connection the current connection and open it. Otherwise, dbForge Studio for
Oracle will show the window with the following content:
There is no suitable connection found in Database Explorer. Do you want to create one?
It is up to you to decide whether you want or not to create a new connection in Database
Explorer of dbForge Studio for Oracle.
Also, the TOraSession editor form obtains a dropdown list that is filled with connections from
Database Explorer of dbForge Studio for Oracle. When the value from this list is chosen,
TOraSession's options are filled with the options obtained from dbForge Studio for Oracle.
Note: The dropdown list on the TOraSession editor form is filled only if dbForge Studio for
Oracle was running before the editor was opened.

TOraQuery and TSmartQuery
The TOraQuery and TSmartQuery components obtain an additional popup menu (available
by right-click on the component) named "dbForge Studio for Oracle". This menu contains thefollowing submenus:© 2019 Devart

Using ODAC

158

"Edit SQL" - clicking this submenu opens the new SQL editor in dbForge Studio for Oracle.
Saving changes made in this editor saves them to the linked TOraQuery or TSmartQuerycomponent.
"Query Builder" - clicking this submenu opens the new Query Builder editor in dbForge
Studio for Oracle.
"Step Into" - clicking this submenu starts debuging of a query in dbForge Studio for Oracle.
"Retrieve data" - clicking this submenu opens a query in dbForge Studio for Oracle. If thequery contains the SELECT statement, the data is retrieved. Otherwise, the query is
executed.
Also, opening the TOraQuery and TSmartQuery editor form opens dbForge Studio for Oracle(if it was not opened before). This allows using powerful SQL editor of dbForge Studio for
Oracle directly in the IDE.

TOraTable
The TOraTable component obtains an additional popup menu (available by right-click on thecomponent) named "dbForge Studio for Oracle". This menu contains the following
submenus:"Find in Database Explorer" - clicking this submenu looks for the table specified in
TOraTable.TableName in Database Explorer of dbForge Studio for Oracle. If the table isfound, it is made current.
"Edit Object" - clicking this submenu opens the table editor in dbForge Studio for Oracle. In
the editor, it is possible to modify the structure of the table, its indexes, etc.

TOraStoredProc
The TOraStoredProc component obtains an additional popup menu (available by right-click on
the component) named "dbForge Studio for Oracle". This menu contains the following
submenus:"Find in Database Explorer" - clicking this submenu looks for the stored procedure specified
in TOraStoredProc.StoredProcName in Database Explorer of dbForge Studio for Oracle. If
the stored procedure is found, it is made the current.
"Step Into" - clicking this submenu starts debuging of a stored procedure in dbForge Studiofor Oracle.
"Recompile" - clicking this submenu recompiles a stored procedure in dbForge Studio for
Oracle.
"Recompile with debug info" - clicking this submenu recompiles a stored procedure withdebug info in dbForge Studio for Oracle.

© 2019 Devart

159

Oracle Data Access Components

Also, opening the TOraStoredProc editor form opens dbForge Studio for Oracle (if it was not
opened before). This allows using powerful SQL editor of dbForge Studio for Oracle directly in
the IDE.

TOraSQLThe TOraSQL component obtains an additional popup menu (available by right-click on thecomponent) named "dbForge Studio for Oracle". This menu contains the following
submenus:"Edit SQL" - clicking this submenu opens the new SQL editor in dbForge Studio for Oracle.
Saving changes made in this editor saves them to the linked TOraSQL component.
"Step Into" - clicking this submenu starts debuging of a query in dbForge Studio for Oracle.
Also, opening the TOraSQL editor form opens dbForge Studio for Oracle (if it was not opened
before). This allows using powerful SQL editor of dbForge Studio for Oracle directly in the
IDE.

TOraScript
The TOraScript component obtains an additional popup menu (available by right-click on thecomponent) named "dbForge Studio for Oracle". This menu contains the following
submenus:"Edit SQL" - clicking this submenu opens the new SQL editor in dbForge Studio for Oracle.
Saving changes made in this editor saves them to the linked TOraScript component.
"Step Into" - clicking this submenu starts debuging of a script in dbForge Studio for Oracle.
Also, opening the TOraScript editor form opens dbForge Studio for Oracle (if it was not
opened before). This allows using powerful SQL editor of dbForge Studio for Oracle directly in
the IDE.

TOraPackage
The TOraPackage component obtains an additional popup menu (available by right-click on
the component) named "dbForge Studio for Oracle". This menu contains the following
submenus:"Find in Database Explorer" - clicking this submenu looks for the package specified in
TOraPackage.PackageName in Database Explorer of dbForge Studio for Oracle. If the
package is found, it is made the current.
"Edit Object" - clicking this submenu opens the package editor in dbForge Studio for
Oracle. In the editor, it is possible to modify the content of the package.

© 2019 Devart

Using ODAC

© 1997-2019
Devart. All Rights
Reserved.

4.26

Request Support

DAC Forum

160

Provide Feedback

64-bit Development with Embarcadero RAD Studio XE2

RAD Studio XE2 Overview
RAD Studio XE2 is the major breakthrough in the line of all Delphi versions of this product. It
allows deploying your applications both on Windows and Mac OS platforms. Additionally, it is
now possible to create 64-bit Windows applications to fully benefit from the power of new
hardware. Moreover, you can create visually spectacular applications with the help of theFireMonkey GPU application platform.
Its main features are the following:
Windows 64-bit platform support;
Mac OS support;
FireMonkey application development platform;
Live data bindings with visual components;
VCL styles for Windows applications.
For more information about RAD Studio XE2, please refer to World Tour.

Changes in 64-bit Application Development
64-bit platform support implies several important changes that each developer must keep inmind prior to the development of a new application or the modernization of an old one.
GeneralRAD Studio XE2 IDE is a 32-bit application. It means that it cannot load 64-bit packages atdesign-time. So, all design-time packages in RAD Studio XE2 IDE are 32-bit.
Therefore, if you develop your own components, you should remember that for the purpose ofdeveloping components with the 64-bit platform support, you have to compile run-time
packages both for the 32- and 64-bit platforms, while design-time packages need to becompiled only for the 32-bit platform. This might be a source of difficulties if your package issimultaneously both a run-time and a design-time package, as it is more than likely that thispackage won't be compiled for the 64-bit platform. In this case, you will have to separate yourpackage into two packages, one of which will be used as run-time only, and the other as
design-time only.
For the same reason, if your design-time packages require that certain DLLs be loaded, you
should remember that design-time packages can be only 32-bit and that is why they can load
only 32-bit versions of these DLLs, while at run-time 64-bit versions of the DLLs will be© 2019 Devart

161

Oracle Data Access Components

loaded. Correspondingly, if there are only 64-bit versions of the DLL on your computer, you
won't be able to use all functions at design-time and, vice versa, if you have only 32-bit
versions of the DLLs, your application won't be able to work at run-time.
Extended type
For this type in a 64-bit applications compiler generates SSE2 instructions instead of FPU,
and that greatly improves performance in applications that use this type a lot (where data
accuracy is needed). For this purpose, the size and precision of Extended type is reduced:

TYPE
Extended

32-bit10 bytes

64-bit
8 bytes

The following two additional types are introduced to ensure compatibility in the process ofdeveloping 32- and 64-bit applications:
Extended80 – whose size in 32-bit application is 10 bytes; however, this type provides thesame precision as its 8-byte equivalent in 64-bit applications.
Extended80Rec – can be used to perform low-level operations on an extended precision
floating-point value. For example, the sign, the exponent, and the mantissa can be changed
separately. It enables you to perform memory-related operations with 10-bit floating-point
variables, but not extended-precision arithmetic operations.
Pointer and Integers
The major difference between 32- and 64-bit platforms is the volume of the used memory
and, correspondingly, the size of the pointer that is used to address large memory volumes.

TYPE
Pointer

32-bit
4 bytes64-bit
8 bytesAt the same time, the size of the Integer type remains the same for both platforms:

TYPE
Integer

32-bit
4 bytes64-bit
4 bytesThat is why, the following code will work incorrectly on the 64-bit platform:
Ptr := Pointer(Integer(Ptr) + Offset);
While this code will correctly on the 64-bit platform and incorrectly on the 32-bit platform:
Ptr := Pointer(Int64(Ptr) + Offset);
For this purpose, the following platform-dependent integer type is introduced:

TYPE

32-bit64-bit© 2019 Devart

Using ODAC

NativeInt
NativeUInt

4 bytes
4 bytes162

8 bytes
8 bytesThis type helps ensure that pointers work correctly both for the 32- and 64-bit platforms:
Ptr := Pointer(NativeInt(Ptr) + Offset);
However, you need to be extra-careful when developing applications for several versions ofDelphi, in which case you should remember that in the previous versions of Delphi the
NativeInt type had different sizes:

TYPE
NativeInt
NativeInt
NativeInt
NativeInt
NativeInt
NativeInt
NativeInt
NativeInt
NativeInt
NativeInt

Delphi
Version
D5
D6
D7
D2005
D2006
D2007
D2009
D2010
Delphi XE
Delphi XE2

Size
N/A
N/A
8 bytes
8 bytes
8 bytes
8 bytes
4 bytes
4 bytes
4 bytes
4 or 8 bytes

Out parameters
Some WinAPIs have OUT parameters of the SIZE_T type, which is equivalent to NativeInt inDelphi XE2. The problem is that if you are developing only a 32-bit application, you won't beable to pass Integer to OUT, while in a 64-bit application, you will not be able to pass Int64; inboth cases you will have to pass NativeInt.
For example:
procedure MyProc(out Value: NativeInt);
begin
Value := 12345;
end;var
Value1: NativeInt;{$IFDEF WIN32}
Value2: Integer;{$ENDIF}{$IFDEF WIN64}
Value2: Int64;{$ENDIF}
begin
MyProc(Value1); // will be compiled;
MyProc(Value2); // will not be compiled !!!
© 2019 Devart

163

Oracle Data Access Components

end;
Win API
If you pass pointers to SendMessage/PostMessage/TControl.Perform, the wParam andlParam parameters should be type-casted to the WPARAM/LPARAM type and not to Integer/
Longint.
Correct:
SendMessage(hWnd, WM_SETTEXT, 0, LPARAM(@MyCharArray));
Wrong:
SendMessage(hWnd, WM_SETTEXT, 0, Integer(@MyCharArray));
Replace SetWindowLong/GetWindowLog with SetWindowLongPtr/GetWindowLongPtr for
GWLP_HINSTANCE, GWLP_ID, GWLP_USERDATA, GWLP_HWNDPARENT and
GWLP_WNDPROC as they return pointers and handles. Pointers that are passed to
SetWindowLongPtr should be type-casted to LONG_PTR and not to Integer/Longint.
Correct:
SetWindowLongPtr(hWnd, GWLP_WNDPROC, LONG_PTR(@MyWindowProc));
Wrong:
SetWindowLong(hWnd, GWL_WNDPROC, Longint(@MyWindowProc));
Pointers that are assigned to the TMessage.Result field should use a type-cast to LRESULT
instead of Integer/Longint.
Correct:
Message.Result := LRESULT(Self);Wrong:
Message.Result := Integer(Self);
All TWM...-records for the windows message handlers must use the correct Windows types
for the fields:
Msg: UINT; wParam: WPARAM; lParam: LPARAM; Result: LRESULT)
Assembler
In order to make your application (that uses assembly code) work, you will have to makeseveral changes to it:
rewrite your code that mixes Pascal code and assembly code. Mixing them is not supported
in 64-bit applications;rewrite assembly code that doesn't consider architecture and processor specifics.
You can use conditional defines to make your application work with different architectures.
You can learn more about Assembly code here: http://docwiki.embarcadero.com/RADStudio/
en/Using_Inline_Assembly_Code You can also look at the following article that will help you to© 2019 Devart

Using ODAC

164

make your application support the 64-bit platform: http://docwiki.embarcadero.com/
RADStudio/en/Converting_32-bit_Delphi_Applications_to_64-bit_Windows
Exception handling
The biggest difference in exception handling between Delphi 32 and 64-bit is that in Delphi
XE2 64-bit you will gain more performance because of different internal exception
mechanism. For 32-bit applications, the Delphi compiler (dcc32.exe) generates additional
code that is executed any way and that causes performance loss. The 64-bit compiler(dcc64.exe) doesn't generate such code, it generates metadata and stores it in the PDATA
section of an executable file instead.
But in Delphi XE2 64-bit it's impossible to have more than 16 levels of nested exceptions.
Having more than 16 levels of nested exceptions will cause a Run Time error.
Debugging
Debugging of 64-bit applications in RAD Studio XE2 is remote. It is caused by the same
reason: RAD Studio XE2 IDE is a 32 application, but your application is 64-bit. If you are trying
to debug your application and you cannot do it, you should check that the Include remotedebug symbols project option is enabled.
To enable it, perform the following steps:
1. Open Project Options (in the main menu Project->Options).
2. In the Target combobox, select Debug configuration - 64-bit Windows platform. If there
is no such option in the combobox, right click "Target Platforms" in Project Manager andselect Add platform. After adding the 64-bit Windows platform, the Debug configuration 64-bit Windows platform option will be available in the Target combobox.
3. Select Linking in the left part of the Project Options form.
4. enable the Include remote debug symbols option.
After that, you can run and debug your 64-bit application.
To enable remote debugging, perform the following steps:
1. Install Platform Assistant Server (PAServer) on a remote computer. You can find PAServerin the %RAD_Studio_XE2_Install_Directory%\PAServer directory. The setup_paserver.exe
file is an installation file for Windows, and the setup_paserver.zip file is an istallation file for
MacOS.
2. Run the PAServer.exe file on a remote computer and set the password that will be used toconnect to this computer.
3. On a local computer with RAD Studio XE2 installed, right-click the target platform that you
want to debug in Project Manager and select Assign Remote Profile. Click the Add buttonin the displayed window, input your profile name, click the Next button, input the name of aremote computer and the password to it (that you assigned when you started PAServer ona remote computer).

© 2019 Devart

165

Oracle Data Access Components

After that, you can test the connection by clicking the Test Connection button. If yourconnection failed, check that your firewalls on both remote and local computers do not block
your connection, and try to establish a connection once more. If your connection succeeded,click the Next button and then the Finish button. Select your newly created profile and clickOK.
After performing these steps you will be able to debug your application on a remote computer.
You application will be executed on a remote computer, but you will be able to debug it on
your local computer with RAD Studio XE2.
For more information about working with Platform Assistant Server, please refer to http://docwiki.embarcadero.com/RADStudio/Tokyo/en/
Running_the_Platform_Assistant_on_Windows© 1997-2019
Devart. All Rights
Reserved.

4.27

Request Support

DAC Forum

Provide Feedback

Database Specific Aspects of 64-bit Development

Oracle Connectivity Aspects
OCI mode:
Since at design-time Rad Studio XE 2 works only with x32 libraries and if a connection to theserver is needed at design-time, you need to install Oracle Client (x32) regardless of theintended platform. (If the x32 client is needed only for development, you can use only Oracle
Instant Client). By default, ODAC use DEFAULT of Oracle Client, that is why, if a x64 client isthe default client at design-time, you need to specify a x32 client. To prevent conflicts between
different versions of Oracle Client on the end-user side, you can leave the Home property
empty, in this case, the default client will be used.
DIRECT mode:
Since there is no need to install Oracle Client for the DIRECT mode, the development ofapplications for the x64 platform does not differ from the development of application for
Windows x86.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

5166

Reference
This page shortly describes units that exist in ODAC.

Units
Unit Name
CRAccess

CRBatchMove
CREncryption
CRVio
DAAlerter

DADump

DALoaderDAScriptDASQLMonitor

DBAccess
MemDataMemDS
OdacVclOra© 2019 Devart

Description
This unit contains baseclasses for accessing
databases.
This unit contains
implementation of the
TCRBatchMove component.
This unit contains baseclasses for data encryption.
Description is not available
at the moment.
This unit contains the baseclass for the TOraAlerter
component.
This unit contains the baseclass for the TOraDump
component.
This unit contains the baseclass for the TOraLoader
component.
This unit contains the baseclass for the TOraScript
component.
This unit contains the baseclass for the
TOraSQLMonitor
component.
This unit contains baseclasses for most of thecomponents.
This unit contains classes forstoring data in memory.
This unit contains
implementation of the
TMemDataSet class.
This unit contains the visual
constituent of ODAC.
This unit contains main

167

Oracle Data Access Components

OraAlerter

OraAQ
OraCall

OraClasses

OraConnectionPool

OraErrHand
OraError
OraLoader
OraNetOraObjects

OraPackage
OraProvider

components of ODAC.
This unit contains
implementation of the
TOraAlerter component.
This unit contains ODAC
components for working with
Oracle Advanced Queueing.
Defines Oracle Call Interface
routines.
OraClasses unit defines
following data type
constants: dtRowId dtCursor
dtOraBlob dtOraClob
dtBFILE dtCFILE dtLabeldtFixedChar dtUndefined
dtTimeStamp
dtTimeStampTZ
dtTimeStampLTZ
dtIntervalYM dtIntervalDS //obsolete dtBLOBLocator =dtOraBlob dtCLOBLocator =dtOraClob
This unit contains the
TOraConnectionPoolManager class for managing
connection pool.
This unit contains the
TOraErrorHandler
component.
This unit contains the
EOraError exception class.
This unit contains
implementation of the
TOraLoader component.
This unit implements the
Direct Mode in ODAC.
This unit contains classes forOracle OBJECT, ARRAY,TABLE and XMLTYPE datatypes.
This unit contains
implementation of the
TOraPackage component.
This unit contains© 2019 DevartReference

implementation of the
TOraProvider component.
This unit contains
implementation of the
TOraScript component.
This unit contains theTSmartQuery and
TOraTable components.
This unit contains
implementation of the
TOraSQLMonitor
component.
This unit contains
implementation of the
TOraTransaction
component.
This unit contains
implementation of theTVirtualDataSet component.
This unit contains
implementation of theTVirtualTable component.

OraScript

OraSmart

OraSQLMonitor

OraTransaction

VirtualDataSet

VirtualTable© 1997-2019
Devart. All Rights
Reserved.

5.1

168

Request Support

DAC Forum

Provide Feedback

CRAccess
This unit contains base classes for accessing databases.

Classes
Name
TCRCursor

Description
A base class for classes thatwork with database cursors.

Types
Name
TBeforeFetchProc© 2019 Devart

Description
This type is used for the
TCustomDADataSet.Before
Fetch event.

169

Oracle Data Access Components

Enumerations
Name

Description
Specifies how to handle
transactions containing
database modifications.
Specifies the transaction
behaviour when it isdestroyed while being
active, or when one of its
connections is closed withthe active transaction.
Used to set cursor state

TCRIsolationLevel

TCRTransactionAction

TCursorState© 1997-2019
Devart. All Rights
Reserved.
5.1.1

Request Support

DAC Forum

Provide Feedback

ClassesClasses in the CRAccess unit.

ClassesName

Description
A base class for classes thatwork with database cursors.

TCRCursor© 1997-2019
Devart. All Rights
Reserved.
5.1.1.1

Request Support

DAC Forum

Provide Feedback

TCRCursor ClassA base class for classes that work with database cursors.
For a list of all members of this type, see TCRCursor members.

Unit
CRAccess

Syntax
TCRCursor = class(TSharedObject);Remarks© 2019 DevartReference

170

TCRCursor is a base class for classes that work with database cursors.

Inheritance Hierarchy
TSharedObject
TCRCursor© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.1.1.1.1 Members

TCRCursor class overview.

Properties
Name

Description
Used to return the count ofreference to a
TSharedObject object.

RefCount (inherited from TSharedObject)

Methods
Name

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Decrements the reference
count.

AddRef (inherited from TSharedObject)

Release (inherited from TSharedObject)© 1997-2019
Devart. All Rights
Reserved.
5.1.2

Request Support

DAC Forum

Provide Feedback

Types
Types in the CRAccess unit.

Types
Name
TBeforeFetchProc© 2019 Devart

Description
This type is used for the
TCustomDADataSet.Before
Fetch event.

171

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.
5.1.2.1

Request Support

DAC Forum

Provide Feedback

TBeforeFetchProc Procedure ReferenceThis type is used for the TCustomDADataSet.BeforeFetch event.

Unit
CRAccess

SyntaxTBeforeFetchProc = procedure (var Cancel: boolean) of object;Parameters
CancelTrue, if the current fetch operation should be aborted.

© 1997-2019
Devart. All Rights
Reserved.
5.1.3

Request Support

DAC Forum

Provide Feedback

Enumerations
Enumerations in the CRAccess unit.

Enumerations
Name

Description
Specifies how to handle
transactions containing
database modifications.
Specifies the transaction
behaviour when it isdestroyed while being
active, or when one of its
connections is closed withthe active transaction.
Used to set cursor state

TCRIsolationLevel

TCRTransactionAction

TCursorState© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

5.1.3.1

172

TCRIsolationLevel Enumeration

Specifies how to handle transactions containing database modifications.

Unit
CRAccess

SyntaxTCRIsolationLevel = (ilReadCommitted);

ValuesValue
ilReadCommitted© 1997-2019
Devart. All Rights
Reserved.
5.1.3.2

Meaning
The default transaction behavior. If the transaction contains DML
that requires row locks held by another transaction, then the DML
statement waits until the row locks are released.
Request Support

DAC Forum

Provide Feedback

TCRTransactionAction Enumeration

Specifies the transaction behaviour when it is destroyed while being active, or when one of its
connections is closed with the active transaction.

Unit
CRAccess

SyntaxTCRTransactionAction = (taCommit, taRollback);

ValuesValue
taCommit
taRollback© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Meaning
Transaction is committed.
Transaction is rolled back.
Request Support

DAC Forum

Provide Feedback

173

5.1.3.3

Oracle Data Access Components

TCursorState Enumeration

Used to set cursor state

Unit
CRAccess

SyntaxTCursorState = (csInactive, csOpen, csParsed, csPrepared, csBound,csExecuteFetchAll, csExecuting, csExecuted, csFetching,csFetchingAll, csFetched);

ValuesValue
Meaning
csBoundParameters boundcsExecuted
Statement successfully executed
csExecuteFetchAll Set before FetchAll
csExecuting
Statement is set before executing
csFetched
Fetch finished or canceled
csFetching
Set on firstcsFetchingAll
Set on the FetchAll startcsInactive
Default state
csOpenstatement open
csParsed
Statement parsed
csPrepared
Statement prepared© 1997-2019
Request Support
DAC Forum
Devart. All Rights
Reserved.

5.2

Provide Feedback

CRBatchMove
This unit contains implementation of the TCRBatchMove component.

ClassesName
TCRBatchMove

Description
Transfers records between
datasets.

Types© 2019 DevartReference

Name

174

Description
This type is used for the
TCRBatchMove.OnBatchMo
veProgress event.

TCRBatchMoveProgressEvent

Enumerations
Name

Description
Used to set the type of thebatch operation that will be
executed after calling the
TCRBatchMove.Execute
method.
Used to specify the way
fields of the destination andsource datasets will bemapped to each other if the
TCRBatchMove.Mappings
list is empty.

TCRBatchMode

TCRFieldMappingMode© 1997-2019
Devart. All Rights
Reserved.
5.2.1

Request Support

DAC Forum

Provide Feedback

ClassesClasses in the CRBatchMove unit.

ClassesName

Description
Transfers records between
datasets.

TCRBatchMove© 1997-2019
Devart. All Rights
Reserved.
5.2.1.1

Request Support

DAC Forum

TCRBatchMove Class

Transfers records between datasets.
For a list of all members of this type, see TCRBatchMove members.

Unit
CRBatchMove© 2019 Devart

Provide Feedback

175

Oracle Data Access Components

SyntaxTCRBatchMove = class(TComponent);

Remarks
The TCRBatchMove component transfers records between datasets. Use it to copy dataset
records to another dataset or to delete datasets records that match records in anotherdataset. The TCRBatchMove.Mode property determines the desired operation type, the
TCRBatchMove.Source and TCRBatchMove.Destination properties indicate corresponding
datasets.
Note: A TCRBatchMove component is added to the Data Access page of the component
palette, not to the ODAC page.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.1 Members

TCRBatchMove class overview.

Properties
Name
AbortOnKeyViol

AbortOnProblem

ChangedCount

CommitCount

Destination

Description
Used to specify whether thebatch operation should beterminated immediately after
key or integrity violation.
Used to specify whether thebatch operation should beterminated immediately
when it is necessary to
truncate data to make it fit
the specified Destination.
Used to get the number ofrecords changed in thedestination dataset.
Used to set the number ofrecords to be batch moved
before commit occurs.
Used to specify thedestination dataset for thebatch operation.

© 2019 DevartReference

FieldMappingMode

KeyViolCount

Mappings

Mode

MovedCount

ProblemCount

RecordCount

SourceUsed to specify the way
fields of destination andsource datasets will bemapped to each other if the
TCRBatchMove.Mappings
list is empty.
Used to get the number ofrecords that could not be
moved to or from thedestination dataset because
of integrity or key violations.
Used to set field matching
between source anddestination datasets for thebatch operation.
Used to set the type of thebatch operation that will be
executed after calling the
TCRBatchMove.Execute
method.
Used to get the number ofrecords that were read fromthe source dataset during
the batch operation.
Used to get the number ofrecords that could not be
added to the destination
dataset because of the field
type mismatch.
Used to indicate themaximum number of records
in the source dataset that will
be applied to the destination
dataset.
Used to specify the source
dataset for the batch
operation.

Methods
Name
Execute© 2019 Devart

176

Description
Performs the batch
operation.

177

Oracle Data Access Components

EventsName

Description
Occurs when providing
feedback to the user about
the batch operation inprogress is needed.

OnBatchMoveProgress© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.2 Properties

Properties of the TCRBatchMove class.
For a complete list of the TCRBatchMove class members, see the TCRBatchMove
Members topic.

PublicName
ChangedCount

KeyViolCount

MovedCount

ProblemCount

Description
Used to get the number ofrecords changed in thedestination dataset.
Used to get the number ofrecords that could not be
moved to or from thedestination dataset because
of integrity or key violations.
Used to get the number ofrecords that were read fromthe source dataset during
the batch operation.
Used to get the number ofrecords that could not be
added to the destination
dataset because of the field
type mismatch.

Published
Name
AbortOnKeyViol

Description
Used to specify whether thebatch operation should be© 2019 DevartReference178

terminated immediately after
key or integrity violation.
Used to specify whether thebatch operation should beterminated immediately
when it is necessary to
truncate data to make it fit
the specified Destination.
Used to set the number ofrecords to be batch moved
before commit occurs.
Used to specify thedestination dataset for thebatch operation.
Used to specify the way
fields of destination andsource datasets will bemapped to each other if the
TCRBatchMove.Mappings
list is empty.
Used to set field matching
between source anddestination datasets for thebatch operation.
Used to set the type of thebatch operation that will be
executed after calling the
TCRBatchMove.Execute
method.
Used to indicate themaximum number of records
in the source dataset that will
be applied to the destination
dataset.
Used to specify the source
dataset for the batch
operation.

AbortOnProblem

CommitCount

Destination

FieldMappingMode

Mappings

Mode

RecordCount

SourceSee Also
TCRBatchMove ClassTCRBatchMove Class Members© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

179

Oracle Data Access Components

5.2.1.1.2.1 AbortOnKeyViol Property

Used to specify whether the batch operation should be terminated immediately after key or
integrity violation.

Class
TCRBatchMove

Syntaxproperty AbortOnKeyViol: boolean default True;

Remarks
Use the AbortOnKeyViol property to specify whether the batch operation is terminatedimmediately after key or integrity violation.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.2.2 AbortOnProblem Property

Used to specify whether the batch operation should be terminated immediately when it isnecessary to truncate data to make it fit the specified Destination.

Class
TCRBatchMove

Syntaxproperty AbortOnProblem: boolean default True;

Remarks
Use the AbortOnProblem property to specify whether the batch operation is terminatedimmediately when it is necessary to truncate data to make it fit the specified Destination.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.2.3 ChangedCount Property

Used to get the number of records changed in the destination dataset.

Class© 2019 DevartReference

180

TCRBatchMove

Syntaxproperty ChangedCount: Integer;

Remarks
Use the ChangedCount property to get the number of records changed in the destination
dataset. It shows the number of records that were updated in the bmUpdate or
bmAppendUpdate mode or were deleted in the bmDelete mode.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.2.4 CommitCount Property

Used to set the number of records to be batch moved before commit occurs.

Class
TCRBatchMove

Syntaxproperty CommitCount: integer default 0;

Remarks
Use the CommitCount property to set the number of records to be batch moved before thecommit occurs. If it is set to 0, the operation will be chunked to the number of records to fit 32
Kb.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.2.1.1.2.5 Destination Property

Used to specify the destination dataset for the batch operation.

Class
TCRBatchMove

Syntaxproperty Destination: TDataSet;© 2019 Devart

Provide Feedback

181

Oracle Data Access Components

Remarks
Specifies the destination dataset for the batch operation.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.2.6 FieldMappingMode Property

Used to specify the way fields of destination and source datasets will be mapped to eachother if the Mappings list is empty.

Class
TCRBatchMove

Syntaxproperty FieldMappingMode: TCRFieldMappingMode default
mmFieldIndex;

Remarks
Specifies in what way fields of destination and source datasets will be mapped to each otherif the Mappings list is empty.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.2.7 KeyViolCount Property

Used to get the number of records that could not be moved to or from the destination dataset
because of integrity or key violations.

Class
TCRBatchMove

Syntaxproperty KeyViolCount: Integer;

Remarks
Use the KeyViolCount property to get the number of records that could not be replaced,added, deleted from the destination dataset because of integrity or key violations.

© 2019 DevartReference

182

If AbortOnKeyViol is True, then KeyViolCount will never exceed one, because the operationaborts when the integrity or key violation occurs.

See Also
AbortOnKeyViol© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.2.8 Mappings Property

Used to set field matching between source and destination datasets for the batch operation.

Class
TCRBatchMove

Syntaxproperty Mappings: TStrings;

Remarks
Use the Mappings property to set field matching between the source and destination datasets
for the batch operation. By default fields matching is based on their position in the datasets.
To map the column ColName in the source dataset to the column with the same name in thedestination dataset, use:
ColNameExampleTo map a column named SourceColName in the source dataset to the column named
DestColName in the destination dataset, use:
DestColName=SourceColName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.2.9 Mode Property

Used to set the type of the batch operation that will be executed after calling the Execute
method.

Class© 2019 Devart

183

Oracle Data Access Components

TCRBatchMove

Syntaxproperty Mode: TCRBatchMode default bmAppend;

Remarks
Use the Mode property to set the type of the batch operation that will be executed after calling
the Execute method.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.2.10 MovedCount Property

Used to get the number of records that were read from the source dataset during the batch
operation.

Class
TCRBatchMove

Syntaxproperty MovedCount: Integer;

Remarks
Use the MovedCount property to get the number of records that were read from the source
dataset during the batch operation. This number includes records that caused key or integrity
violations or were trimmed.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.2.11 ProblemCount Property

Used to get the number of records that could not be added to the destination dataset becauseof the field type mismatch.

Class
TCRBatchMove

Syntax© 2019 DevartReference

184

property ProblemCount: Integer;

Remarks
Use the ProblemCount property to get the number of records that could not be added to thedestination dataset because of the field type mismatch.
If AbortOnProblem is True, then ProblemCount will never exceed one, because the operationaborts when the problem occurs.

See Also
AbortOnProblem© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.2.12 RecordCount Property

Used to indicate the maximum number of records in the source dataset that will be applied tothe destination dataset.

Class
TCRBatchMove

Syntaxproperty RecordCount: Integer default 0;

Remarks
Determines the maximum number of records in the source dataset, that will be applied to thedestination dataset. If it is set to 0, all records in the source dataset will be applied to thedestination dataset, starting from the first record. If RecordCount is greater than 0, up to the
RecordCount records are applied to the destination dataset, starting from the current recordin the source dataset. If RecordCount exceeds the number of records left in the source
dataset, batch operation terminates after reaching last record.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.2.1.1.2.13 Source Property

Used to specify the source dataset for the batch operation.

Class© 2019 Devart

Provide Feedback

185

Oracle Data Access Components

TCRBatchMove

Syntaxproperty Source: TDataSet;

Remarks
Specifies the source dataset for the batch operation.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.3 Methods

Methods of the TCRBatchMove class.
For a complete list of the TCRBatchMove class members, see the TCRBatchMove
Members topic.

PublicName

Description
Performs the batch
operation.

ExecuteSee Also
TCRBatchMove ClassTCRBatchMove Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.3.1 Execute Method

Performs the batch operation.

Class
TCRBatchMove

Syntax
procedure Execute;

Remarks© 2019 DevartReference

186

Call the Execute method to perform the batch operation.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.4 Events

Events of the TCRBatchMove class.
For a complete list of the TCRBatchMove class members, see the TCRBatchMove
Members topic.

Published
Name

Description
Occurs when providing
feedback to the user about
the batch operation inprogress is needed.

OnBatchMoveProgress

See Also
TCRBatchMove ClassTCRBatchMove Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.2.1.1.4.1 OnBatchMoveProgress Event

Occurs when providing feedback to the user about the batch operation in progress is needed.

Class
TCRBatchMove

Syntaxproperty OnBatchMoveProgress: TCRBatchMoveProgressEvent;Remarks
Write the OnBatchMoveProgress event handler to provide feedback to the user about thebatch operation progress.

© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

187

5.2.2

Oracle Data Access Components

Types
Types in the CRBatchMove unit.

Types
Name

Description
This type is used for the
TCRBatchMove.OnBatchMo
veProgress event.

TCRBatchMoveProgressEvent© 1997-2019
Devart. All Rights
Reserved.
5.2.2.1

Request Support

DAC Forum

Provide Feedback

TCRBatchMoveProgressEvent Procedure ReferenceThis type is used for the TCRBatchMove.OnBatchMoveProgress event.

Unit
CRBatchMove

SyntaxTCRBatchMoveProgressEvent = procedure (Sender: TObject; Percent:integer) of object;Parameters
SenderAn object that raised the event.
Percent
Percentage of the batch operation progress.

© 1997-2019
Devart. All Rights
Reserved.
5.2.3

Request Support

DAC Forum

Provide Feedback

Enumerations
Enumerations in the CRBatchMove unit.

Enumerations
Name
TCRBatchMode

Description
Used to set the type of thebatch operation that will be
executed after calling the© 2019 DevartReference

TCRBatchMove.Execute
method.
Used to specify the way
fields of the destination andsource datasets will bemapped to each other if the
TCRBatchMove.Mappings
list is empty.

TCRFieldMappingMode© 1997-2019
Devart. All Rights
Reserved.
5.2.3.1

Request Support

188

DAC Forum

Provide Feedback

TCRBatchMode Enumeration

Used to set the type of the batch operation that will be executed after calling the
TCRBatchMove.Execute method.

Unit
CRBatchMove

SyntaxTCRBatchMode = (bmAppend, bmUpdate, bmAppendUpdate, bmDelete);

ValuesValue

Meaning
Appends the records from the source dataset to the destination
bmAppend
dataset. The default mode.
Replaces records in the destination dataset with the matching
bmAppendUpdate records from the source dataset. If there is no matching record in
the destination dataset, the record will be appended to it.
Deletes records from the destination dataset if there are
bmDeletematching records in the source dataset.
Replaces records in the destination dataset with the matching
bmUpdate
records from the source dataset.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
5.2.3.2

TCRFieldMappingMode Enumeration

Used to specify the way fields of the destination and source datasets will be mapped to eachother if the TCRBatchMove.Mappings list is empty.
© 2019 Devart

189

Oracle Data Access Components

Unit
CRBatchMove

Syntax
TCRFieldMappingMode = (mmFieldIndex, mmFieldName);

ValuesValue
mmFieldIndex
mmFieldName© 1997-2019
Devart. All Rights
Reserved.

5.3

MeaningSpecifies that the fields of the destination dataset will be mapped
to the fields of the source dataset by field index.
Mapping is performed by field names.
Request Support

DAC Forum

Provide Feedback

CREncryption
This unit contains base classes for data encryption.

ClassesName
TCREncryptor

Description
The class that performs dataencryption and decryption ina client application using
various encryption
algorithms.

Enumerations
Name
TCREncDataHeader

TCREncryptionAlgorithm
TCRHashAlgorithm
TCRInvalidHashAction

Description
Specifies whether the
additional information isstored with the encrypteddata.
Specifies the algorithm ofdata encryption.
Specifies the algorithm ofgenerating hash data.
Specifies the action to© 2019 DevartReference

190

perform on data fetchingwhen hash data is invalid.
© 1997-2019
Devart. All Rights
Reserved.
5.3.1

Request Support

DAC Forum

Provide Feedback

ClassesClasses in the CREncryption unit.

ClassesName

Description
The class that performs dataencryption and decryption ina client application using
various encryption
algorithms.

TCREncryptor© 1997-2019
Devart. All Rights
Reserved.
5.3.1.1

Request Support

DAC Forum

Provide Feedback

TCREncryptor Class

The class that performs data encryption and decryption in a client application using various
encryption algorithms.
For a list of all members of this type, see TCREncryptor members.

Unit
CREncryption

SyntaxTCREncryptor = class(TComponent);© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.3.1.1.1 Members

TCREncryptor class overview.

Properties© 2019 Devart

DAC Forum

Provide Feedback

191

Oracle Data Access Components

Name

Description
Specifies whether the
additional information isstored with the encrypteddata.
Specifies the algorithm ofdata encryption.
Specifies the algorithm ofgenerating hash data.
Specifies the action to
perform on data fetchingwhen hash data is invalid.
Used to set a password thatis used to generate a key forencryption.

DataHeader

EncryptionAlgorithm
HashAlgorithm
InvalidHashAction

Password

Methods
Name

Description
Sets a key, using which datais encrypted.

SetKey© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.3.1.1.2 Properties

Properties of the TCREncryptor class.
For a complete list of the TCREncryptor class members, see the TCREncryptor Members
topic.

Published
Name
DataHeader

EncryptionAlgorithm
HashAlgorithm
InvalidHashAction

Description
Specifies whether the
additional information isstored with the encrypteddata.
Specifies the algorithm ofdata encryption.
Specifies the algorithm ofgenerating hash data.
Specifies the action to© 2019 DevartReference

192

perform on data fetchingwhen hash data is invalid.
Used to set a password thatis used to generate a key forencryption.

Password

See Also
TCREncryptor ClassTCREncryptor Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.3.1.1.2.1 DataHeader Property

Specifies whether the additional information is stored with the encrypted data.

Class
TCREncryptor

Syntaxproperty DataHeader: TCREncDataHeader default ehTagAndHash;

Remarks
Use DataHeader to specify whether the additional information is stored with the encrypted
data. Default value is ehTagAndHash.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.3.1.1.2.2 EncryptionAlgorithm Property

Specifies the algorithm of data encryption.

Class
TCREncryptor

Syntaxproperty EncryptionAlgorithm: TCREncryptionAlgorithm default
eaBlowfish;© 2019 Devart

193

Oracle Data Access Components

Remarks
Use EncryptionAlgorithm to specify the algorithm of data encryption. Default value is
eaBlowfish.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.3.1.1.2.3 HashAlgorithm Property

Specifies the algorithm of generating hash data.

Class
TCREncryptor

Syntaxproperty HashAlgorithm: TCRHashAlgorithm default haSHA1;

Remarks
Use HashAlgorithm to specify the algorithm of generating hash data. This property is used
only if hash is stored with the encrypted data (the DataHeader property is set to
ehTagAndHash). Default value is haSHA1.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.3.1.1.2.4 InvalidHashAction Property

Specifies the action to perform on data fetching when hash data is invalid.

Class
TCREncryptor

Syntaxproperty InvalidHashAction: TCRInvalidHashAction default ihFail;

Remarks
Use InvalidHashAction to specify the action to perform on data fetching when hash data isinvalid. This property is used only if hash is stored with the encrypted data (the DataHeader
property is set to ehTagAndHash). Default value is ihFail.

© 2019 DevartReference194

If the DataHeader property is set to ehTagAndHash, then on data fetching from a server thehash check is performed for each record. After data decryption its hash is calculated andcompared with the hash stored in the field. If these values don't coincide, it means that thestored data is incorrect, and depending on the value of the InvalidHashAction property one of
the following actions is performed:
ihFail - the EInvalidHash exception is raised and further data reading from the server isinterrupted.
ihSkipData - the value of the field for this record is set to Null. No exception is raised.
ihIgnoreError - in spite of the fact that the data is not valid, the value is set in the field. No
exception is raised.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.3.1.1.2.5 Passw ord Property

Used to set a password that is used to generate a key for encryption.

Class
TCREncryptor

Syntaxproperty Password: string stored False;

Remarks
Use Password to set a password that is used to generate a key for encryption.
Note: Calling of the SetKey method clears the Password property.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.3.1.1.3 Methods

Methods of the TCREncryptor class.
For a complete list of the TCREncryptor class members, see the TCREncryptor Members
topic.

Public
Name
SetKey© 2019 Devart

Description
Sets a key, using which data

195

Oracle Data Access Components

is encrypted.

See Also
TCREncryptor ClassTCREncryptor Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.3.1.1.3.1 SetKey Method

Sets a key, using which data is encrypted.

Class
TCREncryptor

Syntax
procedure SetKey(const Key; Count: Integer); overload;procedure
SetKey(const Key: TBytes; Offset: Integer; Count: Integer);overload;
Parameters
Key
Holds bytes that represent a key.
OffsetOffset in bytes to the position, where the key begins.
Count
Number of bytes to use from Key.

Remarks
Use SetKey to set a key, using which data is encrypted.
Note: Calling of the SetKey method clears the Password property.

© 1997-2019
Devart. All Rights
Reserved.
5.3.2

Request Support

DAC Forum

Provide Feedback

Enumerations
Enumerations in the CREncryption unit.

Enumerations© 2019 DevartReference

Name

Description
Specifies whether the
additional information isstored with the encrypteddata.
Specifies the algorithm ofdata encryption.
Specifies the algorithm ofgenerating hash data.
Specifies the action to
perform on data fetchingwhen hash data is invalid.

TCREncDataHeader

TCREncryptionAlgorithm
TCRHashAlgorithm
TCRInvalidHashAction© 1997-2019
Devart. All Rights
Reserved.
5.3.2.1

Request Support

196

DAC Forum

Provide Feedback

TCREncDataHeader Enumeration

Specifies whether the additional information is stored with the encrypted data.

Unit
CREncryption

SyntaxTCREncDataHeader = (ehTagAndHash, ehTag, ehNone);

ValuesValue
ehNoneehTag
ehTagAndHash© 1997-2019
Devart. All Rights
Reserved.
5.3.2.2

Meaning
No additional information is stored.
GUID and the random initialization vector are stored with theencrypted data.
Hash, GUID, and the random initialization vector are stored withthe encrypted data.
Request Support

TCREncryptionAlgorithm Enumeration

Specifies the algorithm of data encryption.

Unit© 2019 Devart

DAC Forum

Provide Feedback

197

Oracle Data Access Components

CREncryption

SyntaxTCREncryptionAlgorithm = (eaTripleDES, eaBlowfish, eaAES128,
eaAES192, eaAES256, eaCast128, eaRC4);

ValuesValue
eaAES128
eaAES192
eaAES256
eaBlowfish
eaCast128
eaRC4
eaTripleDES© 1997-2019
Devart. All Rights
Reserved.
5.3.2.3

Meaning
The AES encryption algorithm with key size of 128 bits is used.
The AES encryption algorithm with key size of 192 bits is used.
The AES encryption algorithm with key size of 256 bits is used.
The Blowfish encryption algorithm is used.
The CAST-128 encryption algorithm with key size of 128 bits is
used.
The RC4 encryption algorithm is used.
The Triple DES encryption algorithm is used.
Request Support

DAC Forum

Provide Feedback

TCRHashAlgorithm Enumeration

Specifies the algorithm of generating hash data.

Unit
CREncryption

SyntaxTCRHashAlgorithm = (haSHA1, haMD5);

ValuesValue
haMD5
haSHA1© 1997-2019
Devart. All Rights
Reserved.

Meaning
The MD5 hash algorithm is used.
The SHA-1 hash algorithm is used.
Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

5.3.2.4

198

TCRInvalidHashAction Enumeration

Specifies the action to perform on data fetching when hash data is invalid.

Unit
CREncryption

SyntaxTCRInvalidHashAction = (ihFail, ihSkipData, ihIgnoreError);

ValuesValue
ihFailihIgnoreError
ihSkipData© 1997-2019
Devart. All Rights
Reserved.

5.4

CRVio

5.4.1

Enumerations

Meaning
The EInvalidHash exception is raised and further data readingfrom the server is interrupted.
In spite of the fact that the data is not valid, the value is set in thefield. No exception is raised.
The value of the field for this record is set to Null. No exception israised.
Request Support

DAC Forum

Provide Feedback

Enumerations in the CRVio unit.

Enumerations
Name

Description
Specifies the version of theInternet Protocol

TIPVersion© 1997-2019
Devart. All Rights
Reserved.
5.4.1.1

Request Support

TIPVersion Enumeration

Specifies the version of the Internet Protocol

Unit© 2019 Devart

DAC Forum

Provide Feedback

199

Oracle Data Access Components

CRVio

SyntaxTIPVersion = (ivIPv4, ivIPv6, ivIPBoth);

ValuesValue
ivIPBothivIPv4ivIPv6

MeaningSpecifies that either IPv6 or IPv4 Internet Protocol version is used
Specifies that the IPv4 Internet Protocol version is used
Specifies that the IPv6 Internet Protocol version is used

Remarks
Note: when the TIPVersion property is set to ivIPBoth , there occurs an attempt to connect
via IPv6 (if it is enabled in the OS); if the attempt fails - there occurs an attempt to connect via
IPv4.

See Also
TOraSessionOptions.IPVersion© 1997-2019
Devart. All Rights
Reserved.

5.5

Request Support

DAC Forum

Provide Feedback

DAAlerter
This unit contains the base class for the TOraAlerter component.

ClassesName

Description
A base class that defines
functionality for database
event notification.

TDAAlerter

Types
Name

Description
This type is used for the
TDAAlerter.OnError event.

TAlerterErrorEvent© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

200

Reserved.
5.5.1

ClassesClasses in the DAAlerter unit.

ClassesName

Description
A base class that defines
functionality for database
event notification.

TDAAlerter© 1997-2019
Devart. All Rights
Reserved.
5.5.1.1

Request Support

DAC Forum

Provide Feedback

TDAAlerter ClassA base class that defines functionality for database event notification.
For a list of all members of this type, see TDAAlerter members.

Unit
DAAlerter

SyntaxTDAAlerter = class(TComponent);

Remarks
TDAAlerter is a base class that defines functionality for descendant classes support database
event notification. Applications never use TDAAlerter objects directly. Instead they use
descendants of TDAAlerter.
The TDAAlerter component allows you to register interest in and handle events posted by adatabase server. Use TDAAlerter to handle events for responding to actions and databasechanges made by other applications. To get events, an application must register required
events. To do this, set the Events property to the required events and call the Start method.
When one of the registered events occurs OnEvent handler is called.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

201

Oracle Data Access Components

5.5.1.1.1 Members

TDAAlerter class overview.

Properties
Name

Description
Used to determine if
TDAAlerter waits formessages.
Used to automaticallyregister events wheneverconnection opens.
Used to specify theconnection for TDAAlerter.

ActiveAutoRegister
Connection

Methods
Name

Start

Description
Sends an event with Nameand content Message.
Starts waiting process.

Stop

Stops waiting process.

SendEvent

EventsName

Description
Occurs if an exception
occurs in waiting process

OnError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.5.1.1.2 Properties

Properties of the TDAAlerter class.
For a complete list of the TDAAlerter class members, see the TDAAlerter Members topic.

PublicName
ActiveDescription
Used to determine if
TDAAlerter waits for© 2019 DevartReference

202

messages.
Used to automaticallyregister events wheneverconnection opens.
Used to specify theconnection for TDAAlerter.

AutoRegister
Connection

See Also
TDAAlerter Class
TDAAlerter Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.5.1.1.2.1 Active Property

Used to determine if TDAAlerter waits for messages.

Class
TDAAlerter

Syntaxproperty Active: boolean default False;

Remarks
Check the Active property to know whether TDAlerter waits for messages or not. Set it toTrue to register events.

See Also
Start
Stop

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.5.1.1.2.2 AutoRegister Property

Used to automatically register events whenever connection opens.

Class© 2019 Devart

Provide Feedback

203

Oracle Data Access Components

TDAAlerter

Syntaxproperty AutoRegister: boolean default False;

Remarks
Set the AutoRegister property to True to automatically register events whenever connection
opens.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.5.1.1.2.3 Connection Property

Used to specify the connection for TDAAlerter.

Class
TDAAlerter

Syntaxproperty Connection: TCustomDAConnection;

Remarks
Use the Connection property to specify the connection for TDAAlerter.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.5.1.1.3 Methods

Methods of the TDAAlerter class.
For a complete list of the TDAAlerter class members, see the TDAAlerter Members topic.

PublicName

Start

Description
Sends an event with Nameand content Message.
Starts waiting process.

Stop

Stops waiting process.

SendEvent© 2019 DevartReference204

See Also
TDAAlerter Class
TDAAlerter Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.5.1.1.3.1 SendEvent Method

Sends an event with Name and content Message.

Class
TDAAlerter

Syntax
procedure SendEvent(const EventName: string; const Message:string);Parameters
EventName
Holds the event name.
Message
Holds the content Message of the event.

Remarks
Use SendEvent procedure to send an event with Name and content Message.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.5.1.1.3.2 Start Method

Starts waiting process.

Class
TDAAlerter

Syntax
procedure Start;© 2019 Devart

DAC Forum

Provide Feedback

205

Oracle Data Access Components

Remarks
Call the Start method to run waiting process. After starting TDAAlerter waits for messages
with names defined by the Events property.

See Also
Stop
ActiveTOraAlerter.OnEvent
TOraAlerter.OnTimeOut© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.5.1.1.3.3 Stop Method

Stops waiting process.

Class
TDAAlerter

Syntax
procedure Stop;

Remarks
Call Stop method to end waiting process.

See Also
Start© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.5.1.1.4 Events

Events of the TDAAlerter class.
For a complete list of the TDAAlerter class members, see the TDAAlerter Members topic.

PublicName

Description© 2019 DevartReference206

Occurs if an exception
occurs in waiting process

OnErrorSee Also
TDAAlerter Class
TDAAlerter Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.5.1.1.4.1 OnError Event

Occurs if an exception occurs in waiting process

Class
TDAAlerter

Syntaxproperty OnError: TAlerterErrorEvent;Remarks
The OnError event occurs if an exception occurs in waiting process. Alerter stops in thiscase. The exception can be accessed using the E parameter.

© 1997-2019
Devart. All Rights
Reserved.
5.5.2

Request Support

DAC Forum

Provide Feedback

Types
Types in the DAAlerter unit.

Types
Name

Description
This type is used for the
TDAAlerter.OnError event.

TAlerterErrorEvent© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

207

5.5.2.1

Oracle Data Access Components

TAlerterErrorEvent Procedure ReferenceThis type is used for the TDAAlerter.OnError event.

Unit
DAAlerter

SyntaxTAlerterErrorEvent = procedure (Sender: TDAAlerter; E: Exception)of object;Parameters
SenderAn object that raised the event.
E
Exception object.

© 1997-2019
Devart. All Rights
Reserved.

5.6

Request Support

DAC Forum

Provide Feedback

DADumpThis unit contains the base class for the TOraDump component.

ClassesName
TDADump

TDADumpOptions

Description
A base class that defines
functionality for descendantclasses that dump databaseobjects to a script.
This class allows setting up
the behaviour of the
TDADump class.

Types
Name
TDABackupProgressEvent
TDARestoreProgressEvent

Description
This type is used for the
TDADump.OnBackupProgr
ess event.
This type is used for the
TDADump.OnRestoreProgr© 2019 DevartReference208

ess event.
© 1997-2019
Devart. All Rights
Reserved.
5.6.1

Request Support

DAC Forum

Provide Feedback

ClassesClasses in the DADump unit.

ClassesName

Description
A base class that defines
functionality for descendantclasses that dump databaseobjects to a script.
This class allows setting up
the behaviour of the
TDADump class.

TDADump

TDADumpOptions© 1997-2019
Devart. All Rights
Reserved.
5.6.1.1

Request Support

DAC Forum

Provide Feedback

TDADump ClassA base class that defines functionality for descendant classes that dump database objects toa script.
For a list of all members of this type, see TDADump members.

Unit
DADumpSyntaxTDADump = class(TComponent);

Remarks
TDADump is a base class that defines functionality for descendant classes that dump
database objects to a script. Applications never use TDADump objects directly. Instead theyuse descendants of TDADump.
Use TDADump descedants to dump database objects, such as tables, stored procedures,and functions for backup or for transferring the data to another SQL server. The dump

© 2019 Devart

209

Oracle Data Access Components

contains SQL statements to create the table or other database objects and/or populate thetable.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.1 Members

TDADump class overview.

Properties
Name
Connection

Debug
Options
SQL
TableNames

Description
Used to specify aconnection object that will be
used to connect to a datastore.
Description is not available
at the moment.
Used to specify the
behaviour of a TDADumpcomponent.
Used to set or get the dump
script.
Used to set the names of thetables to dump.

Methods
Name
BackupBackupQuery
BackupToFile
BackupToStream
RestoreRestoreFromFile
RestoreFromStream

Description
Dumps database objects to
the TDADump.SQL
property.
Dumps the results of aparticular query.
Dumps database objects tothe specified file.
Dumps database objects tothe stream.
Executes a script containedin the SQL property.
Executes a script from a file.
Executes a script received
from the stream.
© 2019 DevartReference

210

EventsName

Description
Occurs to indicate the
TDADump.Backup,
M:Devart.Dac.TDADump.Ba
ckupToFile(System.String)or
M:Devart.Dac.TDADump.Ba
ckupToStream(Borland.Vcl.
TStream) method execution
progress.
Occurs when Oracle raises
some error on
TDADump.Restore.
Occurs to indicate the
TDADump.Restore,
TDADump.RestoreFromFile, or
TDADump.RestoreFromStr
eam method execution
progress.

OnBackupProgress

OnError

OnRestoreProgress© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.2 Properties

Properties of the TDADump class.
For a complete list of the TDADump class members, see the TDADump Members topic.

PublicName
Connection

Options

Published© 2019 Devart

Description
Used to specify aconnection object that will be
used to connect to a datastore.
Used to specify the
behaviour of a TDADumpcomponent.

211

Oracle Data Access Components

Name

Description
Description is not available
at the moment.
Used to set or get the dump
script.
Used to set the names of thetables to dump.

Debug
SQL
TableNames

See Also
TDADump Class
TDADump Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.2.1 Connection Property

Used to specify a connection object that will be used to connect to a data store.

Class
TDADump

Syntaxproperty Connection: TCustomDAConnection;

Remarks
Use the Connection property to specify a connection object that will be used to connect to adata store.
Set at design-time by selecting from the list of provided TCustomDAConnection or its
descendant class objects.
At runtime, link an instance of a TCustomDAConnection descendant to the Connection
property.

See Also
TCustomDAConnection© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

212

5.6.1.1.2.2 Debug Property

Class
TDADump

Syntaxproperty Debug: boolean default False;

Remarks
Set the Debug property to True to display executing statement and all its parameters' values.
Also displays the type of parameters. Note: To enable debug window you should explicitly
include the OdacVcl unit to your project. If TOraSQLMonitor is used in the project and the
TOraSQLMonitor.Active property is set to False, the debug window is not displayed.

See Also
TCustomDADataSet.Debug
TCustomDASQL.Debug© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.2.3 Options Property

Used to specify the behaviour of a TDADump component.

Class
TDADump

Syntaxproperty Options: TDADumpOptions;Remarks
Use the Options property to specify the behaviour of a TDADump component.
Descriptions of all options are in the table below.

Option Name
AddDropCompleteInsert© 2019 Devart

Description
Used to add drop statements to a script
before creating statements.
Used to explicitly specify the table fields

213

Oracle Data Access Components

names when generating the INSERT SQL
query. The default value is False.
Used to add a comment header to a script.
Used for TDADump to quote all databaseobject names in generated SQL
statements.

GenerateHeader
QuoteNames© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.2.4 SQL Property

Used to set or get the dump script.

Class
TDADump

Syntaxproperty SQL: TStrings;

Remarks
Use the SQL property to get or set the dump script. The SQL property stores script that is
executed by the Restore method. This property will store the result of Backup and
BackupQuery. At design time the SQL property can be edited by invoking the String List editor
in Object Inspector.

See Also
RestoreBackupBackupQuery© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.2.5 TableNames Property

Used to set the names of the tables to dump.

Class
TDADump© 2019 DevartReference214

Syntaxproperty TableNames: string;

Remarks
Use the TableNames property to set the names of the tables to dump. Table names must be
separated with commas. If it is empty, the Backup method will dump all available tables.

See Also
Backup© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.3 Methods

Methods of the TDADump class.
For a complete list of the TDADump class members, see the TDADump Members topic.

PublicName

Description
Dumps database objects to
the TDADump.SQL
property.
Dumps the results of aparticular query.
Dumps database objects tothe specified file.
Dumps database objects tothe stream.
Executes a script containedin the SQL property.
Executes a script from a file.

BackupBackupQuery
BackupToFile
BackupToStream
RestoreRestoreFromFile

Executes a script received
from the stream.

RestoreFromStream

See Also
TDADump Class
TDADump Class Members© 1997-2019© 2019 Devart

Request Support

DAC Forum

Provide Feedback

215

Oracle Data Access Components

Devart. All Rights
Reserved.
5.6.1.1.3.1 Backup Method

Dumps database objects to the SQL property.

Class
TDADump

Syntax
procedure Backup;

Remarks
Call the Backup method to dump database objects. The result script will be stored in the SQL
property.

See Also
SQL
RestoreBackupToFile
BackupToStream
BackupQuery© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.3.2 BackupQuery Method

Dumps the results of a particular query.

Class
TDADump

Syntax
procedure BackupQuery(const Query: string);
Parameters
Query
Holds a query used for data selection.

© 2019 DevartReference

216

Remarks
Call the BackupQuery method to dump the results of a particular query. Query must be avalid select statement. If this query selects data from several tables, only data of the first tablein the from list will be dumped.

See Also
RestoreBackupBackupToFile
BackupToStream© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.3.3 BackupToFile Method

Dumps database objects to the specified file.

Class
TDADump

Syntax
procedure BackupToFile(const FileName: string; const Query:
string = '');
Parameters
FileName
Holds the file name to dump database objects to.
QueryYour query to receive the data for dumping.

Remarks
Call the BackupToFile method to dump database objects to the specified file.

See Also
RestoreFromStream
BackupBackupToStream© 1997-2019© 2019 Devart

Request Support

DAC Forum

Provide Feedback

217

Oracle Data Access Components

Devart. All Rights
Reserved.
5.6.1.1.3.4 BackupToStream Method

Dumps database objects to the stream.

Class
TDADump

Syntax
procedure BackupToStream(Stream: TStream; const Query: string ='');Parameters
StreamHolds the stream to dump database objects to.
QueryYour query to receive the data for dumping.

Remarks
Call the BackupToStream method to dump database objects to the stream.

See Also
RestoreFromStream
BackupBackupToFile© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.3.5 Restore Method

Executes a script contained in the SQL property.

Class
TDADump

Syntax
procedure Restore;© 2019 DevartReference

218

Remarks
Call the Restore method to execute a script contained in the SQL property.

See Also
RestoreFromFile
RestoreFromStream
Backup
SQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.3.6 RestoreFromFile Method

Executes a script from a file.

Class
TDADump

Syntax
procedure RestoreFromFile(const FileName: string);
Parameters
FileName
Holds the file name to execute a script from.

Remarks
Call the RestoreFromFile method to execute a script from the specified file.

See Also
RestoreRestoreFromStream
BackupToFile© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

219

Oracle Data Access Components

5.6.1.1.3.7 RestoreFromStream Method

Executes a script received from the stream.

Class
TDADump

Syntax
procedure RestoreFromStream(Stream: TStream);
Parameters
StreamHolds a stream to receive a script to be executed.

Remarks
Call the RestoreFromStream method to execute a script received from the stream.

See Also
RestoreRestoreFromFile
BackupToStream© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.4 Events

Events of the TDADump class.
For a complete list of the TDADump class members, see the TDADump Members topic.

Published
Name

OnBackupProgress

Description
Occurs to indicate the
TDADump.Backup,
M:Devart.Dac.TDADump.Ba
ckupToFile(System.String)or
M:Devart.Dac.TDADump.Ba
ckupToStream(Borland.Vcl.
TStream) method execution
progress.

© 2019 DevartReference220

Occurs when Oracle raises
some error on
TDADump.Restore.
Occurs to indicate the
TDADump.Restore,
TDADump.RestoreFromFile, or
TDADump.RestoreFromStr
eam method execution
progress.

OnError

OnRestoreProgress

See Also
TDADump Class
TDADump Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.4.1 OnBackupProgress Event

Occurs to indicate the Backup, M:Devart.Dac.TDADump.BackupToFile(System.String) or
M:Devart.Dac.TDADump.BackupToStream(Borland.Vcl.TStream) method execution
progress.

Class
TDADump

Syntaxproperty OnBackupProgress: TDABackupProgressEvent;Remarks
The OnBackupProgress event occurs several times during the dumping process of the
Backup, M:Devart.Dac.TDADump.BackupToFile(System.String), or
M:Devart.Dac.TDADump.BackupToStream(Borland.Vcl.TStream) method execution andindicates its progress. ObjectName parameter indicates the name of the currently dumping
database object. ObjectNum shows the number of the current database object in the backup
queue starting from zero. ObjectCount shows the quantity of database objects to dump.
Percent parameter shows the current percentage of the current table data dumped, not thecurrent percentage of the entire dump process.

© 2019 Devart

221

Oracle Data Access Components

See Also
BackupBackupToFile
BackupToStream© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.4.2 OnError Event

Occurs when Oracle raises some error on Restore.

Class
TDADump

Syntaxproperty OnError: TOnErrorEvent;Remarks
The OnError event occurs when Oracle raises some error on Restore.
Action indicates the action to take when the OnError handler exits. On entry into the handler,
Action is always set to eaException.
Note: You should add the DAScript module to the 'uses' list to use the OnError event handler.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.1.4.3 OnRestoreProgress Event

Occurs to indicate the Restore, RestoreFromFile, or RestoreFromStream method execution
progress.

Class
TDADump

Syntaxproperty OnRestoreProgress: TDARestoreProgressEvent;Remarks© 2019 DevartReference222

The OnRestoreProgress event occurs several times during the dumping process of the
Restore, RestoreFromFile, or RestoreFromStream method execution and indicates its
progress. The Percent parameter of the OnRestoreProgress event handler indicates thepercentage of the whole restore script execution.

See Also
RestoreRestoreFromFile
RestoreFromStream© 1997-2019
Devart. All Rights
Reserved.
5.6.1.2

Request Support

DAC Forum

Provide Feedback

TDADumpOptions ClassThis class allows setting up the behaviour of the TDADump class.
For a list of all members of this type, see TDADumpOptions members.

Unit
DADumpSyntaxTDADumpOptions = class(TPersistent);© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.2.1 Members

TDADumpOptions class overview.

Properties
Name
AddDropCompleteInsert© 2019 Devart

Description
Used to add drop
statements to a script before
creating statements.
Used to explicitly specify thetable fields names whengenerating the INSERT SQL
query. The default value isFalse.

223

Oracle Data Access Components

Used to add a comment
header to a script.
Used for TDADump to quote
all database object names ingenerated SQL statements.

GenerateHeader
QuoteNames© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.2.2 Properties

Properties of the TDADumpOptions class.
For a complete list of the TDADumpOptions class members, see the TDADumpOptions
Members topic.

Published
Name

Description
Used to add drop
statements to a script before
creating statements.
Used to explicitly specify thetable fields names whengenerating the INSERT SQL
query. The default value isFalse.
Used to add a comment
header to a script.
Used for TDADump to quote
all database object names ingenerated SQL statements.

AddDropCompleteInsert

GenerateHeader
QuoteNames

See Also
TDADumpOptions Class
TDADumpOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

224

5.6.1.2.2.1 AddDrop Property

Used to add drop statements to a script before creating statements.

Class
TDADumpOptions

Syntaxproperty AddDrop: boolean default True;

Remarks
Use the AddDrop property to add drop statements to a script before creating statements.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.2.2.2 CompleteInsert Property

Used to explicitly specify the table fields names when generating the INSERT SQL query. The
default value is False.

Class
TDADumpOptions

Syntaxproperty CompleteInsert: boolean default False;

Remarks
If the CompleteInsert property is set to True, SQL query will include the field names, forexample:INSERT INTO dept(deptno, dname, loc) VALUES ('10', 'ACCOUNTING', 'NEW YORK')
If False, it won't include the field names, for example:
INSERT INTO dept VALUES ('10', 'ACCOUNTING', 'NEW YORK');© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

225

Oracle Data Access Components

5.6.1.2.2.3 GenerateHeader Property

Used to add a comment header to a script.

Class
TDADumpOptions

Syntaxproperty GenerateHeader: boolean default True;

Remarks
Use the GenerateHeader property to add a comment header to a script. It contains script
generation date, DAC version, and some other information.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.6.1.2.2.4 QuoteNames Property

Used for TDADump to quote all database object names in generated SQL statements.

Class
TDADumpOptions

Syntaxproperty QuoteNames: boolean default False;

Remarks
If the QuoteNames property is True, TDADump quotes all database object names ingenerated SQL statements.

© 1997-2019
Devart. All Rights
Reserved.
5.6.2

Request Support

DAC Forum

Provide Feedback

Types
Types in the DADump unit.

Types
Name

Description© 2019 DevartReferenceThis type is used for the
TDADump.OnBackupProgr
ess event.
This type is used for the
TDADump.OnRestoreProgr
ess event.

TDABackupProgressEvent

TDARestoreProgressEvent© 1997-2019
Devart. All Rights
Reserved.
5.6.2.1

Request Support

226

DAC Forum

Provide Feedback

TDABackupProgressEvent Procedure ReferenceThis type is used for the TDADump.OnBackupProgress event.

Unit
DADumpSyntaxTDABackupProgressEvent = procedure (Sender: TObject; ObjectName:string; ObjectNum: integer; ObjectCount: integer; Percent:integer) of object;Parameters
SenderAn object that raised the event.
ObjectName
The name of the currently dumping database object.
ObjectNum
The number of the current database object in the backup queue starting from zero.
ObjectCountThe quantity of database objects to dump.
Percent
The current percentage of the current table data dumped.

© 1997-2019
Devart. All Rights
Reserved.
5.6.2.2

Request Support

DAC Forum

TDARestoreProgressEvent Procedure ReferenceThis type is used for the TDADump.OnRestoreProgress event.

Unit© 2019 Devart

Provide Feedback

227

Oracle Data Access Components

DADumpSyntaxTDARestoreProgressEvent = procedure (Sender: TObject; Percent:integer) of object;Parameters
SenderAn object that raised the event.
Percent
The percentage of the whole restore script execution.

© 1997-2019
Devart. All Rights
Reserved.

5.7

Request Support

DAC Forum

Provide Feedback

DALoaderThis unit contains the base class for the TOraLoader component.

ClassesName
TDAColumn
TDAColumns
TDALoader
TDALoaderOptions

Description
Represents the attributes forcolumn loading.
Holds a collection of
TDAColumn objects.
This class allows loading
external data into database.
Allows loading external data
into database.

Types
Name
TDAPutDataEvent

TGetColumnDataEvent

TLoaderProgressEvent

Description
This type is used for the
TDALoader.OnPutData
event.
This type is used for the
TDALoader.OnGetColumnD
ata event.
This type is used for the
TDALoader.OnProgress© 2019 DevartReference

228

event.
© 1997-2019
Devart. All Rights
Reserved.
5.7.1

Request Support

DAC Forum

Provide Feedback

ClassesClasses in the DALoader unit.

ClassesName

Description
Represents the attributes forcolumn loading.
Holds a collection of
TDAColumn objects.
This class allows loading
external data into database.
Allows loading external data
into database.

TDAColumn
TDAColumns
TDALoader
TDALoaderOptions© 1997-2019
Devart. All Rights
Reserved.
5.7.1.1

Request Support

DAC Forum

Provide Feedback

TDAColumn Class

Represents the attributes for column loading.
For a list of all members of this type, see TDAColumn members.

Unit
DALoaderSyntaxTDAColumn = class(TCollectionItem);Remarks
Each TDALoader uses TDAColumns to maintain a collection of TDAColumn objects.
TDAColumn object represents the attributes for column loading. Every TDAColumn object
corresponds to one of the table fields with the same name as its TDAColumn.Name property.
To create columns at design-time use the column editor of the TDALoader component.

© 2019 Devart229

Oracle Data Access Components

See Also
TDALoader
TDAColumns© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.1.1 Members

TDAColumn class overview.

Properties
Name

Description
Used to specify the types ofvalues that will be loaded.
Used to specify the fieldname of loading table.

FieldTypeName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.1.2 Properties

Properties of the TDAColumn class.
For a complete list of the TDAColumn class members, see the TDAColumn Members topic.

Published
Name

Description
Used to specify the types ofvalues that will be loaded.
Used to specify the fieldname of loading table.

FieldType
Name

See Also
TDAColumn Class
TDAColumn Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

230

5.7.1.1.2.1 FieldType Property

Used to specify the types of values that will be loaded.

Class
TDAColumn

Syntaxproperty FieldType: TFieldType default ftString;

Remarks
Use the FieldType property to specify the types of values that will be loaded. Field types forcolumns may not match data types for the corresponding fields in the database table.
TDALoader will cast data values to the types of their fields.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.1.2.2 Name Property

Used to specify the field name of loading table.

Class
TDAColumn

Syntaxproperty Name: string;

Remarks
Each TDAColumn corresponds to one field of the loading table. Use the Name property to
specify the name of this field.

See Also
FieldType© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

231

5.7.1.2

Oracle Data Access Components

TDAColumns Class

Holds a collection of TDAColumn objects.
For a list of all members of this type, see TDAColumns members.

Unit
DALoaderSyntaxTDAColumns = class(TOwnedCollection);

Remarks
Each TDAColumns holds a collection of TDAColumn objects. TDAColumns maintains an
index of the columns in its Items array. The Count property contains the number of columns
in the collection. At design-time, use the Columns editor to add, remove, or modify columns.

See Also
TDALoader
TDAColumn© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.2.1 Members

TDAColumns class overview.

Properties
Name

Description
Used to access individualcolumns.

Items© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.2.2 Properties

Properties of the TDAColumns class.
For a complete list of the TDAColumns class members, see the TDAColumns Members
topic.

© 2019 DevartReference

232

PublicName

Description
Used to access individualcolumns.

Items

See Also
TDAColumns Class
TDAColumns Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.2.2.1 Items Property(Indexer)

Used to access individual columns.

Class
TDAColumns

Syntaxproperty Items[Index: integer]: TDAColumn; default;
Parameters
Index
Holds the Index of TDAColumn to refer to.

Remarks
Use the Items property to access individual columns. The value of the Index parametercorresponds to the Index property of TDAColumn.

See Also
TDAColumn© 1997-2019
Devart. All Rights
Reserved.
5.7.1.3

Request Support

DAC Forum

TDALoader ClassThis class allows loading external data into database.
For a list of all members of this type, see TDALoader members.

© 2019 Devart

Provide Feedback

233

Oracle Data Access Components

Unit
DALoaderSyntax
TDALoader = class(TComponent);

Remarks
TDALoader allows loading external data into database. To specify the name of loading table
set the TDALoader.TableName property. Use the TDALoader.Columns property to accessindividual columns. Write the TDALoader.OnGetColumnData or TDALoader.OnPutData event
handlers to read external data and pass it to the database. Call the TDALoader.Load method
to start loading data.

See Also
TOraLoader Component
TOraLoader© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.1 Members

TDALoader class overview.

Properties
Name
Columns
Connection
TableName

Description
Used to add a TDAColumn
object for each field that will
be loaded.
See TOraLoader.Session
Used to specify the name of
the table to which data will
be loaded.

Methods
Name
CreateColumns

Description
Creates TDAColumn
objects for all fields of the© 2019 DevartReference234

table with the same nameas TDALoader.TableName.
Starts loading data.
Loads data from thespecified dataset.
Overloaded. Puts the valueof individual columns.

Load
LoadFromDataSet
PutColumnData

EventsName

Description
Occurs when it is needed toput column values.
Occurs if handling dataloading progress of the
TDALoader.LoadFromData
Set method is needed.
Occurs when putting loading
data by rows is needed.

OnGetColumnData

OnProgress

OnPutData© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.2 Properties

Properties of the TDALoader class.
For a complete list of the TDALoader class members, see the TDALoader Members topic.

PublicName
Columns
Connection
TableName

See Also
TDALoader Class© 2019 Devart

Description
Used to add a TDAColumn
object for each field that will
be loaded.
See TOraLoader.Session
Used to specify the name of
the table to which data will
be loaded.

235

Oracle Data Access Components

TDALoader Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.2.1 Columns Property

Used to add a TDAColumn object for each field that will be loaded.

Class
TDALoader

Syntaxproperty Columns: TDAColumns stored IsColumnsStored;

Remarks
Use the Columns property to add a TDAColumn object for each field that will be loaded.

See Also
TDAColumns© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.2.2 Connection Property

See TOraLoader.Session

Class
TDALoader

Syntaxproperty Connection: TCustomDAConnection;

Remarks
Use the Connection property to specify TCustomDAConnection in which TDALoader will be
executed. If Connection is not connected, the Load method calls
TCustomDAConnection.Connect.

See Also© 2019 DevartReference

236

TCustomDAConnection© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.2.3 TableName Property

Used to specify the name of the table to which data will be loaded.

Class
TDALoader

Syntaxproperty TableName: string;

Remarks
Set the TableName property to specify the name of the table to which data will be loaded. Add
TDAColumn objects to Columns for the fields that are needed to be loaded.

See Also
TDAColumn
TCustomDAConnection.GetTableNames© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.3 Methods

Methods of the TDALoader class.
For a complete list of the TDALoader class members, see the TDALoader Members topic.

PublicNameCreateColumns
Load
LoadFromDataSet© 2019 Devart

Description
Creates TDAColumn
objects for all fields of thetable with the same nameas TDALoader.TableName.
Starts loading data.
Loads data from thespecified dataset.

237

Oracle Data Access Components

Overloaded. Puts the valueof individual columns.

PutColumnData

See Also
TDALoader Class
TDALoader Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.3.1 CreateColumns Method

Creates TDAColumn objects for all fields of the table with the same name as TableName.

Class
TDALoader

Syntax
procedure CreateColumns;

Remarks
Call the CreateColumns method to create TDAColumn objects for all fields of the table withthe same name as TableName. If columns were created before, they will be recreated. You
can call CreateColumns from the component popup menu at design-time. After you cancustomize column loading by setting properties of TDAColumn objects.

See Also
TDAColumn
TableName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.3.2 Load Method

Starts loading data.

Class
TDALoader© 2019 DevartReference

238

Syntax
procedure Load; virtual;

Remarks
Call the Load method to start loading data. At first it is necessary to create columns and write
one of the OnPutData or OnGetColumnData event handlers.

See Also
OnGetColumnData
OnPutData© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.3.3 LoadFromDataSet Method

Loads data from the specified dataset.

Class
TDALoader

Syntax
procedure LoadFromDataSet(DataSet: TDataSet);
Parameters
DataSetHolds the dataset to load data from.

Remarks
Call the LoadFromDataSet method to load data from the specified dataset. There is no needto create columns and write event handlers for OnPutData and OnGetColumnData before
calling this method.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

239

Oracle Data Access Components

5.7.1.3.3.4 PutColumnData Method

Puts the value of individual columns.

Class
TDALoaderOverload List
Name
Description
PutColumnData(Col: integer; Row: integer; Puts the value of individual columns by theconst Value: variant)column index.
PutColumnData(const ColName: string; Puts the value of individual columns by the
Row: integer; const Value: variant)column name.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
Puts the value of individual columns by the column index.

Class
TDALoader

Syntax
procedure PutColumnData(Col: integer; Row: integer; const Value:
variant); overload; virtual;Parameters
Col
Holds the index of a loading column. The first column has index 0.
Row
Holds the number of loading row. Row starts from 1.
Value
Holds the column value.

Remarks
Call the PutColumnData method to put the value of individual columns. PutColumnData canbe only called from the OnPutData event handler. The Col parameter indicates the index ofloading column. The first column has index 0. The Row parameter indicates the number ofthe loading row. Row starts from 1.
This overloaded method works faster because it searches the right index by its index, not by© 2019 DevartReference

240

the index name.
The value of a column should be assigned to the Value parameter.

See Also
TDALoader.OnPutData© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Puts the value of individual columns by the column name.

Class
TDALoader

Syntax
procedure PutColumnData(const ColName: string; Row: integer;
const Value: variant); overload;
Parameters
ColNameHods the name of a loading column.
Row
Holds the number of loading row. Row starts from 1.
Value
Holds the column value.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.4 Events

Events of the TDALoader class.
For a complete list of the TDALoader class members, see the TDALoader Members topic.

PublicName
OnGetColumnData

Description
Occurs when it is needed toput column values.

OnProgress

Occurs if handling dataloading progress of the
TDALoader.LoadFromData© 2019 Devart

241

Oracle Data Access Components

Set method is needed.
Occurs when putting loading
data by rows is needed.

OnPutData

See Also
TDALoader Class
TDALoader Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.4.1 OnGetColumnData Event

Occurs when it is needed to put column values.

Class
TDALoader

Syntaxproperty OnGetColumnData: TGetColumnDataEvent;Remarks
Write the OnGetColumnData event handler to put column values. TDALoader calls the
OnGetColumnData event handler for each column in the loop. Column points to a
TDAColumn object that corresponds to the current loading column. Use its Name or Index
property to identify what column is loading. The Row parameter indicates the current loading
record. TDALoader increments the Row parameter when all the columns of the current
record are loaded. The first row is 1. Set EOF to True to stop data loading. Fill the Valueparameter by column values. To start loading call the Load method.
Another way to load data is using the OnPutData event.

ExampleThis handler loads 1000 rows.
procedure TfmMain.GetColumnData(Sender: TObject;
Column: TDAColumn; Row: Integer; var Value: Variant;var EOF: Boolean);begin
if Row <= 1000 then begin
case Column.Index of
0: Value := Row;
1: Value := Random(100);© 2019 DevartReference242

2: Value := Random*100;
3: Value := 'abc01234567890123456789';
4: Value := Date;
else
Value := Null;
end;
end
else
EOF := True;
end;

See Also
OnPutData
Load© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.3.4.2 OnProgress Event

Occurs if handling data loading progress of the LoadFromDataSet method is needed.

Class
TDALoader

Syntaxproperty OnProgress: TLoaderProgressEvent;Remarks
Add a handler to this event if you want to handle data loading progress of the
LoadFromDataSet method.

See Also
LoadFromDataSet© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.7.1.3.4.3 OnPutData Event

Occurs when putting loading data by rows is needed.

Class
TDALoader© 2019 Devart

Provide Feedback243

Oracle Data Access Components

Syntaxproperty OnPutData: TDAPutDataEvent;Remarks
Write the OnPutData event handler to put loading data by rows.
Note that rows should be loaded from the first in the ascending order.
To start loading, call the Load method. It is more effective way to load data in comparison withusing OnGetColumnData. The OnPutData event handler must send column data by the
TDALoader.PutColumnData method. TDALoader will flush data to Oracle when it is needed.

© 1997-2019
Devart. All Rights
Reserved.
5.7.1.4

Request Support

DAC Forum

Provide Feedback

TDALoaderOptions Class

Allows loading external data into database.
For a list of all members of this type, see TDALoaderOptions members.

Unit
DALoaderSyntax
TDALoaderOptions = class(TPersistent);© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.4.1 Members

TDALoaderOptions class overview.

Properties
Name

Description
Forces ODAC to fill thebuffer with null values after
loading a row to the
database.

UseBlankValues© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference244

5.7.1.4.2 Properties

Properties of the TDALoaderOptions class.
For a complete list of the TDALoaderOptions class members, see the TDALoaderOptions
Members topic.

PublicName

Description
Forces ODAC to fill thebuffer with null values after
loading a row to the
database.

UseBlankValues

See Also
TDALoaderOptions Class
TDALoaderOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.7.1.4.2.1 UseBlankValues Property

Forces ODAC to fill the buffer with null values after loading a row to the database.

Class
TDALoaderOptions

Syntaxproperty UseBlankValues: boolean default True;

Remarks
Used to force ODAC to fill the buffer with null values after loading a row to the database.

© 1997-2019
Devart. All Rights
Reserved.
5.7.2

Request Support

Types
Types in the DALoader unit.

Types© 2019 Devart

DAC Forum

Provide Feedback

245

Oracle Data Access Components

Name

Description
This type is used for the
TDALoader.OnPutData
event.
This type is used for the
TDALoader.OnGetColumnD
ata event.
This type is used for the
TDALoader.OnProgress
event.

TDAPutDataEvent

TGetColumnDataEvent

TLoaderProgressEvent© 1997-2019
Devart. All Rights
Reserved.
5.7.2.1

Request Support

DAC Forum

Provide Feedback

TDAPutDataEvent Procedure ReferenceThis type is used for the TDALoader.OnPutData event.

Unit
DALoaderSyntaxTDAPutDataEvent = procedure (Sender: TDALoader) of object;Parameters
SenderAn object that raised the event.

© 1997-2019
Devart. All Rights
Reserved.
5.7.2.2

Request Support

DAC Forum

Provide Feedback

TGetColumnDataEvent Procedure ReferenceThis type is used for the TDALoader.OnGetColumnData event.

Unit
DALoaderSyntaxTGetColumnDataEvent = procedure (Sender: TObject; Column:
TDAColumn; Row: integer; var Value: variant; var IsEOF: boolean)of object;© 2019 DevartReference

246

Parameters
SenderAn object that raised the event.
ColumnPoints to TDAColumn object that corresponds to the current loading column.
Row
Indicates the current loading record.
Value
Holds column values.
IsEOF
True, if data loading needs to be stopped.

© 1997-2019
Devart. All Rights
Reserved.
5.7.2.3

Request Support

DAC Forum

Provide Feedback

TLoaderProgressEvent Procedure ReferenceThis type is used for the TDALoader.OnProgress event.

Unit
DALoaderSyntaxTLoaderProgressEvent = procedure (Sender: TObject; Percent:integer) of object;Parameters
SenderAn object that raised the event.
Percent
Percentage of the load operation progress.

© 1997-2019
Devart. All Rights
Reserved.

5.8

Request Support

DAC Forum

Provide Feedback

DAScript
This unit contains the base class for the TOraScript component.

ClassesName© 2019 Devart

Description

247

Oracle Data Access Components

Makes it possible to execute
several SQL statements one
by one.
This class has attributes andmethods for controlling
single SQL statement of ascript.
Holds a collection of
TDAStatement objects.

TDAScript

TDAStatement

TDAStatements

Types
Name

Description
This type is used for the
TDAScript.AfterExecute
event.
This type is used for the
TDAScript.BeforeExecute
event.
This type is used for the
TDAScript.OnError event.

TAfterStatementExecuteEvent

TBeforeStatementExecuteEvent
TOnErrorEvent

Enumerations
Name

Description
Indicates the action to takewhen the OnError handler
exits.

TErrorAction© 1997-2019
Devart. All Rights
Reserved.
5.8.1

Request Support

DAC Forum

Provide Feedback

ClassesClasses in the DAScript unit.

ClassesName
TDAScript

Description
Makes it possible to execute
several SQL statements one
by one.

© 2019 DevartReferenceThis class has attributes andmethods for controlling
single SQL statement of ascript.
Holds a collection of
TDAStatement objects.

TDAStatement

TDAStatements© 1997-2019
Devart. All Rights
Reserved.
5.8.1.1

248

Request Support

DAC Forum

Provide Feedback

TDAScript Class

Makes it possible to execute several SQL statements one by one.
For a list of all members of this type, see TDAScript members.

Unit
DAScript

Syntax
TDAScript = class(TComponent);

Remarks
Often it is necessary to execute several SQL statements one by one. This can be performed
using a lot of components such as TCustomDASQL descendants. Usually it isn't the bestsolution. With only one TDAScript descedant component you can execute several SQL
statements as one. This sequence of statements is called script. To separate single
statements use semicolon (;) or slash (/) and for statements that can contain semicolon, only
slash. Note that slash must be the first character in line.
Errors that occur during execution can be processed in the TDAScript.OnError event handler.
By default, on error TDAScript shows exception and continues execution.

See Also
TCustomDASQL© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

249

Oracle Data Access Components

5.8.1.1.1 Members

TDAScript class overview.

Properties
Name
Connection

DataSetDebug

Delimiter

EndLineEndOffset
EndPosMacrosSQL
StartLineStartOffset

StartPos

Statements

Description
Used to specify theconnection in which thescript will be executed.
Refers to a dataset that
holds the result set of query
execution.
Used to display the script
execution and all its
parameter values.
Used to set the delimiter
string that separates script
statements.
Used to get the current
statement last line number ina script.
Used to get the offset in thelast line of the current
statement.
Used to get the end positionof the current statement.
Used to change SQL script
text in design- or run-timeeasily.
Used to get or set script text.
Used to get the current
statement start line number
in a script.
Used to get the offset in thefirst line of the current
statement.
Used to get the start positionof the current statement in ascript.
Contains a list of statements
obtained from the SQL
property.

© 2019 DevartReference

250

Methods
Name
BreakExec

Description
Stops script execution.

ErrorOffset

Used to get the offset of thestatement if the Execute
method raised an exception.

ExecuteExecutes a script.

ExecuteFile

Executes SQL statements
contained in a file.
Executes the next statementin the script and then stops.
Executes SQL statements
contained in a stream
object.
Finds a Macro with thename passed in Name.

ExecuteNext
ExecuteStream
MacroByName

EventsName

Description
Occurs after a SQL script
execution.
Occurs when taking a
specific action before
executing the current SQL
statement is needed.
Occurs when Oracle raises
an error.

AfterExecute

BeforeExecute

OnError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.2 Properties

Properties of the TDAScript class.
For a complete list of the TDAScript class members, see the TDAScript Members topic.

PublicName© 2019 Devart

Description

251

Oracle Data Access Components

Connection

DataSetEndLineEndOffset
EndPosStartLineStartOffset

StartPos

Statements

Used to specify theconnection in which thescript will be executed.
Refers to a dataset that
holds the result set of query
execution.
Used to get the current
statement last line number ina script.
Used to get the offset in thelast line of the current
statement.
Used to get the end positionof the current statement.
Used to get the current
statement start line number
in a script.
Used to get the offset in thefirst line of the current
statement.
Used to get the start positionof the current statement in ascript.
Contains a list of statements
obtained from the SQL
property.

Published
Name
Debug

Delimiter

MacrosSQL

Description
Used to display the script
execution and all its
parameter values.
Used to set the delimiter
string that separates script
statements.
Used to change SQL script
text in design- or run-timeeasily.
Used to get or set script text.

See Also© 2019 DevartReference

252

TDAScript Class
TDAScript Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.2.1 Connection Property

Used to specify the connection in which the script will be executed.

Class
TDAScript

Syntaxproperty Connection: TCustomDAConnection;

Remarks
Use the Connection property to specify the connection in which the script will be executed. If
Connection is not connected, the Execute method calls the Connect method of Connection.
Set at design-time by selecting from the list of provided TCustomDAConnection objects.
At run-time, set the Connection property to reference an existing TCustomDAConnection
object.

See Also
TCustomDAConnection© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.8.1.1.2.2 DataSet Property

Refers to a dataset that holds the result set of query execution.

Class
TDAScript

Syntaxproperty DataSet: TCustomDADataSet;

Remarks© 2019 Devart

Provide Feedback

253

Oracle Data Access Components

Set the DataSet property to assign a component that will be used by TOraScript to executestatements and to retrieve the results of the SELECT statements execution inside a script.

See Also
ExecuteNext
Execute© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.2.3 Debug Property

Used to display the script execution and all its parameter values.

Class
TDAScript

Syntaxproperty Debug: boolean default False;

Remarks
Set the Debug property to True to display executing statement and all its parameters' values.
Also displays the type of parameters. Note: To enable debug window you should explicitly
include the OdacVcl unit to your project. If TOraSQLMonitor is used in the project and the
TOraSQLMonitor.Active property is set to False, the debug window is not displayed.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.2.4 Delimiter Property

Used to set the delimiter string that separates script statements.

Class
TDAScript

Syntaxproperty Delimiter: string stored IsDelimiterStored;

Remarks© 2019 DevartReference254

Use the Delimiter property to set the delimiter string that separates script statements. By
default it is semicolon (;). You can use slash (/) to separate statements that can containsemicolon if the Delimiter property's default value is semicolon. Note that slash must be thefirst character in line.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.2.5 EndLine Property

Used to get the current statement last line number in a script.

Class
TDAScript

Syntaxproperty EndLine: Int64;

Remarks
Use the EndLine property to get the current statement last line number in a script.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.2.6 EndOffset Property

Used to get the offset in the last line of the current statement.

Class
TDAScript

Syntaxproperty EndOffset: Int64;

Remarks
Use the EndOffset property to get the offset in the last line of the current statement.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

255

Oracle Data Access Components

5.8.1.1.2.7 EndPos Property

Used to get the end position of the current statement.

Class
TDAScript

Syntaxproperty EndPos: Int64;

Remarks
Use the EndPos property to get the end position of the current statement (the position of thelast character in the statement) in a script.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.2.8 Macros Property

Used to change SQL script text in design- or run-time easily.

Class
TDAScript

Syntaxproperty Macros: TMacros stored False;

Remarks
With the help of macros you can easily change SQL script text in design- or run-time. Macrosextend abilities of parameters and allow changing conditions in the WHERE clause or sortorder in the ORDER BY clause. You just insert &MacroName in a SQL query text and change
value of macro by the Macro property editor in design-time or the MacroByName function in
run-time. In time of opening query macro is replaced by its value.

See Also
TMacroMacroByName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

256

5.8.1.1.2.9 SQL Property

Used to get or set script text.

Class
TDAScript

Syntaxproperty SQL: TStrings;

Remarks
Use the SQL property to get or set script text.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.2.10 StartLine Property

Used to get the current statement start line number in a script.

Class
TDAScript

Syntaxproperty StartLine: Int64;

Remarks
Use the StartLine property to get the current statement start line number in a script.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.8.1.1.2.11 StartOffset Property

Used to get the offset in the first line of the current statement.

Class
TDAScript

Syntaxproperty StartOffset: Int64;© 2019 Devart

Provide Feedback

257

Oracle Data Access Components

Remarks
Use the StartOffset property to get the offset in the first line of the current statement.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.2.12 StartPos Property

Used to get the start position of the current statement in a script.

Class
TDAScript

Syntaxproperty StartPos: Int64;

Remarks
Use the StartPos property to get the start position of the current statement (the position of thefirst statement character) in a script.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.2.13 Statements Property

Contains a list of statements obtained from the SQL property.

Class
TDAScript

Syntaxproperty Statements: TDAStatements;

Remarks
Contains a list of statements that are obtained from the SQL property. Use the AccessStatements property to view SQL statement, set parameters or execute the specifiedstatement. Statements is a zero-based array of statement records. Index specifies the arrayelement to access.
For example, consider the following script:© 2019 DevartReference

258

CREATE TABLE A (FIELD1 INTEGER);INSERT INTO A VALUES(1);INSERT INTO A VALUES(2);INSERT INTO A VALUES(3);CREATE TABLE B (FIELD1 INTEGER);INSERT INTO B VALUES(1);INSERT INTO B VALUES(2);INSERT INTO B VALUES(3);Note: The list of statements is created and filled when the value of Statements property isrequested. That's why the first access to the Statements property can take a long time.

ExampleYou can use the Statements property in the following way:procedure TForm1.Button1Click(Sender: TObject);var
i: integer;
begin
with Script do
begin
for i := 0 to Statements.Count - 1 do
if Copy(Statements[i].SQL, 1, 6) <> 'CREATE' thenStatements[i].Execute;
end;
end;

See Also
TDAStatements© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.3 Methods

Methods of the TDAScript class.
For a complete list of the TDAScript class members, see the TDAScript Members topic.

PublicName
BreakExec
ErrorOffset
Execute© 2019 Devart

Description
Stops script execution.
Used to get the offset of thestatement if the Execute
method raised an exception.
Executes a script.

259

Oracle Data Access Components

Executes SQL statements
contained in a file.
Executes the next statementin the script and then stops.
Executes SQL statements
contained in a stream
object.
Finds a Macro with thename passed in Name.

ExecuteFile
ExecuteNext
ExecuteStream
MacroByName

See Also
TDAScript Class
TDAScript Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.3.1 BreakExec Method

Stops script execution.

Class
TDAScript

Syntax
procedure BreakExec; virtual;

Remarks
Call the BreakExec method to stop script execution.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.3.2 ErrorOffset Method

Used to get the offset of the statement if the Execute method raised an exception.

Class
TDAScript

Syntax© 2019 DevartReference260

function ErrorOffset: Int64;
Return Value
offset of an error.

Remarks
Call the ErrorOffset method to get the offset of the statement if the Execute method raised an
exception.

See Also
OnError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.3.3 Execute Method

Executes a script.

Class
TDAScript

Syntax
procedure Execute; virtual;

Remarks
Call the Execute method to execute a script. If Oracle raises an error, the OnError event
occurs.

See Also
ExecuteNext
OnErrorErrorOffset© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

261

Oracle Data Access Components

5.8.1.1.3.4 ExecuteFile Method

Executes SQL statements contained in a file.

Class
TDAScript

Syntax
procedure ExecuteFile(const FileName: string);
Parameters
FileName
Holds the file name.

Remarks
Call the ExecuteFile method to execute SQL statements contained in a file. Script doesn't
load full content into memory. Reading and execution is performed by blocks of 64k size.
Therefore, it is optimal to use it for big files.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.3.5 ExecuteNext Method

Executes the next statement in the script and then stops.

Class
TDAScript

Syntaxfunction ExecuteNext: boolean; virtual;
Return Value
True, if there are any statements left in the script, False otherwise.

Remarks
Use the ExecuteNext method to execute the next statement in the script statement and stop.
If Oracle raises an error, the OnError event occurs.

See Also
Execute© 2019 DevartReference262

OnErrorErrorOffset© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.3.6 ExecuteStream Method

Executes SQL statements contained in a stream object.

Class
TDAScript

Syntax
procedure ExecuteStream(Stream: TStream);
Parameters
StreamHolds the stream object from which the statements will be executed.

Remarks
Call the ExecuteStream method to execute SQL statements contained in a stream object.
Reading from the stream and execution is performed by blocks of 64k size.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.8.1.1.3.7 MacroByName Method

Finds a Macro with the name passed in Name.

Class
TDAScript

Syntaxfunction MacroByName(Name: string): TMacro;Parameters
Name
Holds the name of the Macro to search for.
Return Value
the Macro, if a match was found.
© 2019 Devart

Provide Feedback

263

Oracle Data Access Components

Remarks
Call the MacroByName method to find a Macro with the name passed in Name. If a match
was found, MacroByName returns the Macro. Otherwise, an exception is raised. Use thismethod rather than a direct reference to the Items property to avoid depending on the order ofthe entries.
To locate a parameter by name without raising an exception if the parameter is not found, use
the FindMacro method.
To assign the value of macro use the TMacro.Value property.

See Also
TMacroMacros
M:Devart.Dac.TDAScript.FindMacro(System.String)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.4 Events

Events of the TDAScript class.
For a complete list of the TDAScript class members, see the TDAScript Members topic.

Published
Name

Description
Occurs after a SQL script
execution.
Occurs when taking a
specific action before
executing the current SQL
statement is needed.
Occurs when Oracle raises
an error.

AfterExecute

BeforeExecute

OnErrorSee Also
TDAScript Class
TDAScript Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

264

5.8.1.1.4.1 AfterExecute Event

Occurs after a SQL script execution.

Class
TDAScript

Syntaxproperty AfterExecute: TAfterStatementExecuteEvent;Remarks
Occurs after a SQL script has been executed.

See Also
Execute© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.1.4.2 BeforeExecute Event

Occurs when taking a specific action before executing the current SQL statement is needed.

Class
TDAScript

Syntaxproperty BeforeExecute: TBeforeStatementExecuteEvent;Remarks
Write the BeforeExecute event handler to take specific action before executing the current
SQL statement. SQL holds text of the current SQL statement. Write SQL to change thestatement that will be executed. Set Omit to True to skip statement execution.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

265

Oracle Data Access Components

5.8.1.1.4.3 OnError Event

Occurs when Oracle raises an error.

Class
TDAScript

Syntaxproperty OnError: TOnErrorEvent;Remarks
Occurs when Oracle raises an error.
Action indicates the action to take when the OnError handler exits. On entry into the handler,
Action is always set to eaFail.

See Also
ErrorOffset© 1997-2019
Devart. All Rights
Reserved.
5.8.1.2

Request Support

DAC Forum

Provide Feedback

TDAStatement ClassThis class has attributes and methods for controlling single SQL statement of a script.
For a list of all members of this type, see TDAStatement members.

Unit
DAScript

Syntax
TDAStatement = class(TCollectionItem);Remarks
TDAScript contains SQL statements, represented as TDAStatement objects. The
TDAStatement class has attributes and methods for controlling single SQL statement of ascript.

See Also
TDAScript
TDAStatements© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

266

Provide Feedback

5.8.1.2.1 Members

TDAStatement class overview.

Properties
Name

Description
Used to determine thenumber of the last statement
line in a script.
Used to get the offset in thelast line of the statement.
Used to get the end positionof the statement in a script.
Used to avoid execution of astatement.
Contains parasmeters for an
SQL statement.
Used to determine the
TDAScript object the SQLStatement belongs to.
Used to get or set the text ofan SQL statement.
Used to determine thenumber of the first statement
line in a script.
Used to get the offset in thefirst line of a statement.
Used to get the start positionof the statement in a script.

EndLineEndOffset
EndPosOmit
ParamsScriptSQLStartLineStartOffset
StartPos

Methods
Name
Execute© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Description
Executes a statement.
Request Support

DAC Forum

Provide Feedback

267

Oracle Data Access Components

5.8.1.2.2 Properties

Properties of the TDAStatement class.
For a complete list of the TDAStatement class members, see the TDAStatement Members
topic.

PublicName

Description
Used to determine thenumber of the last statement
line in a script.
Used to get the offset in thelast line of the statement.
Used to get the end positionof the statement in a script.
Used to avoid execution of astatement.
Contains parasmeters for an
SQL statement.
Used to determine the
TDAScript object the SQLStatement belongs to.
Used to get or set the text ofan SQL statement.
Used to determine thenumber of the first statement
line in a script.
Used to get the offset in thefirst line of a statement.
Used to get the start positionof the statement in a script.

EndLineEndOffset
EndPosOmit
ParamsScriptSQLStartLineStartOffset
StartPos

See Also
TDAStatement Class
TDAStatement Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference268

5.8.1.2.2.1 EndLine Property

Used to determine the number of the last statement line in a script.

Class
TDAStatement

Syntaxproperty EndLine: integer;

Remarks
Use the EndLine property to determine the number of the last statement line in a script.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.2.2.2 EndOffset Property

Used to get the offset in the last line of the statement.

Class
TDAStatement

Syntaxproperty EndOffset: integer;

Remarks
Use the EndOffset property to get the offset in the last line of the statement.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.8.1.2.2.3 EndPos Property

Used to get the end position of the statement in a script.

Class
TDAStatement

Syntaxproperty EndPos: integer;© 2019 Devart

Provide Feedback

269

Oracle Data Access Components

Remarks
Use the EndPos property to get the end position of the statement (the position of the last
character in the statement) in a script.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.2.2.4 Omit Property

Used to avoid execution of a statement.

Class
TDAStatement

Syntaxproperty Omit: boolean;

Remarks
Set the Omit property to True to avoid execution of a statement.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.2.2.5 Params Property

Contains parasmeters for an SQL statement.

Class
TDAStatement

Syntaxproperty Params: TDAParams;

Remarks
Contains parameters for an SQL statement.
Access Params at runtime to view and set parameter names, values, and data types
dynamically. Params is a zero-based array of parameter records. Index specifies the arrayelement to access.

© 2019 DevartReference270

See Also
TDAParam© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.2.2.6 Script Property

Used to determine the TDAScript object the SQL Statement belongs to.

Class
TDAStatement

Syntaxproperty Script: TDAScript;

Remarks
Use the Script property to determine the TDAScript object the SQL Statement belongs to.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.2.2.7 SQL Property

Used to get or set the text of an SQL statement.

Class
TDAStatement

Syntaxproperty SQL: string;

Remarks
Use the SQL property to get or set the text of an SQL statement.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

271

Oracle Data Access Components

5.8.1.2.2.8 StartLine Property

Used to determine the number of the first statement line in a script.

Class
TDAStatement

Syntaxproperty StartLine: integer;

Remarks
Use the StartLine property to determine the number of the first statement line in a script.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.2.2.9 StartOffset Property

Used to get the offset in the first line of a statement.

Class
TDAStatement

Syntaxproperty StartOffset: integer;

Remarks
Use the StartOffset property to get the offset in the first line of a statement.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.2.2.10 StartPos Property

Used to get the start position of the statement in a script.

Class
TDAStatement

Syntaxproperty StartPos: integer;© 2019 DevartReference

272

Remarks
Use the StartPos property to get the start position of the statement (the position of the firststatement character) in a script.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.2.3 Methods

Methods of the TDAStatement class.
For a complete list of the TDAStatement class members, see the TDAStatement Members
topic.

PublicName
ExecuteDescription
Executes a statement.

See Also
TDAStatement Class
TDAStatement Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.2.3.1 Execute Method

Executes a statement.

Class
TDAStatement

Syntax
procedure Execute;

Remarks
Use the Execute method to execute a statement.

© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

273

5.8.1.3

Oracle Data Access Components

TDAStatements Class

Holds a collection of TDAStatement objects.
For a list of all members of this type, see TDAStatements members.

Unit
DAScript

Syntax
TDAStatements = class(TCollection);

Remarks
Each TDAStatements holds a collection of TDAStatement objects. TDAStatements maintains
an index of the statements in its Items array. The Count property contains the number ofstatements in the collection. Use TDAStatements class to manipulate script SQL statements.

See Also
TDAScript
TDAStatement© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.3.1 Members

TDAStatements class overview.

Properties
Name

Description
Used to access separate
script statements.

Items© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.3.2 Properties

Properties of the TDAStatements class.
For a complete list of the TDAStatements class members, see the TDAStatements
Members topic.

© 2019 DevartReference

274

PublicName

Description
Used to access separate
script statements.

Items

See Also
TDAStatements Class
TDAStatements Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.8.1.3.2.1 Items Property(Indexer)

Used to access separate script statements.

Class
TDAStatements

Syntaxproperty Items[Index: Integer]: TDAStatement; default;
Parameters
Index
Holds the index value.

Remarks
Use the Items property to access individual script statements. The value of the Index
parameter corresponds to the Index property of TDAStatement.

See Also
TDAStatement© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

275

5.8.2

Oracle Data Access Components

Types
Types in the DAScript unit.

Types
Name

Description
This type is used for the
TDAScript.AfterExecute
event.
This type is used for the
TDAScript.BeforeExecute
event.
This type is used for the
TDAScript.OnError event.

TAfterStatementExecuteEvent

TBeforeStatementExecuteEvent
TOnErrorEvent© 1997-2019
Devart. All Rights
Reserved.
5.8.2.1

Request Support

DAC Forum

Provide Feedback

TAfterStatementExecuteEvent Procedure ReferenceThis type is used for the TDAScript.AfterExecute event.

Unit
DAScript

SyntaxTAfterStatementExecuteEvent = procedure (Sender: TObject; SQL:
string) of object;Parameters
SenderAn object that raised the event.
SQL
Holds the passed SQL statement.

© 1997-2019
Devart. All Rights
Reserved.
5.8.2.2

Request Support

DAC Forum

Provide Feedback

TBeforeStatementExecuteEvent Procedure ReferenceThis type is used for the TDAScript.BeforeExecute event.

Unit© 2019 DevartReference

276

DAScript

SyntaxTBeforeStatementExecuteEvent = procedure (Sender: TObject; var
SQL: string; var Omit: boolean) of object;Parameters
SenderAn object that raised the event.
SQL
Holds the passed SQL statement.
Omit
True, if the statement execution should be skipped.

© 1997-2019
Devart. All Rights
Reserved.
5.8.2.3

Request Support

DAC Forum

Provide Feedback

TOnErrorEvent Procedure ReferenceThis type is used for the TDAScript.OnError event.

Unit
DAScript

SyntaxTOnErrorEvent = procedure (Sender: TObject; E: Exception; SQL:
string; var Action: TErrorAction) of object;Parameters
SenderAn object that raised the event.
E
The error code.
SQL
Holds the passed SQL statement.
ActionThe action to take when the OnError handler exits.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

277

5.8.3

Oracle Data Access Components

Enumerations
Enumerations in the DAScript unit.

Enumerations
Name

Description
Indicates the action to takewhen the OnError handler
exits.

TErrorAction© 1997-2019
Devart. All Rights
Reserved.
5.8.3.1

Request Support

DAC Forum

Provide Feedback

TErrorAction Enumeration

Indicates the action to take when the OnError handler exits.

Unit
DAScript

SyntaxTErrorAction = (eaAbort, eaFail, eaException, eaContinue);

ValuesValue
eaAborteaContinue
eaException
eaFail© 1997-2019
Devart. All Rights
Reserved.

5.9

Meaning
Abort execution without displaying an error message.
Continue execution.
In Delphi 6 and higher exception is handled by the
Application.HandleException method.
Abort execution and display an error message.
Request Support

DAC Forum

Provide Feedback

DASQLMonitor
This unit contains the base class for the TOraSQLMonitor component.

ClassesName

Description© 2019 DevartReference

278

A base class that introduces
properties and methods tomonitor dynamic SQL
execution in databaseapplications interactively.
This class holds options for
dbMonitor.

TCustomDASQLMonitor

TDBMonitorOptions

Types
Name

Description
Represents the set of
TDATraceFlag.
Represents the set of
TMonitorOption.
This type is used for the
TCustomDASQLMonitor.On
SQL event.

TDATraceFlags
TMonitorOptions
TOnSQLEvent

Enumerations
Name

Description
Use TraceFlags to specify
which database operations
the monitor should track in
an application at runtime.
Used to define where
information from
SQLMonitor will bedispalyed.

TDATraceFlag

TMonitorOption© 1997-2019
Devart. All Rights
Reserved.
5.9.1

Request Support

DAC Forum

Provide Feedback

ClassesClasses in the DASQLMonitor unit.

ClassesName
TCustomDASQLMonitor© 2019 Devart

Description
A base class that introduces
properties and methods to279

Oracle Data Access Components

monitor dynamic SQL
execution in databaseapplications interactively.
This class holds options for
dbMonitor.

TDBMonitorOptions© 1997-2019
Devart. All Rights
Reserved.
5.9.1.1

Request Support

DAC Forum

Provide Feedback

TCustomDASQLMonitor ClassA base class that introduces properties and methods to monitor dynamic SQL execution in
database applications interactively.
For a list of all members of this type, see TCustomDASQLMonitor members.

Unit
DASQLMonitor

SyntaxTCustomDASQLMonitor = class(TComponent);

Remarks
TCustomDASQLMonitor is a base class that introduces properties and methods to monitor
dynamic SQL execution in database applications interactively. TCustomDASQLMonitor
provides two ways of displaying debug information. It monitors either by dialog window or by
Borland's proprietary SQL Monitor. Furthermore to receive debug information use theTCustomDASQLMonitor.OnSQL event.
In applications use descendants of TCustomDASQLMonitor.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.9.1.1.1 Members

TCustomDASQLMonitor class overview.

Properties
Name
ActiveDescription
Used to activate monitoringof SQL.
© 2019 DevartReference

280

Used to set options for
dbMonitor.
Used to include the desired
properties for
TCustomDASQLMonitor.
Used to specify which
database operations themonitor should track in an
application at runtime.

DBMonitorOptions
Options

TraceFlags

EventsName

Description
Occurs when tracing of SQL
activity on database
components is needed.

OnSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.9.1.1.2 Properties

Properties of the TCustomDASQLMonitor class.
For a complete list of the TCustomDASQLMonitor class members, see theTCustomDASQLMonitor Members topic.

PublicName
ActiveDBMonitorOptions
Options

TraceFlags

See Also
TCustomDASQLMonitor Class© 2019 Devart

Description
Used to activate monitoringof SQL.
Used to set options for
dbMonitor.
Used to include the desired
properties for
TCustomDASQLMonitor.
Used to specify which
database operations themonitor should track in an
application at runtime.

281

Oracle Data Access Components

TCustomDASQLMonitor Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.9.1.1.2.1 Active Property

Used to activate monitoring of SQL.

Class
TCustomDASQLMonitor

Syntaxproperty Active: boolean default True;

Remarks
Set the Active property to True to activate monitoring of SQL.

See Also
OnSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.9.1.1.2.2 DBMonitorOptions Property

Used to set options for dbMonitor.

Class
TCustomDASQLMonitor

Syntaxproperty DBMonitorOptions: TDBMonitorOptions;Remarks
Use DBMonitorOptions to set options for dbMonitor.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference282

5.9.1.1.2.3 Options Property

Used to include the desired properties for TCustomDASQLMonitor.

Class
TCustomDASQLMonitor

Syntaxproperty Options: TMonitorOptions default [moDialog,
moSQLMonitor, moDBMonitor, moCustom];Remarks
Set Options to include the desired properties for TCustomDASQLMonitor.

See Also
OnSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.9.1.1.2.4 TraceFlags Property

Used to specify which database operations the monitor should track in an application at
runtime.

Class
TCustomDASQLMonitor

Syntaxproperty TraceFlags: TDATraceFlags default [tfQPrepare,tfQExecute, tfError, tfConnect, tfTransact, tfParams, tfMisc];

Remarks
Use the TraceFlags property to specify which database operations the monitor should track in
an application at runtime.

See Also
OnSQL© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

283

Oracle Data Access Components

Reserved.
5.9.1.1.3 Events

Events of the TCustomDASQLMonitor class.
For a complete list of the TCustomDASQLMonitor class members, see theTCustomDASQLMonitor Members topic.

PublicName

Description
Occurs when tracing of SQL
activity on database
components is needed.

OnSQL

See Also
TCustomDASQLMonitor Class
TCustomDASQLMonitor Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.9.1.1.3.1 OnSQL Event

Occurs when tracing of SQL activity on database components is needed.

Class
TCustomDASQLMonitor

Syntaxproperty OnSQL: TOnSQLEvent;Remarks
Write the OnSQL event handler to let an application trace SQL activity on database
components. The Text parameter holds the detected SQL statement. Use the Flag parameterto make selective processing of SQL in the handler body.

See Also
TraceFlags© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

284

Reserved.
5.9.1.2

TDBMonitorOptions ClassThis class holds options for dbMonitor.
For a list of all members of this type, see TDBMonitorOptions members.

Unit
DASQLMonitor

SyntaxTDBMonitorOptions = class(TPersistent);© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.9.1.2.1 Members

TDBMonitorOptions class overview.

Properties
Name

Description
Used to set the host name or
IP address of the computer
where dbMonitor application
runs.
Used to set the port number
for connecting to dbMonitor.
Used to set the minimum
time that should be spent
before reconnecting todbMonitor is allowed.
Used to set timeout for
sending events todbMonitor.

Host

Port

ReconnectTimeout

SendTimeout© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.9.1.2.2 Properties

Properties of the TDBMonitorOptions class.
For a complete list of the TDBMonitorOptions class members, see the TDBMonitorOptions© 2019 Devart

285

Oracle Data Access Components

Members topic.

Published
Name

Description
Used to set the host name or
IP address of the computer
where dbMonitor application
runs.
Used to set the port number
for connecting to dbMonitor.
Used to set the minimum
time that should be spent
before reconnecting todbMonitor is allowed.
Used to set timeout for
sending events todbMonitor.

Host

Port

ReconnectTimeout

SendTimeout

See Also
TDBMonitorOptions Class
TDBMonitorOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.9.1.2.2.1 Host Property

Used to set the host name or IP address of the computer where dbMonitor application runs.

Class
TDBMonitorOptions

Syntaxproperty Host: string;

Remarks
Use the Host property to set the host name or IP address of the computer where dbMonitor
application runs.
dbMonitor supports remote monitoring. You can run dbMonitor on a different computer thanmonitored application runs. In this case you need to set the Host property to the© 2019 DevartReference286

corresponding computer name.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.9.1.2.2.2 Port Property

Used to set the port number for connecting to dbMonitor.

Class
TDBMonitorOptions

Syntaxproperty Port: integer default DBMonitorPort;

Remarks
Use the Port property to set the port number for connecting to dbMonitor.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.9.1.2.2.3 ReconnectTimeout Property

Used to set the minimum time that should be spent before reconnecting to dbMonitor isallowed.

Class
TDBMonitorOptions

Syntaxproperty ReconnectTimeout: integer default
DefaultReconnectTimeout;

Remarks
Use the ReconnectTimeout property to set the minimum time (in milliseconds) that should bespent before allowing reconnecting to dbMonitor. If an error occurs when the component
sends an event to dbMonitor (dbMonitor is not running), next events are ignored and thecomponent does not restore the connection until ReconnectTimeout is over.

© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

287

Oracle Data Access Components

5.9.1.2.2.4 SendTimeout Property

Used to set timeout for sending events to dbMonitor.

Class
TDBMonitorOptions

Syntaxproperty SendTimeout: integer default DefaultSendTimeout;

Remarks
Use the SendTimeout property to set timeout (in milliseconds) for sending events todbMonitor. If dbMonitor does not respond in the specified timeout, event is ignored.

© 1997-2019
Devart. All Rights
Reserved.
5.9.2

Request Support

DAC Forum

Provide Feedback

Types
Types in the DASQLMonitor unit.

Types
Name

Description
Represents the set of
TDATraceFlag.
Represents the set of
TMonitorOption.
This type is used for the
TCustomDASQLMonitor.On
SQL event.

TDATraceFlags
TMonitorOptions
TOnSQLEvent© 1997-2019
Devart. All Rights
Reserved.
5.9.2.1

Request Support

DAC Forum

Provide Feedback

TDATraceFlags Set

Represents the set of TDATraceFlag.

Unit
DASQLMonitor

Syntax© 2019 DevartReference

288

TDATraceFlags = set of TDATraceFlag;© 1997-2019
Devart. All Rights
Reserved.
5.9.2.2

Request Support

DAC Forum

Provide Feedback

TMonitorOptions Set

Represents the set of TMonitorOption.

Unit
DASQLMonitor

Syntax
TMonitorOptions = set of TMonitorOption;© 1997-2019
Devart. All Rights
Reserved.
5.9.2.3

Request Support

DAC Forum

Provide Feedback

TOnSQLEvent Procedure ReferenceThis type is used for the TCustomDASQLMonitor.OnSQL event.

Unit
DASQLMonitor

SyntaxTOnSQLEvent = procedure (Sender: TObject; Text: string; Flag:
TDATraceFlag) of object;Parameters
SenderAn object that raised the event.
Text
Holds the detected SQL statement.
Flag
Use the Flag parameter to make selective processing of SQL in the handler body.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

289

5.9.3

Oracle Data Access Components

Enumerations
Enumerations in the DASQLMonitor unit.

Enumerations
Name

Description
Use TraceFlags to specify
which database operations
the monitor should track in
an application at runtime.
Used to define where
information from
SQLMonitor will bedispalyed.

TDATraceFlag

TMonitorOption© 1997-2019
Devart. All Rights
Reserved.
5.9.3.1

Request Support

DAC Forum

Provide Feedback

TDATraceFlag Enumeration

Use TraceFlags to specify which database operations the monitor should track in an
application at runtime.

Unit
DASQLMonitor

SyntaxTDATraceFlag = (tfQPrepare, tfQExecute, tfQFetch, tfError, tfStmt,
tfConnect, tfTransact, tfBlob, tfService, tfMisc, tfParams,
tfObjDestroy, tfPool);

ValuesValue
tfBlobtfConnect
tfErrortfMisctfObjDestroy
tfParams
tfPoolMeaning
This option is declared for future use.
Establishing a connection.
Errors of query execution.
This option is declared for future use.
Destroying of components.
Representing parameter values for tfQPrepare and tfQExecute.
Connection pool operations.

© 2019 DevartReference

tfQExecute
tfQFetch
tfQPrepare
tfService
tfStmttfTransact© 1997-2019
Devart. All Rights
Reserved.
5.9.3.2

290

Execution of the queries.
This option is declared for future use.
Queries preparation.
This option is declared for future use.
This option is declared for future use.
Processing transactions.
Request Support

DAC Forum

Provide Feedback

TMonitorOption Enumeration

Used to define where information from SQLMonitor will be dispalyed.

Unit
DASQLMonitor

Syntax
TMonitorOption = (moDialog, moSQLMonitor, moDBMonitor, moCustom,moHandled);

ValuesValue
moCustommoDBMonitor
moDialog
moHandled
moSQLMonitor© 1997-2019
Devart. All Rights
Reserved.

5.10

Meaning
Monitoring of SQL for individual components is allowed. Set
Debug properties in SQL-related components to True to let
TCustomDASQLMonitor instance to monitor their behavior. Has
effect when moDialog is included.
Debug information is displayed in DBMonitor.
Debug information is displayed in debug window.
Component handle is included into the event description string.
Debug information is displayed in Borland SQL Monitor.
Request Support

DAC Forum

DBAccess
This unit contains base classes for most of the components.

Classes© 2019 Devart

Provide Feedback

291

Oracle Data Access Components

Name
EDAError

TCRDataSource

TCustomConnectDialog
TCustomDAConnection

TCustomDADataSet

TCustomDASQL

TCustomDAUpdateSQLTDACondition
TDAConditions
TDAConnectionOptions

TDADataSetOptions

TDAEncryption
TDAMapRule
TDAMapRules

Description
A base class for exceptions
that are raised when an error
occurs on the server side.
Provides an interface
between a DAC dataset
components and data-aware
controls on a form.
A base class for the connect
dialog components.
A base class forcomponents used toestablish connections.
Encapsulates general set ofproperties, events, andmethods for working withdata accessed throughvarious database engines.
A base class forcomponents executing SQL
statements that do not returnresult sets.
A base class forcomponents that provide
DML statements for more
flexible control over data
modifications.
Represents a condition fromthe TDAConditions list.
Holds a collection of
TDACondition objects.
This class allows setting up
the behaviour of the
TDAConnection class.
This class allows setting up
the behaviour of the
TDADataSet class.
Used to specify the optionsof the data encryption in adataset.
Class that formes rules for
Data Type Mapping.
Used for adding rules for
DataSet fields mapping with© 2019 DevartReference

TDAMetaData

TDAParam

TDAParams

TDATransaction
TMacroTMacros

TPoolingOptions

TSmartFetchOptions

292

both identifying by fieldname and by field type andDelphi field types.
A class for retrieving
metainformation of thespecified database objects
in the form of dataset.
A class that forms objects torepresent the values of theparameters set.
This class is used to
manage a list of TDAParamobjects for an object thatuses field parameters.
A base class that
implements functionality forcontrolling transactions.
Object that represents thevalue of a macro.
Controls a list of TMacroobjects for the
TCustomDASQL.Macros orTCustomDADataSet
components.
This class allows setting up
the behaviour of theconnection pool.
Smart fetch options areused to set up the behaviorof the SmartFetch mode.

Types
Name
TAfterExecuteEvent

TAfterFetchEvent
TBeforeFetchEvent© 2019 Devart

Description
This type is used for the
TCustomDADataSet.AfterE
xecute andTCustomDASQL.AfterExecu
te events.
This type is used for the
TCustomDADataSet.AfterF
etch event.
This type is used for the
TCustomDADataSet.Before

293

Oracle Data Access Components

TConnectionLostEvent

TDAConnectionErrorEvent

TDATransactionErrorEvent
TRefreshOptions

TUpdateExecuteEvent

Fetch event.
This type is used for the
TCustomDAConnection.On
ConnectionLost event.
This type is used for the
TCustomDAConnection.On
Error event.
This type is used for the
TDATransaction.OnError
event.
Represents the set of
TRefreshOption.
This type is used for the
TCustomDADataSet.AfterU
pdateExecute andTCustomDADataSet.Before
UpdateExecute events.

Enumerations
Name
TCheckMode
TLabelSet
TLockMode
TRefreshOption
TRetryMode

Description
Specifies the action to takewhen another user makes
modifications to a record.
Sets the languauge of labelsin the connect dialog.
Specifies when the lockingof an editing record shouldbe performed.
Indicates when the editing
record will be refreshed.
Specifies the application
behavior when connection is
lost.

Variables
Name

BaseSQLOldBehavior

Description
After assigning SQL text andmodifying it by AddWhere,
DeleteWhere, and
SetOrderBy, all subsequentchanges of the SQL property© 2019 DevartReference

will not be reflected in the
BaseSQL property.
When set to True allows
data access components tochange screen cursor for the
execution time.
The value of theTCustomDADataSet.BaseSQL property is used tocomplete the refresh SQL
statement, if the manuallyassigned
TCustomDAUpdateSQL.Ref
reshSQL property contains
only WHERE clause.

ChangeCursor

SQLGeneratorCompatibility© 1997-2019
Devart. All Rights
Reserved.

Request Support

294

DAC Forum

Provide Feedback

5.10.1 Classes
Classes in the DBAccess unit.

ClassesName
EDAError

TCRDataSource

TCustomConnectDialog
TCustomDAConnection

TCustomDADataSet

TCustomDASQL© 2019 Devart

Description
A base class for exceptions
that are raised when an error
occurs on the server side.
Provides an interface
between a DAC dataset
components and data-aware
controls on a form.
A base class for the connect
dialog components.
A base class forcomponents used toestablish connections.
Encapsulates general set ofproperties, events, andmethods for working withdata accessed throughvarious database engines.
A base class for295

Oracle Data Access Components

TCustomDAUpdateSQLTDACondition
TDAConditions
TDAConnectionOptions

TDADataSetOptions

TDAEncryption
TDAMapRule

TDAMapRules

TDAMetaData

TDAParam

TDAParams

TDATransaction
TMacrocomponents executing SQL
statements that do not returnresult sets.
A base class forcomponents that provide
DML statements for more
flexible control over data
modifications.
Represents a condition fromthe TDAConditions list.
Holds a collection of
TDACondition objects.
This class allows setting up
the behaviour of the
TDAConnection class.
This class allows setting up
the behaviour of the
TDADataSet class.
Used to specify the optionsof the data encryption in adataset.
Class that formes rules for
Data Type Mapping.
Used for adding rules for
DataSet fields mapping withboth identifying by fieldname and by field type andDelphi field types.
A class for retrieving
metainformation of thespecified database objects
in the form of dataset.
A class that forms objects torepresent the values of theparameters set.
This class is used to
manage a list of TDAParamobjects for an object thatuses field parameters.
A base class that
implements functionality forcontrolling transactions.
Object that represents thevalue of a macro.
© 2019 DevartReference

Controls a list of TMacroobjects for the
TCustomDASQL.Macros orTCustomDADataSet
components.
This class allows setting up
the behaviour of theconnection pool.
Smart fetch options areused to set up the behaviorof the SmartFetch mode.

TMacros

TPoolingOptions

TSmartFetchOptions© 1997-2019
Devart. All Rights
Reserved.

296

Request Support

DAC Forum

Provide Feedback

5.10.1.1 EDAError ClassA base class for exceptions that are raised when an error occurs on the server side.
For a list of all members of this type, see EDAError members.

Unit
DBAccess

SyntaxEDAError = class(EDatabaseError);

Remarks
EDAError is a base class for exceptions that are raised when an error occurs on the serverside.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.1.1 Members

EDAError class overview.

Properties
Name
Component© 2019 Devart

Description
Contains the component thatcaused the error.

297

Oracle Data Access Components

Determines the error code
returned by the server.

ErrorCode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.1.2 Properties

Properties of the EDAError class.
For a complete list of the EDAError class members, see the EDAError Members topic.

PublicName

Description
Contains the component thatcaused the error.
Determines the error code
returned by the server.

Component
ErrorCode

See Also
EDAError ClassEDAError Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.1.2.1 Component Property

Contains the component that caused the error.

Class
EDAError

Syntaxproperty Component: TObject;

Remarks
The Component property contains the component that caused the error.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference298

5.10.1.1.2.2 ErrorCode Property

Determines the error code returned by the server.

Class
EDAError

Syntaxproperty ErrorCode: integer;

Remarks
Use the ErrorCode property to determine the error code returned by Oracle. This value isalways positive.

See Also
TOraErrorHandler.OnError
TOraErrorHandler.OnError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.2 TCRDataSource Class

Provides an interface between a DAC dataset components and data-aware controls on aform.
For a list of all members of this type, see TCRDataSource members.

Unit
DBAccess

SyntaxTCRDataSource = class(TDataSource);

Remarks
TCRDataSource provides an interface between a DAC dataset components and data-aware
controls on a form.
TCRDataSource inherits its functionality directly from the TDataSource component.
At design time assign individual data-aware components' DataSource properties from theirdrop-down listboxes.

© 2019 Devart299

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.10.1.2.1 Members

TCRDataSource class overview.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.10.1.3 TCustomConnectDialog ClassA base class for the connect dialog components.
For a list of all members of this type, see TCustomConnectDialog members.

Unit
DBAccess

SyntaxTCustomConnectDialog = class(TComponent);

Remarks
TCustomConnectDialog is a base class for the connect dialog components. It provides
functionality to show a dialog box where user can edit username, password and server namebefore connecting to a database. You can customize captions of buttons and labels by theirproperties.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.1 Members

TCustomConnectDialog class overview.

Properties
Name
CancelButton
CaptionConnectButton

Description
Used to specify the label for
the Cancel button.
Used to set the caption of
dialog box.
Used to specify the label for
the Connect button.
© 2019 DevartReference

300

Used to specify the class ofthe form that will be
displayed to enter login
information.
Used to set the language ofbuttons and labels captions.
Used to specify a prompt for
password edit.
Used to indicate the numberof retries of failed
connections.
Used for the password to be
displayed in ConnectDialog
in asterisks.
Used to specify a prompt forthe server name edit.
Used to specify whether thelogin information should be
kept in system registry after
a connection wasestablished.
Used to specify a prompt forusername edit.

DialogClass

LabelSet
PasswordLabel
Retries

SavePassword
ServerLabelStoreLogInfo

UsernameLabel

Methods
Name

Description
Displays the connect dialog
and calls the connection's
Connect method when user
clicks the Connect button.
Retrieves a list of available
server names.

Execute

GetServerList© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.2 Properties

Properties of the TCustomConnectDialog class.
For a complete list of the TCustomConnectDialog class members, see theTCustomConnectDialog Members topic.

Public© 2019 Devart

301

Oracle Data Access Components

Name

Description
Used to specify the label for
the Cancel button.
Used to set the caption of
dialog box.
Used to specify the label for
the Connect button.
Used to specify the class ofthe form that will be
displayed to enter login
information.
Used to set the language ofbuttons and labels captions.
Used to specify a prompt for
password edit.
Used to indicate the numberof retries of failed
connections.
Used for the password to be
displayed in ConnectDialog
in asterisks.
Used to specify a prompt forthe server name edit.
Used to specify whether thelogin information should be
kept in system registry after
a connection wasestablished.
Used to specify a prompt forusername edit.

CancelButton
CaptionConnectButton

DialogClass

LabelSet
PasswordLabel
Retries

SavePassword
ServerLabelStoreLogInfo

UsernameLabel

See Also
TCustomConnectDialog Class
TCustomConnectDialog Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.2.1 CancelButton Property

Used to specify the label for the Cancel button.

Class© 2019 DevartReference

302

TCustomConnectDialog

Syntaxproperty CancelButton: string;

Remarks
Use the CancelButton property to specify the label for the Cancel button.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.2.2 Caption Property

Used to set the caption of dialog box.

Class
TCustomConnectDialog

Syntaxproperty Caption: string;

Remarks
Use the Caption property to set the caption of dialog box.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.2.3 ConnectButton Property

Used to specify the label for the Connect button.

Class
TCustomConnectDialog

Syntaxproperty ConnectButton: string;

Remarks
Use the ConnectButton property to specify the label for the Connect button.

© 2019 Devart

303

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.2.4 DialogClass Property

Used to specify the class of the form that will be displayed to enter login information.

Class
TCustomConnectDialog

Syntaxproperty DialogClass: string;

Remarks
Use the DialogClass property to specify the class of the form that will be displayed to enter
login information. When this property is blank, TCustomConnectDialog uses the default form TConnectForm. You can write your own login form to enter login information and assign its
class name to the DialogClass property. Each login form must have ConnectDialog:
TCustomConnectDialog published property to access connection information. For details see
the implementation of the connect form which sources are in the Lib subdirectory of the
ODAC installation directory.

See Also
GetServerList© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.2.5 LabelSet Property

Used to set the language of buttons and labels captions.

Class
TCustomConnectDialog

Syntaxproperty LabelSet: TLabelSet default lsEnglish;

Remarks© 2019 DevartReference304

Use the LabelSet property to set the language of labels and buttons captions.
The default value is lsEnglish.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.2.6 Passw ordLabel Property

Used to specify a prompt for password edit.

Class
TCustomConnectDialog

Syntaxproperty PasswordLabel: string;

Remarks
Use the PasswordLabel property to specify a prompt for password edit.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.2.7 Retries Property

Used to indicate the number of retries of failed connections.

Class
TCustomConnectDialog

Syntaxproperty Retries: word default 3;

Remarks
Use the Retries property to determine the number of retries of failed connections.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

305

Oracle Data Access Components

5.10.1.3.2.8 SavePassw ord Property

Used for the password to be displayed in ConnectDialog in asterisks.

Class
TCustomConnectDialog

Syntaxproperty SavePassword: boolean default False;

Remarks
If True, and the Password property of the connection instance is assigned, the password inConnectDialog is displayed in asterisks.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.2.9 ServerLabel Property

Used to specify a prompt for the server name edit.

Class
TCustomConnectDialog

Syntaxproperty ServerLabel: string;

Remarks
Use the ServerLabel property to specify a prompt for the server name edit.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.2.10 StoreLogInfo Property

Used to specify whether the login information should be kept in system registry after aconnection was established.

Class
TCustomConnectDialog© 2019 DevartReference

306

Syntaxproperty StoreLogInfo: boolean default True;

Remarks
Use the StoreLogInfo property to specify whether to keep login information in system registry
after a connection was established using provided username, password and servername.
Set this property to True to store login information.
The default value is True.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.2.11 UsernameLabel Property

Used to specify a prompt for username edit.

Class
TCustomConnectDialog

Syntaxproperty UsernameLabel: string;

Remarks
Use the UsernameLabel property to specify a prompt for username edit.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.3 Methods

Methods of the TCustomConnectDialog class.
For a complete list of the TCustomConnectDialog class members, see theTCustomConnectDialog Members topic.

PublicName

Description

ExecuteDisplays the connect dialog
and calls the connection's
Connect method when user

© 2019 Devart

307

Oracle Data Access Components

clicks the Connect button.
Retrieves a list of available
server names.

GetServerList

See Also
TCustomConnectDialog Class
TCustomConnectDialog Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.3.1 Execute Method

Displays the connect dialog and calls the connection's Connect method when user clicks theConnect button.

Class
TCustomConnectDialog

Syntaxfunction Execute: boolean; virtual;
Return Value
True, if connected.

Remarks
Displays the connect dialog and calls the connection's Connect method when user clicks theConnect button. Returns True if connected. If user clicks Cancel, Execute returns False.
In the case of failed connection Execute offers to connect repeat Retries times.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.3.3.2 GetServerList Method

Retrieves a list of available server names.

Class
TCustomConnectDialog

Syntax© 2019 DevartReference

308

procedure GetServerList(List: TStrings); virtual;Parameters
List
Holds a list of available server names.

Remarks
Call the GetServerList method to retrieve a list of available server names. It is particularly
relevant for writing custom login form.

See Also
DialogClass© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4 TCustomDAConnection ClassA base class for components used to establish connections.
For a list of all members of this type, see TCustomDAConnection members.

Unit
DBAccess

SyntaxTCustomDAConnection = class(TCustomConnection);

Remarks
TCustomDAConnection is a base class for components that establish connection with
database, provide customised login support, and perform transaction control.
Do not create instances of TCustomDAConnection. To add a component that represents a
connection to a source of data, use descendants of the TCustomDAConnection class.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.10.1.4.1 Members

TCustomDAConnection class overview.

Properties© 2019 Devart

DAC Forum

Provide Feedback

309

Oracle Data Access Components

Name
ConnectDialog

ConnectString

ConvertEOL
InTransaction

LoginPrompt

Options
Password
Pooling
PoolingOptions
ServerUsername

Description
Allows to link a
TCustomConnectDialog
component.
Used to specify theconnection information, suchas: UserName, Password,
Server, etc.
Allows customizing line
breaks in string fields andparameters.
Indicates whether thetransaction is active.
Specifies whether a login
dialog appears immediately
before opening a newconnection.
Specifies the connection
behavior.
Serves to supply apassword for login.
Enables or disables using
connection pool.
Specifies the behaviour ofconnection pool.
Serves to supply the server
name for login.
Used to supply a user namefor login.

Methods
Name

Disconnect

Description
Overloaded. Applies
changes in datasets.
Commits current transaction.
Establishes a connection to
the server.
Creates a component for
queries execution.
Performs disconnect.

ExecProc

Allows to execute stored

ApplyUpdates
CommitConnect
CreateSQL© 2019 DevartReference

310

procedure or function
providing its name andparameters.
Allows to execute a stored
procedure or function.
Executes a SQL statementwith parameters.
Executes any SQL
statement outside the
TQuery or TSQL
components.
Returns a database list fromthe server.
Provides a list of available
key field names.
Returns a list of stored
procedures from the server.
Provides a list of available
tables names.
Sends a specified message
through theTCustomDASQLMonitor
component.
Used to check state ofconnection to the server.
Marks the connection thatshould not be returned to thepool after disconnect.
Discards all current datachanges and ends
transaction.
Begins a new usertransaction.

ExecProcEx
ExecSQLExecSQLEx

GetDatabaseNames
GetKeyFieldNames
GetStoredProcNames
GetTableNames

MonitorMessage

Ping
RemoveFromPool

Rollback
StartTransaction

EventsName

Description
This event occurs whenconnection was lost.
This event occurs when anerror has arisen in theconnection.

OnConnectionLost
OnError© 1997-2019© 2019 Devart

Request Support

DAC Forum

Provide Feedback

311

Oracle Data Access Components

Devart. All Rights
Reserved.
5.10.1.4.2 Properties

Properties of the TCustomDAConnection class.
For a complete list of the TCustomDAConnection class members, see theTCustomDAConnection Members topic.

PublicName
ConnectDialog

ConnectString

ConvertEOL
InTransaction

LoginPrompt

Options
Password
Pooling
PoolingOptions
ServerUsername

Description
Allows to link a
TCustomConnectDialog
component.
Used to specify theconnection information, suchas: UserName, Password,
Server, etc.
Allows customizing line
breaks in string fields andparameters.
Indicates whether thetransaction is active.
Specifies whether a login
dialog appears immediately
before opening a newconnection.
Specifies the connection
behavior.
Serves to supply apassword for login.
Enables or disables using
connection pool.
Specifies the behaviour ofconnection pool.
Serves to supply the server
name for login.
Used to supply a user namefor login.

See Also
TCustomDAConnection Class© 2019 DevartReference

312

TCustomDAConnection Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.2.1 ConnectDialog Property

Allows to link a TCustomConnectDialog component.

Class
TCustomDAConnection

Syntaxproperty ConnectDialog: TCustomConnectDialog;

Remarks
Use the ConnectDialog property to assign to connection a TCustomConnectDialog
component.

See Also
TCustomConnectDialog© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.2.2 ConnectString Property

Used to specify the connection information, such as: UserName, Password, Server, etc.

Class
TCustomDAConnection

Syntaxproperty ConnectString: string stored False;

Remarks
ODAC recognizes an ODBC-like syntax in provider string property values. Within the string,elements are delimited by using a semicolon. Each element consists of a keyword, an equal
sign character, and the value passed on initialization. For example:
Server=London1;User ID=nancyd© 2019 Devart

313

Oracle Data Access Components

Connection parameters
The following connection parameters can be used to customize connection:

Parameter Name
LoginPrompt
Pooling
ConnectionLifeTime

MaxPoolSize

MinPoolSize
Validate Connection
ServerUsername
Password
CharsetUseUnicode
Port
ConnectionTimeout

DirectIPVersion
SID
ServiceName
ConnectMode
HomeName

Description
Specifies whether a login dialog appears
immediately before opening a newconnection.
Enables or disables using connection pool.
Used to specify the maximum time during
which an opened connection can be usedby connection pool.
Used to specify the maximum number ofconnections that can be opened inconnection pool.
Used to specify the minimum number ofconnections that can be opened inconnection pool.
Used for a connection to be validated when
it is returned from the pool.
Serves to supply the server name for login.
Used to supply a user name for login.
Used to supply a user name for login.
Used to set the character set that ODAC
uses to read and write character data.
Used to enable or disable Unicode
support.
Used to specify the port number for theconnection. Available in Direct Mode only.
Used to specify the amount of time before
an attempt to make a connection isconsidered unsuccessful.
Used for ODAC to connect directly over
TCP/IP (in Direct mode) and without
requiring Oracle software on the client side.
Used to specify the version of the Internet
Protocol.
Used to specify the security identifier.
Used to specify the name of the service.
Used to specify the system privileges touse when a user connects to the server.
Used to select the Oracle client to use withthe application.

© 2019 DevartReference

314

Used to change the current schema of thesession to the specified schema.

SchemaOld-style conenction string
The old connection string format is also supported:
user_name/passwd@database
where: user_name - username for logging in to the server; passwd - password to log in;database - the database alias from the tnsnames.ora file.

EZCONNECT connection string
ODAC also supports Oracle's easy connect naming method . An example of EZCONNECT
connection string:username/password@host:port/service_name

See Also
Password
Username
ServerConnect© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.2.3 ConvertEOL Property

Allows customizing line breaks in string fields and parameters.

Class
TCustomDAConnection

Syntaxproperty ConvertEOL: boolean default False;

Remarks
Affects the line break behavior in string fields and parameters. When fetching strings(including the CLOB and LONG fields) with ConvertEOL = True, dataset converts their line
breaks from the LF to CRLF form. And when posting strings to server with ConvertEOL© 2019 Devart

315

Oracle Data Access Components

turned on, their line breaks are converted from CRLF to LF form. By default, strings are notconverted.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.2.4 InTransaction Property

Indicates whether the transaction is active.

Class
TCustomDAConnection

Syntaxproperty InTransaction: boolean;

Remarks
Examine the InTransaction property at runtime to determine whether user transaction iscurrently in progress. In other words InTransaction is set to True when user explicitly calls
StartTransaction. Calling Commit or Rollback sets InTransaction to False. The value of the
InTransaction property cannot be changed directly.
Important note: The InTransaction property always shows actual user transaction state on
the server. This means that if transaction was implicitly ended by server-side logic,
InTransaction becomes False.

See Also
StartTransaction
CommitRollback© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.2.5 LoginPrompt Property

Specifies whether a login dialog appears immediately before opening a new connection.

Class
TCustomDAConnection© 2019 DevartReference

316

Syntaxproperty LoginPrompt default DefValLoginPrompt;

Remarks
Specifies whether a login dialog appears immediately before opening a new connection. If
ConnectDialog is not specified, the default connect dialog will be shown. The connect dialog
will appear only if the OdacVcl unit appears to the uses clause.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.2.6 Options Property

Specifies the connection behavior.

Class
TCustomDAConnection

Syntaxproperty Options: TDAConnectionOptions;Remarks
Set the properties of Options to specify the behaviour of the connection.
Descriptions of all options are in the table below.

Option Name
AllowImplicitConnect

DefaultSortType

DisconnectedMode

KeepDesignConnected© 2019 Devart

Description
Specifies whether to allow or not implicit
connection opening.
Used to determine the default type of local
sorting for string fields. It is used when asort type is not specified explicitly after thefield name in the
TMemDataSet.IndexFieldNames property
of a dataset.
Used to open a connection only whenneeded for performing a server call andcloses after performing the operation.
Used to prevent an application fromestablishing a connection at the time ofstartup.

317

Oracle Data Access Components

If True, the OnConnectionLost event occurs
and a failover operation can be performed
after connection breaks.

LocalFailover

See Also
Disconnected Mode
Working in an Unstable Network© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.2.7 Passw ord Property

Serves to supply a password for login.

Class
TCustomDAConnection

Syntaxproperty Password: string stored False;

Remarks
Use the Password property to supply a password to handle server's request for a login.
Application server can use the TOraSession.ProxySession property and verify user password
itself.
Warning: Storing hard-coded user name and password entries as property values or in codefor the OnLogin event handler can compromise server security.

See Also
Username
ServerTOraSession.ProxySession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference318

5.10.1.4.2.8 Pooling Property

Enables or disables using connection pool.

Class
TCustomDAConnection

Syntaxproperty Pooling: boolean default DefValPooling;

Remarks
Normally, when TCustomDAConnection establishes connection with the server it takes
server memory and time resources for allocating new server connection. For example,
pooling can be very useful when using disconnect mode. If an application has wide user
activity that forces many connect/disconnect operations, it may spend a lot of time on
creating connection and sending requests to the server. TCustomDAConnection has
software pool which stores open connections with identical parameters.
Connection pool uses separate thread that validates the pool every 30 seconds. Poolvalidation consists of checking each connection in the pool. If a connection is broken due to a
network problem or another reason, it is deleted from the pool. The validation procedure
removes also connections that are not used for a long time even if they are valid from thepool.
Set Pooling to True to enable pooling. Specify correct values for PoolingOptions. Twoconnections belong to the same pool if they have identical values for the parameters:
MinPoolSize, MaxPoolSize, Validate, ConnectionLifeTime, TOraSession.Username,TOraSession.Server, TOraSession.ConnectMode, TOraSession.Options.
Note: Using Pooling := True can cause errors with working with temporary tables.

See Also
Username
Password
PoolingOptions
Using Connection Pooling© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

319

Oracle Data Access Components

5.10.1.4.2.9 PoolingOptions Property

Specifies the behaviour of connection pool.

Class
TCustomDAConnection

Syntaxproperty PoolingOptions: TPoolingOptions;Remarks
Set the properties of PoolingOptions to specify the behaviour of connection pool.
Descriptions of all options are in the table below.

Option Name

Description
Used to specify the maximum time during
which an opened connection can be usedby connection pool.
Used to specify the maximum number ofconnections that can be opened inconnection pool.
Used to specify the minimum number ofconnections that can be opened in theconnection pool.
Used for a connection to be validated when
it is returned from the pool.

ConnectionLifetime

MaxPoolSize

MinPoolSize
Validate

See Also
Pooling© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.2.10 Server Property

Serves to supply the server name for login.

Class
TCustomDAConnection

Syntax© 2019 DevartReference

320

property Server: string;

Remarks
Use the Server property to supply server name to handle server's request for a login.

See Also
Username
Password© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.2.11 Username Property

Used to supply a user name for login.

Class
TCustomDAConnection

Syntaxproperty Username: string;

Remarks
Use the Username property to supply a user name to handle server's request for login. If thisproperty is not set, and OS authentication is used, a connection can be established.
Otherwise an error is arised.
Warning: Storing hard-coded user name and password entries as property values or in codefor the OnLogin event handler can compromise server security.

See Also
Password
Server© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3 Methods

Methods of the TCustomDAConnection class.
For a complete list of the TCustomDAConnection class members, see the© 2019 Devart

321

Oracle Data Access Components

TCustomDAConnection Members topic.

PublicName
ApplyUpdates
CommitConnect
CreateSQL
Disconnect
ExecProc

ExecProcEx
ExecSQLExecSQLEx

GetDatabaseNames
GetKeyFieldNames
GetStoredProcNames
GetTableNames

MonitorMessage

Ping
RemoveFromPool
Rollback

Description
Overloaded. Applies
changes in datasets.
Commits current transaction.
Establishes a connection to
the server.
Creates a component for
queries execution.
Performs disconnect.
Allows to execute stored
procedure or function
providing its name andparameters.
Allows to execute a stored
procedure or function.
Executes a SQL statementwith parameters.
Executes any SQL
statement outside the
TQuery or TSQL
components.
Returns a database list fromthe server.
Provides a list of available
key field names.
Returns a list of stored
procedures from the server.
Provides a list of available
tables names.
Sends a specified message
through theTCustomDASQLMonitor
component.
Used to check state ofconnection to the server.
Marks the connection thatshould not be returned to thepool after disconnect.
Discards all current datachanges and ends
© 2019 DevartReference322

transaction.
Begins a new usertransaction.

StartTransaction

See Also
TCustomDAConnection Class
TCustomDAConnection Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.1 ApplyUpdates Method

Applies changes in datasets.

Class
TCustomDAConnection

Overload List
Name
ApplyUpdates
ApplyUpdates(const DataSets: array ofTCustomDADataSet)© 1997-2019
Request Support
Devart. All Rights
Reserved.

Description
Applies changes from all active datasets.
Applies changes from the specified
datasets.
DAC Forum

Provide Feedback

Applies changes from all active datasets.

Class
TCustomDAConnection

Syntax
procedure ApplyUpdates; overload; virtual;

Remarks
Call the ApplyUpdates method to write all pending cached updates from all active datasets
attached to this connection to a database or from specific datasets. The ApplyUpdates
method passes cached data to the database for storage, takes care of committing or rolling© 2019 Devart

323

Oracle Data Access Components

back transactions, and clearing the cache when the operation is successful.
Using ApplyUpdates for connection is a preferred method of updating datasets rather thancalling each individual dataset's ApplyUpdates method.

See Also
TMemDataSet.CachedUpdates
TMemDataSet.ApplyUpdates© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Applies changes from the specified datasets.

Class
TCustomDAConnection

Syntax
procedure ApplyUpdates(const DataSets: array ofTCustomDADataSet); overload; virtual;Parameters
DataSets
A list of datasets changes in which are to be applied.

Remarks
Call the ApplyUpdates method to write all pending cached updates from the specified
datasets. The ApplyUpdates method passes cached data to the database for storage, takes
care of committing or rolling back transactions and clearing the cache when operation is
successful.
Using ApplyUpdates for connection is a preferred method of updating datasets rather thancalling each individual dataset's ApplyUpdates method.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.2 Commit Method

Commits current transaction.

Class© 2019 DevartReference

324

TCustomDAConnection

Syntax
procedure Commit; virtual;

Remarks
Call the Commit method to commit current transaction. On commit server writes
permanently all pending data updates associated with the current transaction to the database
and then ends the transaction. The current transaction is the last transaction started bycalling StartTransaction.

See Also
Rollback
StartTransaction
TOraDataSet.FetchAll© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.3 Connect Method

Establishes a connection to the server.

Class
TCustomDAConnection

Syntax
procedure Connect; overload;procedure Connect(const
ConnectString: string); overload;

Remarks
Call the Connect method to establish a connection to the server. Connect sets the Connected
property to True. If ConnectPrompt is True, Connect prompts user for login information as
required by the server, or otherwise tries to establish a connection using values provided in
the Username, Password, and Server properties.
If the Username and Password properties are not specified, then Oracle uses authentication
information supplied at the operating system login process. For this feature to work makesure that your Oracle instance is appropriately tuned (see the Oracle documentation).

© 2019 Devart

325

Oracle Data Access Components

See Also
Disconnect
Username
Password
ServerConnectDialog© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.4 CreateSQL Method

Creates a component for queries execution.

Class
TCustomDAConnection

Syntaxfunction CreateSQL: TCustomDASQL; virtual;
Return ValueA new instance of the class.

Remarks
Call the CreateSQL to return a new instance of the TCustomDASQL class and associates itwith this connection object. In the descendant classes this method should be overridden to
create an appropriate descendant of the TCustomDASQL component.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.5 Disconnect Method

Performs disconnect.

Class
TCustomDAConnection

Syntax
procedure Disconnect;© 2019 DevartReference

326

Remarks
Call the Disconnect method to drop a connection to database. Before the connection
component is deactivated, all associated datasets are closed. Calling Disconnect is similar tosetting the Connected property to False.
In most cases, closing a connection frees system resources allocated to the connection.
If user transaction is active, e.g. the InTransaction flag is set, calling to Disconnect commits
the current user transaction.
Note: If a previously active connection is closed and then reopened, any associated datasets
must be individually reopened; reopening the connection does not automatically reopen
associated datasets.

See Also
Connect© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.6 ExecProc Method

Allows to execute stored procedure or function providing its name and parameters.

Class
TCustomDAConnection

Syntaxfunction ExecProc(const Name: string; const Params: array ofvariant): variant; virtual;Parameters
Name
Holds the name of the stored procedure or function.
ParamsHolds the parameters of the stored procedure or function.
Return Value
the result of the stored procedure.

Remarks
Allows to execute stored procedure or function providing its name and parameters.
Use the following Name value syntax for executing specific overloaded routine:© 2019 Devart327

Oracle Data Access Components"StoredProcName:1" or "StoredProcName:5". The first example executes the first overloaded
stored procedure, while the second example executes the fifth overloaded procedure.
Assign parameters' values to the Params array in exactly the same order and number as they
appear in the stored procedure declaration. Out parameters of the procedure can beaccessed with the ParamByName procedure.
If the value of an input parameter was not included to the Params array, parameter default
value is taken. Only parameters at the end of the list can be unincluded to the Params array. If
the parameter has no default value, the NULL value is sent.
Note: Stored functions unlike stored procedures return result values that are obtainedinternally through the RESULT parameter. You will no longer have to provide anonymous
value in the Params array to describe the result of the function. The stored function result isobtained from the Params[0] indexed property or with the ParamByName('RESULT') methodcall.
For further examples of parameter usage see ExecSQL, ExecSQLEx.

ExampleFor example, having stored function declaration presented in Example 1), you may execute it
and retrieve its result with commands presented in Example 2):
Example 1)
CREATE procedure MY_SUM (A INTEGER,B INTEGER)
RETURNS (RESULT INTEGER)
asbegin
Result = a + b;
end;
Example 2)
Label1.Caption:= MyOraConnection1.ExecProc('My_Sum', [10, 20]);
Label2.Caption:= MyOraConnection1.ParamByName('Result').AsString;See Also
ExecProcEx
ExecSQLExecSQLEx
TOraSession.ParamByName
TOraSession.SQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

328

5.10.1.4.3.7 ExecProcEx Method

Allows to execute a stored procedure or function.

Class
TCustomDAConnection

Syntaxfunction ExecProcEx(const Name: string; const Params: array ofvariant): variant; virtual;Parameters
Name
Holds the stored procedure name.
ParamsHolds an array of pairs of parameters' names and values.
Return Value
the result of the stored procedure.

Remarks
Allows to execute a stored procedure or function. Provide the stored procedure name and its
parameters to the call of ExecProcEx.
Use the following Name value syntax for executing specific overloaded routine:"StoredProcName:1" or "StoredProcName:5". The first example executes the first overloaded
stored procedure, while the second example executes the fifth overloaded procedure.
Assign pairs of parameters' names and values to a Params array so that every name comes
before its corresponding value when an array is being indexed.
Out parameters of the procedure can be accessed with the ParamByName procedure. If thevalue for an input parameter was not included to the Params array, the parameter default
value is taken. If the parameter has no default value, the NULL value is sent.
Note: Stored functions unlike stored procedures return result values that are obtainedinternally through the RESULT parameter. You will no longer have to provide anonymous
value in the Params array to describe the result of the function. Stored function result isobtained from the Params[0] indexed property or with the ParamByName('RESULT') methodcall.
For an example of parameters usage see ExecSQLEx.

ExampleIf you have some stored procedure accepting four parameters, and you want to provide© 2019 Devart

329

Oracle Data Access Components

values only for the first and fourth parameters, you should call ExecProcEx in the following
way:

Connection.ExecProcEx('Some_Stored_Procedure', ['Param_Name1', 'Param_Value1

See Also
ExecSQLExecSQLEx
ExecProc© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.8 ExecSQL Method

Executes a SQL statement with parameters.

Class
TCustomDAConnection

Syntaxfunction ExecSQL(const Text: string): variant;overload;function ExecSQL(const Text: string; const Params:array of variant): variant; overload; virtual;Parameters
Text
a SQL statement to be executed.
ParamsArray of parameter values arranged in the same order as they appear in SQL statement.
Return Value
Out parameter with the name Result will hold the result of function having data type dtString.
Otherwise returns Null.

Remarks
Use the ExecSQL method to execute any SQL statement outside the TCustomDADataSet or
TCustomDASQL components. Supply the Params array with the values of parametersarranged in the same order as they appear in a SQL statement which itself is passed to the
Text string parameter.
The Params array must contain all IN and OUT parameters defined in SQL statement. For
OUT parameters provide any values of valid types so that they are explicitly defined before© 2019 DevartReference

330

call to an ExecSQL method.
Out parameter with the name Result will hold the result of function having data type dtString. If
none of the parameters in the Text statement is named Result, ExecSQL will return Null.
To get the values of OUT parameters use the ParamByName function.

ExampleOraSession.ExecSQL('begin :A:= :B + :C; end;', [0, 5, 3]);
A:= OraSession.ParamByName('A').AsInteger;

See Also
ExecSQLEx
ExecProc
TOraSession.SQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.9 ExecSQLEx Method

Executes any SQL statement outside the TQuery or TSQL components.

Class
TCustomDAConnection

Syntaxfunction ExecSQLEx(const Text: string; const Params: array ofvariant): variant; virtual;Parameters
Text
a SQL statement to be executed.
ParamsArray of parameter values arranged in the same order as they appear in SQL statement.
Return Value
Out parameter with the name Result will hold the result of a function having data typedtString. Otherwise returns Null.

Remarks
Call the ExecSQLEx method to execute any SQL statement outside the TQuery or TSQL
components. Supply the Params array with values arranged in pairs of parameter name andits value. This way each parameter name in the array is found on even index values whereas© 2019 Devart

331

Oracle Data Access Components

parameter value is on odd index value but right after its parameter name. The parameter pairs
must be arranged according to their occurrence in a SQL statement which itself is passed in
the Text string parameter.
The Params array must contain all IN and OUT parameters defined in the SQL statement.
For OUT parameters provide any values of valid types so that they are explicitly defined
before call to the ExecSQLEx method.
Out parameter with the name Result will hold the result of a function having data type dtString.
If neither of the parameters in the Text statement is named Result, ExecSQLEx will return
Null.
To get the values of OUT parameters use the ParamByName function.

ExampleOraConnection.ExecSQLEx('begin :A:= :B + :C; end;',['A', 0, 'B', 5, 'C', 3]);
A:= OraConnection.ParamByName('A').AsInteger;

See Also
ExecSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.10 GetDatabaseNames Method

Returns a database list from the server.

Class
TCustomDAConnection

Syntax
procedure GetDatabaseNames(List: TStrings); virtual;Parameters
List
A TStrings descendant that will be filled with database names.

Remarks
Populates a string list with the names of databases.
Note: Any contents already in the target string list object are eliminated and overwritten bydata produced by GetDatabaseNames.

© 2019 DevartReference332

See Also
GetTableNames
GetStoredProcNames© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.11 GetKeyFieldNames Method

Provides a list of available key field names.

Class
TCustomDAConnection

Syntax
procedure GetKeyFieldNames(const TableName: string; List:
TStrings); virtual;Parameters
TableName
Holds the table nameList
The list of available key field names
Return Value
Key field name

Remarks
Call the GetKeyFieldNames method to get the names of available key fields. Populates astring list with the names of key fields in tables.

See Also
GetTableNames
GetStoredProcNames© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

333

Oracle Data Access Components

5.10.1.4.3.12 GetStoredProcNames Method

Returns a list of stored procedures from the server.

Class
TCustomDAConnection

Syntax
procedure GetStoredProcNames(List: TStrings; AllProcs: boolean =False); virtual;Parameters
List
A TStrings descendant that will be filled with the names of stored procedures in the
database.
AllProcs
True, if stored procedures from all schemas or including system procudures (depending on
the server) are returned. False otherwise.

Remarks
Call the GetStoredProcNames method to get the names of available stored procedures andfunctions. GetStoredProcNames populates a string list with the names of stored procs in the
database. If AllProcs = True, the procedure returns to the List parameter the names of thestored procedures that belong to all schemas; otherwise, List will contain the names offunctions that belong to the current schema.
Note: Any contents already in the target string list object are eliminated and overwritten bydata produced by GetStoredProcNames.

See Also
GetDatabaseNames
GetTableNames© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.13 GetTableNames Method

Provides a list of available tables names.

Class
TCustomDAConnection© 2019 DevartReference

334

Syntax
procedure GetTableNames(List: TStrings; AllTables: boolean =False; OnlyTables: boolean = False); virtual;Parameters
List
A TStrings descendant that will be filled with table names.
AllTables
True, if procedure returns all table names including the names of system tables to the List
parameter.
OnlyTables

Remarks
Call the GetTableNames method to get the names of available tables. Populates a string list
with the names of tables in the database. If AllTables = True, procedure returns all tablenames including the names of system tables to the List parameter, otherwise List will notcontain the names of system tables. If AllTables = True, the procedure returns to the List
parameter the names of the tables that belong to all schemas; otherwise, List will contain thenames of the tables that belong to the current schema.
Note: Any contents already in the target string list object are eliminated and overwritten by thedata produced by GetTableNames.

See Also
GetDatabaseNames
GetStoredProcNames© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.14 MonitorMessage Method

Sends a specified message through the TCustomDASQLMonitor component.

Class
TCustomDAConnection

Syntax
procedure MonitorMessage(const Msg: string);
Parameters© 2019 Devart

335

Oracle Data Access Components

Msg
Message text that will be sent.

Remarks
Call the MonitorMessage method to output specified message via theTCustomDASQLMonitor component.

See Also
TCustomDASQLMonitor© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.15 Ping Method

Used to check state of connection to the server.

Class
TCustomDAConnection

Syntax
procedure Ping;

Remarks
The method is used for checking server connection state.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.16 RemoveFromPool Method

Marks the connection that should not be returned to the pool after disconnect.

Class
TCustomDAConnection

Syntax
procedure RemoveFromPool;

Remarks© 2019 DevartReference

336

Call the RemoveFromPool method to mark the connection that should be deleted after
disconnect instead of returning to the connection pool.

See Also
Pooling
PoolingOptions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.3.17 Rollback Method

Discards all current data changes and ends transaction.

Class
TCustomDAConnection

Syntax
procedure Rollback; virtual;

Remarks
Call the Rollback method to discard all updates, insertions, and deletions of data associatedwith the current transaction to the database server and then end the transaction. The current
transaction is the last transaction started by calling StartTransaction.

See Also
CommitStartTransaction
TOraDataSet.FetchAll© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.10.1.4.3.18 StartTransaction Method

Begins a new user transaction.

Class
TCustomDAConnection© 2019 Devart

DAC Forum

Provide Feedback

337

Oracle Data Access Components

Syntax
procedure StartTransaction; virtual;

Remarks
Call the StartTransaction method to begin a new user transaction against the databaseserver. Before calling StartTransaction, an application should check the status of the
InTransaction property. If InTransaction is True, indicating that a transaction is already inprogress, a subsequent call to StartTransaction without first calling Commit or Rollback to
end the current transaction raises EDatabaseError. Calling StartTransaction whenconnection is closed also raises EDatabaseError.
Updates, insertions, and deletions that take place after a call to StartTransaction are held by
the server until an application calls Commit to save the changes, or Rollback to cancel them.

See Also
CommitRollback
InTransaction© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.4 Events

Events of the TCustomDAConnection class.
For a complete list of the TCustomDAConnection class members, see theTCustomDAConnection Members topic.

PublicName
OnConnectionLost
OnErrorDescription
This event occurs whenconnection was lost.
This event occurs when anerror has arisen in theconnection.

See Also
TCustomDAConnection Class
TCustomDAConnection Class Members© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

338

Provide Feedback

5.10.1.4.4.1 OnConnectionLost Event

This event occurs when connection was lost.

Class
TCustomDAConnection

Syntaxproperty OnConnectionLost: TConnectionLostEvent;Remarks
Write the OnConnectionLost event handler to process fatal errors and perform failover.
Note: To use the OnConnectionLost event handler, you should explicitly add the MemData
unit to the 'uses' list and set the TCustomDAConnection.Options.LocalFailover property to
True.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.4.4.2 OnError Event

This event occurs when an error has arisen in the connection.

Class
TCustomDAConnection

Syntaxproperty OnError: TDAConnectionErrorEvent;Remarks
Write the OnError event handler to respond to errors that arise with connection. Check the Eparameter to get the error code. Set the Fail parameter to False to prevent an error dialog
from being displayed and to raise the EAbort exception to cancel current operation. The
default value of Fail is True.

© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

339

Oracle Data Access Components

5.10.1.5 TCustomDADataSet Class

Encapsulates general set of properties, events, and methods for working with data accessed
through various database engines.
For a list of all members of this type, see TCustomDADataSet members.

Unit
DBAccess

SyntaxTCustomDADataSet = class(TMemDataSet);

Remarks
TCustomDADataSet encapsulates general set of properties, events, and methods for working
with data accessed through various database engines. All database-specific features aresupported by descendants of TCustomDADataSet.
Applications should not use TCustomDADataSet objects directly.

Inheritance Hierarchy
TMemDataSet
TCustomDADataSet© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.1 Members

TCustomDADataSet class overview.

Properties
Name
BaseSQL

CachedUpdates (inherited from TMemDataSet)
Conditions

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to add WHERE
conditions to a query© 2019 DevartReference

Connection
DataTypeMap
Debug

DetailFields

Disconnected

FetchRows

FilterSQL

FinalSQL

IndexFieldNames (inherited from TMemDataSet)
IsQuery
KeyExclusive (inherited from TMemDataSet)

KeyFields

LocalConstraints (inherited from TMemDataSet)© 2019 Devart

340

Used to specify aconnection object to use toconnect to a data store.
Used to set data typemapping rules
Description is not available
at the moment.
Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Used to check whether SQL
statement returns rows.
Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating the database.
Used to avoid setting theRequired property of a

341

Oracle Data Access Components

LocalUpdate (inherited from TMemDataSet)

MacroCount
MacrosMasterFields

MasterSource

Options

ParamCheck

ParamCount

Params
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly

TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to specify the
behaviour ofTCustomDADataSet object.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.
Used to view and set
parameter names, values,
and data types dynamically.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.

© 2019 DevartReference

RefreshOptions

RowsAffected

SQL

SQLDelete

SQLInsert

SQLLock

SQLRecCountSQLRefresh

SQLUpdate

UniDirectional

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)© 2019 Devart

342

Used to indicate when theediting record is refreshed.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

343

Oracle Data Access Components

Methods
Name
AddWhere
ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)
BreakExec
CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)

CommitUpdates (inherited from TMemDataSet)

CreateBlobStream

DeferredPost (inherited from TMemDataSet)

DeleteWhere

EditRangeEnd (inherited from TMemDataSet)

EditRangeStart (inherited from TMemDataSet)

ExecuteDescription
Adds condition to the
WHERE clause of SELECT
statement in the SQL
property.
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
statement on the server.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.
Clears the cached updates
buffer.
Used to obtain a stream forreading data from or writing
data to a BLOB field,
specified by the Field
parameter.
Makes permanent changes
to the database server.
Removes WHERE clausefrom the SQL property andassigns the BaseSQL
property.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Overloaded. Executes a
SQL statement on theserver.

© 2019 DevartReference

Executing

FetchedFetching

FetchingAll

FindKey
FindMacro

FindNearest

FindParam

GetBlob (inherited from TMemDataSet)

GetDataType
GetFieldObject
GetFieldPrecision
GetFieldScale
GetKeyFieldNames
GetOrderBy© 2019 Devart

344

Indicates whether SQL
statement is still being
executed.
Used to learn whether
TCustomDADataSet has
already fetched all rows.
Used to learn whether
TCustomDADataSet is still
fetching rows.
Used to learn whether
TCustomDADataSet isfetching all rows to the end.
Searches for a record whichcontains specified fieldvalues.
Description is not available
at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset thatmatches or is greater thanthe values specified in the
KeyValues parameter.
Determines if a parameterwith the specified nameexists in a dataset.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Returns internal field types
defined in the MemData andaccompanying modules.
Returns a multireference
shared object from field.
Retrieves the precision of anumber field.
Retrieves the scale of anumber field.
Provides a list of available
key field names.
Retrieves an ORDER BY
clause from a SQL

345

Oracle Data Access Components

GotoCurrent

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock
MacroByName

ParamByName

PrepareRefreshRecord
RestoreSQL
RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveSQL

SaveToXML (inherited from TMemDataSet)

SetOrderBystatement.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Sets or uses parameter
information for a specificparameter based on its
name.
Allocates, opens, andparses cursor for a query.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
© 2019 DevartReference

SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

SQLSaved
UnLock
UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

346

Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

EventsName
AfterExecute
AfterFetch
AfterUpdateExecute
BeforeFetch© 2019 Devart

Description
Occurs after a component
has executed a query todatabase.
Occurs after dataset finishes
fetching data from server.
Occurs after executing
insert, delete, update, lockand refresh operations.
Occurs before dataset is347

Oracle Data Access Components

BeforeUpdateExecute

OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

going to fetch block ofrecords from the server.
Occurs before executing
insert, delete, update, lock,and refresh operations.
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Provide Feedback

5.10.1.5.2 Properties

Properties of the TCustomDADataSet class.
For a complete list of the TCustomDADataSet class members, see the TCustomDADataSet
Members topic.

PublicName
BaseSQL

CachedUpdates (inherited from TMemDataSet)
Conditions
Connection
DataTypeMap
Debug
DetailFields

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to set data typemapping rules
Description is not available
at the moment.
Used to specify the fields
that correspond to theforeign key fields from© 2019 DevartReference

Disconnected

FetchRows

FilterSQL

FinalSQL

IndexFieldNames (inherited from TMemDataSet)
IsQuery
KeyExclusive (inherited from TMemDataSet)

KeyFields

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

MacroCount
Macros© 2019 Devart

348

MasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Used to check whether SQL
statement returns rows.
Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating the database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change

349

Oracle Data Access Components

MasterFields

MasterSource

Options

ParamCheck

ParamCount

Params
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly
RefreshOptions

RowsAffected

SQL

SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to specify the
behaviour ofTCustomDADataSet object.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.
Used to view and set
parameter names, values,
and data types dynamically.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.
Used to indicate when theediting record is refreshed.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.

© 2019 DevartReference

SQLDelete

SQLInsert

SQLLock

SQLRecCountSQLRefresh

SQLUpdate

UniDirectional

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

350

Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

See Also
TCustomDADataSet Class
TCustomDADataSet Class Members© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

351

Oracle Data Access Components

5.10.1.5.2.1 BaseSQL Property

Used to return SQL text without any changes performed by AddWhere, SetOrderBy, andFilterSQL.

Class
TCustomDADataSet

Syntaxproperty BaseSQL: string;

Remarks
Use the BaseSQL property to return SQL text without any changes performed by AddWhere,
SetOrderBy, and FilterSQL, only macros are expanded. SQL text with all these changes canbe returned by FinalSQL.

See Also
FinalSQL
AddWhere
SaveSQLSQLSaved
RestoreSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.2 Conditions Property

Used to add WHERE conditions to a queryClass
TCustomDADataSet

Syntaxproperty Conditions: TDAConditions stored False;

See Also
TDAConditions© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference352

Reserved.
5.10.1.5.2.3 Connection Property

Used to specify a connection object to use to connect to a data store.

Class
TCustomDADataSet

Syntaxproperty Connection: TCustomDAConnection;

Remarks
Use the Connection property to specify a connection object that will be used to connect to adata store.
Set at design-time by selecting from the list of provided TCustomDAConnection or its
descendant class objects.
At runtime, link an instance of a TCustomDAConnection descendant to the Connection
property.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.4 DataTypeMap Property

Used to set data type mapping rules

Class
TCustomDADataSet

Syntaxproperty DataTypeMap: TDAMapRules stored IsMapRulesStored;

See Also
TDAMapRules© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

353

Oracle Data Access Components

5.10.1.5.2.5 Debug Property

Class
TCustomDADataSet

Syntaxproperty Debug: boolean default False;

Remarks
Set the Debug property to True to display executing statement and all its parameters' values.
Also displays the type of parameters. Note: To enable debug window you should explicitly
include the OdacVcl unit to your project. If TOraSQLMonitor is used in the project and the
TOraSQLMonitor.Active property is set to False, the debug window is not displayed.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.6 DetailFields Property

Used to specify the fields that correspond to the foreign key fields from MasterFields whenbuilding master/detail relationship.

Class
TCustomDADataSet

Syntaxproperty DetailFields: string;

Remarks
Use the DetailFields property to specify the fields that correspond to the foreign key fields
from MasterFields when building master/detail relationship. DetailFields is a string containing
one or more field names in the detail table. Separate field names with semicolons.
Use Field Link Designer to set the value in design time.

See Also
MasterFields
MasterSource© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference354

Reserved.
5.10.1.5.2.7 Disconnected Property

Used to keep dataset opened after connection is closed.

Class
TCustomDADataSet

Syntaxproperty Disconnected: boolean;

Remarks
Set the Disconnected property to True to keep dataset opened after connection is closed.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.8 FetchRow s Property

Used to define the number of rows to be transferred across the network at the same time.

Class
TCustomDADataSet

Syntaxproperty FetchRows: integer default 25;

Remarks
The number of rows that will be transferred across the network at the same time. This
property can have a great impact on performance. So it is preferable to choose the optimalvalue of the FetchRows property for each SQL statement and software/hardware
configuration experimentally.
The default value is 25.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

355

Oracle Data Access Components

5.10.1.5.2.9 FilterSQL Property

Used to change the WHERE clause of SELECT statement and reopen a query.

Class
TCustomDADataSet

Syntaxproperty FilterSQL: string;

Remarks
The FilterSQL property is similar to the Filter property, but it changes the WHERE clause of
SELECT statement and reopens query. Syntax is the same to the WHERE clause.
Note: the FilterSQL property adds a value to the WHERE condition as is. If you expect thisvalue to be enclosed in brackets, you should bracket it explicitly.

ExampleQuery1.FilterSQL := 'Dept >= 20 and DName LIKE ''M%''';

See Also
AddWhere© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.10 FinalSQL Property

Used to return SQL text with all changes performed by AddWhere, SetOrderBy, andFilterSQL, and with expanded macros.

Class
TCustomDADataSet

Syntaxproperty FinalSQL: string;

Remarks
Use FinalSQL to return SQL text with all changes performed by AddWhere, SetOrderBy, andFilterSQL, and with expanded macros. This is the exact statement that will be passed on to
the database server.
© 2019 DevartReference

356

See Also
FinalSQL
AddWhere
SaveSQLSQLSaved
RestoreSQLBaseSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.11 IsQuery Property

Used to check whether SQL statement returns rows.

Class
TCustomDADataSet

Syntaxproperty IsQuery: boolean;

Remarks
After the TCustomDADataSet component is prepared, the IsQuery property returns True if
SQL statement is a SELECT query.
Use the IsQuery property to check whether the SQL statement returns rows or not.
IsQuery is a read-only property. Reading IsQuery on unprepared dataset raises an exception.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.12 KeyFields Property

Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties ifthey were empty before updating the database.

Class
TCustomDADataSet

Syntax© 2019 Devart

357

Oracle Data Access Components

property KeyFields: string;

Remarks
TCustomDADataset uses the KeyFields property to build SQL statements for the SQLDelete,
SQLInsert, and SQLUpdate properties if they were empty before updating the database. For
this feature KeyFields may hold a list of semicolon-delimited field names. If KeyFields is notdefined before opening a dataset, TCustomDADataset requests information about primarykeys from server sending an additional query.
Assign the KeyFields property with a string containing the name of a field which will be later
assigned with Oracle sequenced values. Beforehand Oracle sequence must be created andits name passed to the TOraDataSet.KeySequence property.
Sequences are generated when either Insert or Post method is called. Which of these two
methods is used to modify the database is determined by the TOraDataSet.SequenceMode
property.
Note: Though keys may be created across a number of table fields, sequence is generated
only for the first field found in the KeyFields property.

See Also
SQLDelete
SQLInsert
SQLRefresh
SQLUpdate
TOraDataSet.KeySequence
TOraDataSet.SequenceMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.13 MacroCount Property

Used to get the number of macros associated with the Macros property.

Class
TCustomDADataSet

Syntaxproperty MacroCount: word;

Remarks© 2019 DevartReference358

Use the MacroCount property to get the number of macros associated with the Macrosproperty.

See Also
Macros© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.14 Macros Property

Makes it possible to change SQL queries easily.

Class
TCustomDADataSet

Syntaxproperty Macros: TMacros stored False;

Remarks
With the help of macros you can easily change SQL query text at design- or runtime. Marcos
extend abilities of parameters and allow to change conditions in a WHERE clause or sortorder in an ORDER BY clause. You just insert &MacroName in the SQL query text andchange value of macro in the Macro property editor at design time or call the MacroByName
function at run time. At the time of opening the query macro is replaced by its value.

ExampleOraQuery.SQL:= 'SELECT * FROM Dept ORDER BY &Order';
OraQuery.MacroByName('Order').Value:= 'DeptNo';
OraQuery.Open;

See Also
TMacroMacroByName
Params© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

359

Oracle Data Access Components

5.10.1.5.2.15 MasterFields Property

Used to specify the names of one or more fields that are used as foreign keys for dataset
when establishing detail/master relationship between it and the dataset specified in
MasterSource.

Class
TCustomDADataSet

Syntaxproperty MasterFields: string;

Remarks
Use the MasterFields property after setting the MasterSource property to specify the names of
one or more fields that are used as foreign keys for this dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterFields is a string containing one or more field names in the master table. Separate fieldnames with semicolons.
Each time the current record in the master table changes, the new values in these fields areused to select corresponding records in this table for display.
Use Field Link Designer to set the values at design time after setting the MasterSource
property.

See Also
DetailFields
MasterSource
Master/Detail Relationships© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.16 MasterSource Property

Used to specify the data source component which binds current dataset to the master one.

Class
TCustomDADataSet

Syntaxproperty MasterSource: TDataSource;© 2019 DevartReference

360

Remarks
The MasterSource property specifies the data source component which binds current dataset
to the master one.
TCustomDADataset uses MasterSource to extract foreign key fields values from the masterdataset when building master/detail relationship between two datasets. MasterSource must
point to another dataset; it cannot point to this dataset component.
When MasterSource is not nil dataset fills parameter values with corresponding field values
from the current record of the master dataset.
Note: Do not set the DataSource property when building master/detail relationships. Although
it points to the same object as the MasterSource property, it may lead to undesirable results.

See Also
MasterFields
DetailFields
Master/Detail Relationships© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.17 Options Property

Used to specify the behaviour of TCustomDADataSet object.

Class
TCustomDADataSet

Syntaxproperty Options: TDADataSetOptions;Remarks
Set the properties of Options to specify the behaviour of a TCustomDADataSet object.
Descriptions of all options are in the table below.

Option Name
AutoPrepare
CacheCalcFields© 2019 Devart

Description
Used to execute automatic Prepare on thequery execution.
Used to enable caching of the
TField.Calculated and TField.Lookup
fields.

361

Oracle Data Access Components

CompressBlobMode
DefaultValues

DetailDelay

FieldsOrigin
FlatBuffers
InsertAllSetFields

LocalMasterDetail

LongStrings

MasterFieldsNullable

NumberRange

QueryRecCount

QuoteNames
RemoveOnRefresh
RequiredFields
ReturnParams

Used to store values of the BLOB fields incompressed form.
Used to request default values/expressions
from the server and assign them to theDefaultExpression property.
Used to get or set a delay in milliseconds
before refreshing detail dataset whilenavigating master dataset.
Used for TCustomDADataSet to fill theOrigin property of the TField objects byappropriate value when opening a dataset.
Used to control how a dataset treats dataof the ftString and ftVarBytes fields.
Used to include all set dataset fields in thegenerated INSERT statement
Used for TCustomDADataSet to use local
filtering to establish master/detail
relationship for detail dataset and does notrefer to the server.
Used to represent string fields with thelength that is greater than 255 as
TStringField.
Allows to use NULL values in the fields bywhich the relation is built, when generating
the query for the Detail tables (when thisoption is enabled, the performance can getworse).
Used to set the MaxValue and MinValue
properties of TIntegerField and TFloatField
to appropriate values.
Used for TCustomDADataSet to perform
additional query to get the record count forthis SELECT, so the RecordCount property
reflects the actual number of records.
Used for TCustomDADataSet to quote all
database object names in autogenerated
SQL statements such as update SQL.
Used for a dataset to locally remove a
record that can not be found on the server.
Used for TCustomDADataSet to set theRequired property of the TField objects for
the NOT NULL fields.
Used to return the new value of fields todataset after insert or update.
© 2019 DevartReference

362

Used for a dataset to set the ReadOnly
property to True for all fields that do notbelong to UpdatingTable or can not be
updated.
Used for TCustomDADataSet to raise an
exception when the number of updated ordeleted records is not equal 1.
Specifies whether to discard all trailingspaces in the string fields of a dataset.
Used to include all dataset fields in thegenerated UPDATE and INSERT
statements.
Used to get or set a value that enables ordisables batch processing support, andspecifies the number of commands thatcan be executed in a batch.

SetFieldsReadOnly

StrictUpdate
TrimFixedChar
UpdateAllFields

UpdateBatchSize

See Also
Master/Detail Relationships
TMemDataSet.CachedUpdates© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.18 ParamCheck Property

Used to specify whether parameters for the Params property are generated automaticallyafter the SQL property was changed.

Class
TCustomDADataSet

Syntaxproperty ParamCheck: boolean default True;

Remarks
Use the ParamCheck property to specify whether parameters for the Params property are
generated automatically after the SQL property was changed.
Set ParamCheck to True to let dataset automatically generate the Params property for thedataset based on a SQL statement.
Setting ParamCheck to False can be used if the dataset component passes to a server the© 2019 Devart

363

Oracle Data Access Components

DDL statements that contain, for example, declarations of stored procedures whichthemselves will accept parameterized values. The default value is True.

See Also
Params© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.19 ParamCount Property

Used to indicate how many parameters are there in the Params property.

Class
TCustomDADataSet

Syntaxproperty ParamCount: word;

Remarks
Use the ParamCount property to determine how many parameters are there in the Params
property.

See Also
Params© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.20 Params Property

Used to view and set parameter names, values, and data types dynamically.

Class
TCustomDADataSet

Syntaxproperty Params: TDAParams stored False;

Remarks
Contains the parameters for a query's SQL statement.
© 2019 DevartReference

364

Access Params at runtime to view and set parameter names, values, and data types
dynamically (at design time use the Parameters editor to set the parameter information).
Params is a zero-based array of parameter records. Index specifies the array element toaccess.
An easier way to set and retrieve parameter values when the name of each parameter isknown is to call ParamByName.

See Also
ParamByName
Macros© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.21 ReadOnly Property

Used to prevent users from updating, inserting, or deleting data in the dataset.

Class
TCustomDADataSet

Syntaxproperty ReadOnly: boolean default False;

Remarks
Use the ReadOnly property to prevent users from updating, inserting, or deleting data in thedataset. By default, ReadOnly is False, meaning that users can potentially alter data stored in
the dataset.
To guarantee that users cannot modify or add data to a dataset, set ReadOnly to True.
When ReadOnly is True, the dataset's CanModify property is False.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.5.2.22 RefreshOptions Property

Used to indicate when the editing record is refreshed.

Class
TCustomDADataSet© 2019 Devart

Provide Feedback365

Oracle Data Access Components

Syntaxproperty RefreshOptions: TRefreshOptions default [];Remarks
Use the RefreshOptions property to determine when the editing record is refreshed.
Refresh is performed by the RefreshRecord method.
It queries the current record and replaces one in the dataset. Refresh record is useful when
the table has triggers or the table fields have default values. Use roBeforeEdit to get actual
data before editing.
The default value is [].

See Also
RefreshRecord© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.23 Row sAffected Property

Used to indicate the number of rows which were inserted, updated, or deleted during the lastquery operation.

Class
TCustomDADataSet

Syntaxproperty RowsAffected: integer;

Remarks
Check RowsAffected to determine how many rows were inserted, updated, or deleted during
the last query operation. If RowsAffected is -1, the query has not inserted, updated, or deleted
any rows.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.24 SQL Property

Used to provide a SQL statement that a query component executes when its Open method iscalled.
© 2019 DevartReference

366

Class
TCustomDADataSet

Syntaxproperty SQL: TStrings;

Remarks
Use the SQL property to provide a SQL statement that a query component executes when its
Open method is called. At the design time the SQL property can be edited by invoking theString List editor in Object Inspector.
When SQL is changed, TCustomDADataSet calls Close and UnPrepare.

See Also
SQLInsert
SQLUpdate
SQLDelete
SQLRefresh© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.25 SQLDelete Property

Used to specify a SQL statement that will be used when applying a deletion to a record.

Class
TCustomDADataSet

Syntaxproperty SQLDelete: TStrings;

Remarks
Use the SQLDelete property to specify the SQL statement that will be used when applying adeletion to a record. Statements can be parameterized queries.
To create a SQLDelete statement at design-time, use the query statements editor.

Example
DELETE FROM Orders© 2019 Devart

367

Oracle Data Access Components

WHERE
OrderID = :Old_OrderID

See Also
SQL
SQLInsert
SQLUpdate
SQLRefresh© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.26 SQLInsert Property

Used to specify the SQL statement that will be used when applying an insertion to a dataset.

Class
TCustomDADataSet

Syntaxproperty SQLInsert: TStrings;

Remarks
Use the SQLInsert property to specify the SQL statement that will be used when applying an
insertion to a dataset. Statements can be parameterized queries. Names of the parameters
should be the same as field names. Parameters prefixed with OLD_ allow using current
values of fields prior to the actual operation.
Use ReturnParam to return OUT parameters back to dataset.
To create a SQLInsert statement at design-time, use the query statements editor.

See Also
SQL
SQLUpdate
SQLDelete
SQLRefresh© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference368

5.10.1.5.2.27 SQLLock Property

Used to specify a SQL statement that will be used to perform a record lock.

Class
TCustomDADataSet

Syntaxproperty SQLLock: TStrings;

Remarks
Use the SQLLock property to specify a SQL statement that will be used to perform a record
lock. Statements can be parameterized queries. Names of the parameters should be thesame as field names. The parameters prefixed with OLD_ allow to use current values offields prior to the actual operation.
To create a SQLLock statement at design-time, the use query statement editor.

See Also
SQL
SQLInsert
SQLUpdate
SQLDelete
SQLRefresh© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.28 SQLRecCount Property

Used to specify the SQL statement that is used to get the record count when opening adataset.

Class
TCustomDADataSet

Syntaxproperty SQLRecCount: TStrings;

Remarks© 2019 Devart

369

Oracle Data Access Components

Use the SQLRecCount property to specify the SQL statement that is used to get the record
count when opening a dataset. The SQL statement is used if the
TDADataSetOptions.QueryRecCount property is True, and the TCustomDADataSet.FetchAll
property is False. Is not used if the FetchAll property is True.
To create a SQLRecCount statement at design-time, use the query statements editor.

See Also
SQLInsert
SQLUpdate
SQLDelete
SQLRefresh
TDADataSetOptions
M:Devart.Dac.TCustomDADataSet.FetchingAll© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.29 SQLRefresh Property

Used to specify a SQL statement that will be used to refresh current record by calling theRefreshRecord procedure.

Class
TCustomDADataSet

Syntaxproperty SQLRefresh: TStrings;

Remarks
Use the SQLRefresh property to specify a SQL statement that will be used to refresh current
record by calling the RefreshRecord procedure.
Different behavior is observed when the SQLRefresh property is assigned with a single
WHERE clause that holds frequently altered search condition. In this case the WHERE
clause from SQLRefresh is combined with the same clause of the SELECT statement in a
SQL property and this final query is then sent to the database server.
To create a SQLRefresh statement at design-time, use the query statements editor.

ExampleSELECT Shipname FROM Orders© 2019 DevartReference

370

WHERE
OrderID = :OrderID

See Also
RefreshRecord
SQL
SQLInsert
SQLUpdate
SQLDelete© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.30 SQLUpdate Property

Used to specify a SQL statement that will be used when applying an update to a dataset.

Class
TCustomDADataSet

Syntaxproperty SQLUpdate: TStrings;

Remarks
Use the SQLUpdate property to specify a SQL statement that will be used when applying an
update to a dataset. Statements can be parameterized queries. Names of the parameters
should be the same as field names. The parameters prefixed with OLD_ allow to use current
values of fields prior to the actual operation.
Use ReturnParam to return OUT parameters back to the dataset.
To create a SQLUpdate statement at design-time, use the query statement editor.

ExampleUPDATE Orders
set
ShipName = :ShipName
WHERE
OrderID = :Old_OrderID

See Also
SQL
SQLInsert© 2019 Devart

371

Oracle Data Access Components

SQLDelete
SQLRefresh© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.2.31 UniDirectional Property

Used if an application does not need bidirectional access to records in the result set.

Class
TCustomDADataSet

Syntaxproperty UniDirectional: boolean default False;

Remarks
Traditionally SQL cursors are unidirectional. They can travel only forward through a dataset.
TCustomDADataset, however, permits bidirectional travelling by caching records. If an
application does not need bidirectional access to the records in the result set, set
UniDirectional to True. When UniDirectional is True, an application requires less memory andperformance is improved. However, UniDirectional datasets cannot be modified. In
FetchAll=False mode data is fetched on demand. When UniDirectional is set to True, data is
fetched on demand as well, but obtained rows are not cached except for the current row. In
case if the Unidirectional property is True, the FetchAll property will be automatically set to
False. And if the FetchAll property is True, the Unidirectional property will be automatically set
to False. The default value of UniDirectional is False, enabling forward and backward
navigation.
Note: Pay attention to the specificity of using the FetchAll property=False

See Also
TOraDataSet.FetchAll© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3 Methods

Methods of the TCustomDADataSet class.
For a complete list of the TCustomDADataSet class members, see the TCustomDADataSet
Members topic.
© 2019 DevartReference

372

PublicName
AddWhere
ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)
BreakExec
CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)

CommitUpdates (inherited from TMemDataSet)

CreateBlobStream

DeferredPost (inherited from TMemDataSet)

DeleteWhere

EditRangeEnd (inherited from TMemDataSet)

EditRangeStart (inherited from TMemDataSet)

Execute© 2019 Devart

Description
Adds condition to the
WHERE clause of SELECT
statement in the SQL
property.
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
statement on the server.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.
Clears the cached updates
buffer.
Used to obtain a stream forreading data from or writing
data to a BLOB field,
specified by the Field
parameter.
Makes permanent changes
to the database server.
Removes WHERE clausefrom the SQL property andassigns the BaseSQL
property.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Overloaded. Executes a
SQL statement on theserver.

373

Oracle Data Access Components

Executing

FetchedFetching

FetchingAll

FindKey
FindMacro

FindNearest

FindParam

GetBlob (inherited from TMemDataSet)

GetDataType
GetFieldObject
GetFieldPrecision
GetFieldScale
GetKeyFieldNames
GetOrderBy

Indicates whether SQL
statement is still being
executed.
Used to learn whether
TCustomDADataSet has
already fetched all rows.
Used to learn whether
TCustomDADataSet is still
fetching rows.
Used to learn whether
TCustomDADataSet isfetching all rows to the end.
Searches for a record whichcontains specified fieldvalues.
Description is not available
at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset thatmatches or is greater thanthe values specified in the
KeyValues parameter.
Determines if a parameterwith the specified nameexists in a dataset.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Returns internal field types
defined in the MemData andaccompanying modules.
Returns a multireference
shared object from field.
Retrieves the precision of anumber field.
Retrieves the scale of anumber field.
Provides a list of available
key field names.
Retrieves an ORDER BY
clause from a SQL© 2019 DevartReference

GotoCurrent

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock
MacroByName

ParamByName

PrepareRefreshRecord
RestoreSQL
RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveSQL

SaveToXML (inherited from TMemDataSet)

SetOrderBy© 2019 Devart

374

statement.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Sets or uses parameter
information for a specificparameter based on its
name.
Allocates, opens, andparses cursor for a query.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.

375

Oracle Data Access Components

SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

SQLSaved
UnLock
UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

See Also
TCustomDADataSet Class
TCustomDADataSet Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.1 AddWhere Method

Adds condition to the WHERE clause of SELECT statement in the SQL property.

Class© 2019 DevartReference

376

TCustomDADataSet

Syntax
procedure AddWhere(const Condition: string);
Parameters
Condition
Holds the condition that will be added to the WHERE clause.

Remarks
Call the AddWhere method to add a condition to the WHERE clause of SELECT statement in
the SQL property.
If SELECT has no WHERE clause, AddWhere creates it.
Note: the AddWhere method is implicitly called by RefreshRecord. The AddWhere method
works for the SELECT statements only.
Note: the AddWhere method adds a value to the WHERE condition as is. If you expect thisvalue to be enclosed in brackets, you should bracket it explicitly.

See Also
DeleteWhere© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.2 BreakExec Method

Breaks execution of a SQL statement on the server.

Class
TCustomDADataSet

Syntax
procedure BreakExec; virtual;

Remarks
Call the BreakExec method to break execution of a SQL statement on the server. Usefulwhen TOraDataSet.NonBlocking is True.
There are some notions to keep in mind when using this procedure:
execution of the PL/SQL block cannot be interrupted by BreakExec;© 2019 Devart377

Oracle Data Access Components

calling BreakExec to interrupt dataset opening in the TOraDataSet.NonBlocking mode may
not have effect if a fetch operation has already begun (this happens when BreakExec falls
between two fetch operations).

See Also
TCustomDADataSet.Execute
TOraDataSet.NonBlocking© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.3 CreateBlobStream Method

Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the
Field parameter.

Class
TCustomDADataSet

Syntaxfunction CreateBlobStream(Field: TField; Mode: TBlobStreamMode):
TStream; override;
Parameters
Field
Holds the BLOB field for reading data from or writing data to from a stream.
Mode
Holds the stream mode, for which the stream will be used.
Return Value
The BLOB Stream.

Remarks
Call the CreateBlobStream method to obtain a stream for reading data from or writing data toa BLOB field, specified by the Field parameter. It must be a TBlobField component. You canspecify whether the stream will be used for reading, writing, or updating the contents of the
field with the Mode parameter.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

378

5.10.1.5.3.4 DeleteWhere Method

Removes WHERE clause from the SQL property and assigns the BaseSQL property.

Class
TCustomDADataSet

Syntax
procedure DeleteWhere;

Remarks
Call the DeleteWhere method to remove WHERE clause from the the SQL property andassign BaseSQL.

See Also
AddWhere
BaseSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.5 Execute Method

Executes a SQL statement on the server.

Class
TCustomDADataSet

Overload List
Name
ExecuteExecute(Iters: integer; Offset: integer)© 1997-2019
Request Support
Devart. All Rights
Reserved.
Executes a SQL statement on the server.

Class
TCustomDADataSet© 2019 Devart

Description
Executes a SQL statement on the server.
Used to perform Batch operations .
DAC Forum

Provide Feedback

379

Oracle Data Access Components

Syntax
procedure Execute; overload; virtual;

Remarks
Call the Execute method to execute an SQL statement on the server. If SQL statement is a
SELECT query, Execute calls the Open method.
Execute implicitly prepares SQL statement by calling the TCustomDADataSet.Prepare
method if the TCustomDADataSet.Options option is set to True and the statement has notbeen prepared yet. To speed up the performance in case of multiple Execute calls, anapplication should call Prepare before calling the Execute method for the first time.

See Also
TCustomDADataSet.AfterExecute
TCustomDADataSet.Executing
TCustomDADataSet.Prepare© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Used to perform Batch operations .

Class
TCustomDADataSet

Syntax
procedure Execute(Iters: integer; Offset: integer = 0); overload;
virtual;Parameters
Iters
Specifies the number of inserted rows.
OffsetPoints the array element, which the Batch operation starts from. 0 by default.

Remarks
The Execute method executes the specified batch SQL query. See the Batch operations
article for samples.

© 2019 DevartReference380

See Also
Batch operations© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.6 Executing Method

Indicates whether SQL statement is still being executed.

Class
TCustomDADataSet

Syntaxfunction Executing: boolean;
Return Value
True, if SQL statement is still being executed.

Remarks
Check Executing to learn whether TCustomDADataSet is still executing SQL statement. Use
the Executing method if NonBlocking is True.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.7 Fetched Method

Used to learn whether TCustomDADataSet has already fetched all rows.

Class
TCustomDADataSet

Syntaxfunction Fetched: boolean; virtual;
Return Value
True, if all rows are fetched.

Remarks
Check Fetched to learn whether TCustomDADataSet has already fetched all rows.
© 2019 Devart

381

Oracle Data Access Components

See Also
Fetching© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.8 Fetching Method

Used to learn whether TCustomDADataSet is still fetching rows.

Class
TCustomDADataSet

Syntaxfunction Fetching: boolean;
Return Value
True, if TCustomDADataSet is still fetching rows.

Remarks
Check Fetching to learn whether TCustomDADataSet is still fetching rows. Use the Fetching
method if NonBlocking is True.

See Also
Executing© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.9 FetchingAll Method

Used to learn whether TCustomDADataSet is fetching all rows to the end.

Class
TCustomDADataSet

Syntaxfunction FetchingAll: boolean;
Return Value
True, if TCustomDADataSet is fetching all rows to the end.
© 2019 DevartReference

382

Remarks
Check FetchingAll to learn whether TCustomDADataSet is fetching all rows to the end.

See Also
Executing© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.10 FindKey Method

Searches for a record which contains specified field values.

Class
TCustomDADataSet

Syntaxfunction FindKey(const KeyValues: array of System.TVarRec):
Boolean;Parameters
KeyValues
Holds a key.

Remarks
Call the FindKey method to search for a specific record in a dataset. KeyValues holds a
comma-delimited array of field values, that is called a key.
This function is provided for BDE compatibility only. It is recommended to use functions
TMemDataSet.Locate and TMemDataSet.LocateEx for the record search.

© 1997-2019
Devart. All Rights
Reserved.
5.10.1.5.3.11 FindMacro Method

Class
TCustomDADataSet

Syntax© 2019 Devart

Request Support

DAC Forum

Provide Feedback

383

Oracle Data Access Components

function FindMacro(const Value: string): TMacro;Parameters
Value

See Also
TMacroMacrosMacroByName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.12 FindNearest Method

Moves the cursor to a specific record or to the first record in the dataset that matches or isgreater than the values specified in the KeyValues parameter.

Class
TCustomDADataSet

Syntax
procedure FindNearest(const KeyValues: array of System.TVarRec);
Parameters
KeyValues
Holds the values of the record key fields to which the cursor should be moved.

Remarks
Call the FindNearest method to move the cursor to a specific record or to the first record in
the dataset that matches or is greater than the values specified in the KeyValues parameter. If
there are no records that match or exceed the specified criteria, the cursor will not move.
This function is provided for BDE compatibility only. It is recommended to use functions
TMemDataSet.Locate and TMemDataSet.LocateEx for the record search.

See Also
TMemDataSet.Locate
TMemDataSet.LocateEx
FindKey© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference384

Devart. All Rights
Reserved.
5.10.1.5.3.13 FindParam Method

Determines if a parameter with the specified name exists in a dataset.

Class
TCustomDADataSet

Syntaxfunction FindParam(const Value: string): TDAParam;
Parameters
Value
Holds the name of the param for which to search.
Return Valuethe TDAParam object for the specified Name. Otherwise it returns nil.

Remarks
Call the FindParam method to determine if a specified param component exists in a dataset.
Name is the name of the param for which to search. If FindParam finds a param with amatching name, it returns a TDAParam object for the specified Name. Otherwise it returns
nil.

See Also
ParamsParamByName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.14 GetDataType Method

Returns internal field types defined in the MemData and accompanying modules.

Class
TCustomDADataSet

Syntaxfunction GetDataType(const FieldName: string): integer; virtual;© 2019 Devart

385

Oracle Data Access Components

Parameters
FieldName
Holds the name of the field.
Return Value
internal field types defined in MemData and accompanying modules.

Remarks
Call the GetDataType method to return internal field types defined in the MemData andaccompanying modules. Internal field data types extend the TFieldType type of VCL by
specific database server data types. For example, ftString, ftFile, ftObject.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.15 GetFieldObject Method

Returns a multireference shared object from field.

Class
TCustomDADataSet

Syntaxfunction GetFieldObject(Field: TField): TSharedObject;
overload;function GetFieldObject(Field: TField; RecBuf:
TRecordBuffer): TSharedObject; overload;function
GetFieldObject(FieldDesc: TFieldDesc): TSharedObject;
overload;function GetFieldObject(FieldDesc: TFieldDesc; RecBuf:
TRecordBuffer): TSharedObject; overload;function
GetFieldObject(const FieldName: string): TSharedObject; overload;
Parameters
FieldName
Holds the field name.
Return Value
multireference shared object.

Remarks
Call the GetFieldObject method to return a multireference shared object from field. If field
does not hold one of the TSharedObject descendants, GetFieldObject raises an exception.

© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

386

Reserved.
5.10.1.5.3.16 GetFieldPrecision Method

Retrieves the precision of a number field.

Class
TCustomDADataSet

Syntaxfunction GetFieldPrecision(const FieldName: string): integer;
Parameters
FieldName
Holds the existing field name.
Return Value
precision of number field.

Remarks
Call the GetFieldPrecision method to retrieve the precision of a number field. FieldName is thename of an existing field.

See Also
GetFieldScale© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.17 GetFieldScale Method

Retrieves the scale of a number field.

Class
TCustomDADataSet

Syntaxfunction GetFieldScale(const FieldName: string): integer;
Parameters
FieldName
Holds the existing field name.
Return Value© 2019 Devart

387

Oracle Data Access Components

the scale of the number field.

Remarks
Call the GetFieldScale method to retrieve the scale of a number field. FieldName is the nameof an existing field.

See Also
GetFieldPrecision© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.18 GetKeyFieldNames Method

Provides a list of available key field names.

Class
TCustomDADataSet

Syntax
procedure GetKeyFieldNames(List: TStrings);
Parameters
List
The list of available key field names
Return Value
Key field name

Remarks
Call the GetKeyFieldNames method to get the names of available key fields. Populates astring list with the names of key fields in tables.

See Also
TCustomDAConnection.GetTableNames
TCustomDAConnection.GetStoredProcNames© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

388

5.10.1.5.3.19 GetOrderBy Method

Retrieves an ORDER BY clause from a SQL statement.

Class
TCustomDADataSet

Syntaxfunction GetOrderBy: string;
Return Valuean ORDER BY clause from the SQL statement.

Remarks
Call the GetOrderBy method to retrieve an ORDER BY clause from a SQL statement.
Note: GetOrderBy and SetOrderBy methods serve to process only quite simple queries anddon't support, for example, subqueries.

See Also
SetOrderBy© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.20 GotoCurrent Method

Sets the current record in this dataset similar to the current record in another dataset.

Class
TCustomDADataSet

Syntax
procedure GotoCurrent(DataSet: TCustomDADataSet);
Parameters
DataSetHolds the TCustomDADataSet descendant to synchronize the record position with.

Remarks
Call the GotoCurrent method to set the current record in this dataset similar to the current
record in another dataset. The key fields in both these DataSets must be coincident.

© 2019 Devart389

Oracle Data Access Components

See Also
TMemDataSet.Locate
TMemDataSet.LocateEx© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.21 Lock Method

Locks the current record.

Class
TCustomDADataSet

Syntax
procedure Lock; virtual;

Remarks
Call the Lock method to lock the current record by executing the statement that is defined in
the SQLLock property (for the TOraQuery component).
The Lock method sets the savepoint with the name LOCK_ + <component_name>.
TOraQuery uses SQLLock to execute the current record locking. TSmartQuery builds a
SELECT FOR UPDATE statement itself.

See Also
TOraDataSet.LockMode
P:Devart.Odac.TCustomDADataSet.SQLLock
UnLock© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.22 MacroByName Method

Finds a Macro with the name passed in Name.

Class
TCustomDADataSet

Syntax© 2019 DevartReference390

function MacroByName(const Value: string): TMacro;Parameters
Value
Holds the name of the Macro to search for.
Return Value
the Macro, if a match was found.

Remarks
Call the MacroByName method to find a Macro with the name passed in Name. If a match
was found, MacroByName returns the Macro. Otherwise, an exception is raised. Use thismethod rather than a direct reference to the Items property to avoid depending on the order ofthe entries.
To locate a parameter by name without raising an exception if the parameter is not found, use
the FindMacro method.
To assign the value of macro use the TMacro.Value property.

ExampleOraQuery.SQL:= 'SELECT * FROM Scott.Dept ORDER BY &Order';
OraQuery.MacroByName('Order').Value:= 'DeptNo';
OraQuery.Open;

See Also
TMacroMacrosFindMacro© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.23 ParamByName Method

Sets or uses parameter information for a specific parameter based on its name.

Class
TCustomDADataSet

Syntaxfunction ParamByName(const Value: string): TDAParam;
Parameters© 2019 Devart

391

Oracle Data Access Components

Value
Holds the name of the parameter for which to retrieve information.
Return Valuea TDAParam object.

Remarks
Call the ParamByName method to set or use parameter information for a specific parameterbased on its name. Name is the name of the parameter for which to retrieve information.
ParamByName is used to set a parameter's value at runtime and returns a TDAParamobject.

ExampleThe following statement retrieves the current value of a parameter called "Contact" into anedit box:
Edit1.Text := Query1.ParamsByName('Contact').AsString;See Also
ParamsFindParam© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.24 Prepare Method

Allocates, opens, and parses cursor for a query.

Class
TCustomDADataSet

Syntax
procedure Prepare; override;

Remarks
Call the Prepare method to allocate, open, and parse cursor for a query. Calling Prepare
before executing a query improves application performance.
TCustomDADataSet automatically prepares a query if it is executed without being preparedfirst. After execution, TCustomDADataSet unprepares the query. When a query is executed anumber of times, an application should always explicitly prepare the query to avoid multiple© 2019 DevartReference392

and unnecessary prepares and unprepares.
The UnPrepare method unprepares a query.
Note: When you change the text of a query at runtime, the query is automatically closed andunprepared.

See Also
TMemDataSet.Prepared
TMemDataSet.UnPrepare
Options© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.25 RefreshRecord Method

Actualizes field values for the current record.

Class
TCustomDADataSet

Syntax
procedure RefreshRecord;

Remarks
Call the RefreshRecord method to actualize field values for the current record.
RefreshRecord performs query to database and refetches new field values from the returned
cursor.

See Also
RefreshOptions
SQLRefresh© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.5.3.26 RestoreSQL Method

Restores the SQL property modified by AddWhere and SetOrderBy.

Class
TCustomDADataSet© 2019 Devart

Provide Feedback

393

Oracle Data Access Components

Syntax
procedure RestoreSQL;

Remarks
Call the RestoreSQL method to restore the SQL property modified by AddWhere and
SetOrderBy.

See Also
AddWhere
SetOrderBy
SaveSQLSQLSaved© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.27 SaveSQL Method

Saves the SQL property value to BaseSQL.

Class
TCustomDADataSet

Syntax
procedure SaveSQL;

Remarks
Call the SaveSQL method to save the SQL property value to the BaseSQL property.

See Also
SQLSaved
RestoreSQLBaseSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference394

5.10.1.5.3.28 SetOrderBy Method

Builds an ORDER BY clause of a SELECT statement.

Class
TCustomDADataSet

Syntax
procedure SetOrderBy(const Fields: string);
Parameters
FieldsHolds the names of the fields which will be added to the ORDER BY clause.

Remarks
Call the SetOrderBy method to build an ORDER BY clause of a SELECT statement. The
fields are identified by the comma-delimited field names.
Note: The GetOrderBy and SetOrderBy methods serve to process only quite simple queries
and don't support, for example, subqueries.

ExampleQuery1.SetOrderBy('DeptNo;DName');See Also
GetOrderBy© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.29 SQLSaved Method

Determines if the SQL property value was saved to the BaseSQL property.

Class
TCustomDADataSet

Syntaxfunction SQLSaved: boolean;
Return Value
True, if the SQL property value was saved to the BaseSQL property.
© 2019 Devart

395

Oracle Data Access Components

Remarks
Call the SQLSaved method to know whether the SQL property value was saved to the
BaseSQL property.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.3.30 UnLock Method

Releases a record lock.

Class
TCustomDADataSet

Syntax
procedure UnLock;

Remarks
Call the Unlock method to release the record lock made by the Lock method before.
Unlock is performed by rolling back to the savepoint set by the Lock method.

See Also
Lock© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.4 Events

Events of the TCustomDADataSet class.
For a complete list of the TCustomDADataSet class members, see the TCustomDADataSet
Members topic.

PublicName
AfterExecute
AfterFetch

Description
Occurs after a component
has executed a query todatabase.
Occurs after dataset finishes
fetching data from server.
© 2019 DevartReference

AfterUpdateExecute

BeforeFetch

BeforeUpdateExecute

OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)

396

Occurs after executing
insert, delete, update, lockand refresh operations.
Occurs before dataset isgoing to fetch block ofrecords from the server.
Occurs before executing
insert, delete, update, lock,and refresh operations.
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.

See Also
TCustomDADataSet Class
TCustomDADataSet Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.4.1 AfterExecute Event

Occurs after a component has executed a query to database.

Class
TCustomDADataSet

Syntaxproperty AfterExecute: TAfterExecuteEvent;Remarks
Occurs after a component has executed a query to database.

See Also
TCustomDADataSet.Execute© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

397

Oracle Data Access Components

Reserved.
5.10.1.5.4.2 AfterFetch Event

Occurs after dataset finishes fetching data from server.

Class
TCustomDADataSet

Syntaxproperty AfterFetch: TAfterFetchEvent;Remarks
The AfterFetch event occurs after dataset finishes fetching data from server.

See Also
BeforeFetch
TOraDataSet.NonBlocking© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.4.3 AfterUpdateExecute Event

Occurs after executing insert, delete, update, lock and refresh operations.

Class
TCustomDADataSet

Syntaxproperty AfterUpdateExecute: TUpdateExecuteEvent;Remarks
Occurs after executing insert, delete, update, lock, and refresh operations. You can use
AfterUpdateExecute to set the parameters of corresponding statements.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference398

5.10.1.5.4.4 BeforeFetch Event

Occurs before dataset is going to fetch block of records from the server.

Class
TCustomDADataSet

Syntaxproperty BeforeFetch: TBeforeFetchEvent;Remarks
The BeforeFetch event occurs every time before dataset is going to fetch a block of records
from the server. Set Cancel to True to abort current fetch operation.
Note: In the TOraDataSet.NonBlocking mode event handler is called from the fetching thread.
Therefore, if you have set the NonBlocking property to True, you should use threadsynchronization mechanisms in the code of the BeforeFetch event handler.

See Also
AfterFetch
TOraDataSet.NonBlocking© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.5.4.5 BeforeUpdateExecute Event

Occurs before executing insert, delete, update, lock, and refresh operations.

Class
TCustomDADataSet

Syntaxproperty BeforeUpdateExecute: TUpdateExecuteEvent;Remarks
Occurs before executing insert, delete, update, lock, and refresh operations. You can use
BeforeUpdateExecute to set the parameters of corresponding statements.

See Also
AfterUpdateExecute© 2019 Devart

399

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6 TCustomDASQL ClassA base class for components executing SQL statements that do not return result sets.
For a list of all members of this type, see TCustomDASQL members.

Unit
DBAccess

SyntaxTCustomDASQL = class(TComponent);

Remarks
TCustomDASQL is a base class that defines functionality for descendant classes whichaccess database using SQL statements. Applications never use TCustomDASQL objects
directly. Instead they use descendants of TCustomDASQL.
Use TCustomDASQL when client application must execute SQL statement or call stored
procedure on the database server. The SQL statement should not retrieve rows from thedatabase.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.1 Members

TCustomDASQL class overview.

Properties
Name
ChangeCursor

Connection
Debug

Description
Enables or disables
changing screen cursor
when executing commandsin the NonBlocking mode.
Used to specify aconnection object to use toconnect to a data store.
Description is not available
at the moment.

© 2019 DevartReference

FinalSQL

MacroCount
MacrosParamCheck

ParamCount
ParamsParamValues

Prepared

RowsAffected

SQL

400

Used to return a SQL
statement with expanded
macros.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify whether
parameters for the Params
property are implicitly
generated when the SQL
property is being changed.
Indicates the number ofparameters in the Params
property.
Used to contain parameters
for a SQL statement.
Used to get or set the valuesof individual fieldparameters that are
identified by name.
Used to indicate whether aquery is prepared forexecution.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Used to provide a SQL
statement that a
TCustomDASQL
component executes when
the Execute method iscalled.

Methods
Name
ExecuteExecuting© 2019 Devart

Description
Overloaded. Executes a
SQL statement on theserver.
Checks whether
TCustomDASQL still401

Oracle Data Access Components

executes a SQL statement.
Searches for a macro withthe specified name.
Finds a parameter with thespecified name.
Finds a Macro with thename passed in Name.
Finds a parameter with thespecified name.
Allocates, opens, andparses cursor for a query.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Waits until TCustomDASQL
executes a SQL statement.

FindMacro
FindParam
MacroByName
ParamByName
Prepare

UnPrepare

WaitExecuting

EventsName

Description
Occurs after a SQL
statement has been
executed.

AfterExecute© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.2 Properties

Properties of the TCustomDASQL class.
For a complete list of the TCustomDASQL class members, see the TCustomDASQLMembers topic.

PublicName
ChangeCursor

Description
Enables or disables
changing screen cursor
when executing commandsin the NonBlocking mode.

Connection

Used to specify aconnection object to use to© 2019 DevartReference402

connect to a data store.
Description is not available
at the moment.
Used to return a SQL
statement with expanded
macros.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify whether
parameters for the Params
property are implicitly
generated when the SQL
property is being changed.
Indicates the number ofparameters in the Params
property.
Used to contain parameters
for a SQL statement.
Used to get or set the valuesof individual fieldparameters that are
identified by name.
Used to indicate whether aquery is prepared forexecution.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Used to provide a SQL
statement that a
TCustomDASQL
component executes when
the Execute method iscalled.

Debug
FinalSQL

MacroCount
MacrosParamCheck

ParamCount
ParamsParamValues

Prepared

RowsAffected

SQL

See Also
TCustomDASQL Class
TCustomDASQL Class Members© 1997-2019© 2019 Devart

Request Support

DAC Forum

Provide Feedback403

Oracle Data Access Components

Devart. All Rights
Reserved.
5.10.1.6.2.1 ChangeCursor Property

Enables or disables changing screen cursor when executing commands in the NonBlocking
mode.

Class
TCustomDASQL

Syntaxproperty ChangeCursor: boolean;

Remarks
Set the ChangeCursor property to False to prevent the screen cursor from changing to
crSQLArrow when executing commands in the NonBlocking mode. The default value is True.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.2.2 Connection Property

Used to specify a connection object to use to connect to a data store.

Class
TCustomDASQL

Syntaxproperty Connection: TCustomDAConnection;

Remarks
Use the Connection property to specify a connection object that will be used to connect to adata store.
Set at design-time by selecting from the list of provided TCustomDAConnection or its
descendant class objects.
At runtime, link an instance of a TCustomDAConnection descendant to the Connection
property.

© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference404

Reserved.
5.10.1.6.2.3 Debug Property

Class
TCustomDASQL

Syntaxproperty Debug: boolean default False;

Remarks
Set the Debug property to True to display executing statement and all its parameters' values.
Also displays the type of parameters. Note: To enable debug window you should explicitly
include the OdacVcl unit to your project. If TOraSQLMonitor is used in the project and the
TOraSQLMonitor.Active property is set to False, the debug window is not displayed.

See Also
TCustomDADataSet.Debug© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.2.4 FinalSQL Property

Used to return a SQL statement with expanded macros.

Class
TCustomDASQL

Syntaxproperty FinalSQL: string;

Remarks
Read the FinalSQL property to return a SQL statement with expanded macros. This is theexact statement that will be passed on to the database server.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback405

Oracle Data Access Components

5.10.1.6.2.5 MacroCount Property

Used to get the number of macros associated with the Macros property.

Class
TCustomDASQL

Syntaxproperty MacroCount: word;

Remarks
Use the MacroCount property to get the number of macros associated with the Macrosproperty.

See Also
Macros© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.2.6 Macros Property

Makes it possible to change SQL queries easily.

Class
TCustomDASQL

Syntaxproperty Macros: TMacros stored False;

Remarks
With the help of macros you can easily change SQL query text at design- or runtime. Marcos
extend abilities of parameters and allow to change conditions in a WHERE clause or sortorder in an ORDER BY clause. You just insert &MacroName in the SQL query text andchange value of macro in the Macro property editor at design time or call the MacroByName
function at run time. At the time of opening the query macro is replaced by its value.

See Also
TMacroMacroByName© 2019 DevartReference

406

Params© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.2.7 ParamCheck Property

Used to specify whether parameters for the Params property are implicitly generated when
the SQL property is being changed.

Class
TCustomDASQL

Syntaxproperty ParamCheck: boolean default True;

Remarks
Use the ParamCheck property to specify whether parameters for the Params property are
implicitly generated when the SQL property is being changed.
Set ParamCheck to True to let TCustomDASQL generate the Params property for thedataset based on a SQL statement automatically.
Setting ParamCheck to False can be used if the dataset component passes to a server the
DDL statements that contain, for example, declarations of the stored procedures that will
accept parameterized values themselves. The default value is True.

See Also
Params© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.6.2.8 ParamCount Property

Indicates the number of parameters in the Params property.

Class
TCustomDASQL

Syntaxproperty ParamCount: word;© 2019 Devart

Provide Feedback

407

Oracle Data Access Components

Remarks
Use the ParamCount property to determine how many parameters are there in the Params
property.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.2.9 Params Property

Used to contain parameters for a SQL statement.

Class
TCustomDASQL

Syntaxproperty Params: TDAParams stored False;

Remarks
Access the Params property at runtime to view and set parameter names, values, and datatypes dynamically (at design-time use the Parameters editor to set parameter properties).
Params is a zero-based array of parameter records. Index specifies the array element toaccess. An easier way to set and retrieve parameter values when the name of eachparameter is known is to call ParamByName.

ExampleSetting parameters at runtime:procedure TForm1.Button1Click(Sender: TObject);
beginwith OraSQL do
begin
SQL.Clear;
SQL.Add('INSERT INTO Temp_Table(Id, Name)');SQL.Add('VALUES (:id, :Name)');ParamByName('Id').AsInteger := 55;
Params[1].AsString := ' Green';
Execute;end;
end;

See Also
TDAParam© 2019 DevartReference

408

FindParam
Macros© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.2.10 ParamValues Property(Indexer)

Used to get or set the values of individual field parameters that are identified by name.

Class
TCustomDASQL

Syntaxproperty ParamValues[const ParamName: string]: Variant; default;
Parameters
ParamName
Holds parameter names separated by semicolon.

Remarks
Use the ParamValues property to get or set the values of individual field parameters that are
identified by name.
Setting ParamValues sets the Value property for each parameter listed in the ParamName
string. Specify the values as Variants.
Getting ParamValues retrieves an array of variants, each of which represents the value of oneof the named parameters.
Note: The Params array is generated implicitly if ParamCheck property is set to True. If
ParamName includes a name that does not match any of the parameters in Items, an
exception is raised.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.6.2.11 Prepared Property

Used to indicate whether a query is prepared for execution.

Class
TCustomDASQL© 2019 Devart

Provide Feedback

409

Oracle Data Access Components

Syntaxproperty Prepared: boolean;

Remarks
Check the Prepared property to determine if a query is already prepared for execution. Truemeans that the query has already been prepared. As a rule prepared queries are executed
faster, but the preparation itself also takes some time. One of the proper cases for using
preparation is parametrized queries that are executed several times.

See Also
Prepare© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.2.12 Row sAffected Property

Used to indicate the number of rows which were inserted, updated, or deleted during the lastquery operation.

Class
TCustomDASQL

Syntaxproperty RowsAffected: integer;

Remarks
Check RowsAffected to determine how many rows were inserted, updated, or deleted during
the last query operation. If RowsAffected is -1, the query has not inserted, updated, or deleted
any rows.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.2.13 SQL Property

Used to provide a SQL statement that a TCustomDASQL component executes when the
Execute method is called.

Class© 2019 DevartReference

410

TCustomDASQL

Syntaxproperty SQL: TStrings;

Remarks
Use the SQL property to provide a SQL statement that a TCustomDASQL component
executes when the Execute method is called. At design time the SQL property can be edited
by invoking the String List editor in Object Inspector.

See Also
FinalSQL
TCustomDASQL.Execute© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.3 Methods

Methods of the TCustomDASQL class.
For a complete list of the TCustomDASQL class members, see the TCustomDASQLMembers topic.

PublicName
ExecuteExecuting
FindMacro
FindParam
MacroByName
ParamByName
Prepare© 2019 Devart

Description
Overloaded. Executes a
SQL statement on theserver.
Checks whether
TCustomDASQL still
executes a SQL statement.
Searches for a macro withthe specified name.
Finds a parameter with thespecified name.
Finds a Macro with thename passed in Name.
Finds a parameter with thespecified name.
Allocates, opens, andparses cursor for a query.

411

Oracle Data Access Components

Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Waits until TCustomDASQL
executes a SQL statement.

UnPrepare

WaitExecuting

See Also
TCustomDASQL Class
TCustomDASQL Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.3.1 Execute Method

Executes a SQL statement on the server.

Class
TCustomDASQL

Overload List
Name
ExecuteExecute(Iters: integer; Offset: integer)© 1997-2019
Request Support
Devart. All Rights
Reserved.

Description
Executes a SQL statement on the server.
Used to perform Batch operations .
DAC Forum

Provide Feedback

Executes a SQL statement on the server.

Class
TCustomDASQL

Syntax
procedure Execute; overload; virtual;

Remarks
Call the Execute method to execute a SQL statement on the server. If the SQL statement has© 2019 DevartReference412

OUT parameters, use the TCustomDASQL.ParamByName method or the
TCustomDASQL.Params property to get their values. Iters argument specifies the number oftimes this statement is executed for the DML array operations.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Used to perform Batch operations .

Class
TCustomDASQL

Syntax
procedure Execute(Iters: integer; Offset: integer = 0); overload;
virtual;Parameters
Iters
Specifies the number of inserted rows.
OffsetPoints the array element, which the Batch operation starts from. 0 by default.

Remarks
The Execute method executes the specified batch SQL query. See the Batch operations
article for samples.

See Also
Batch operations© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.6.3.2 Executing Method

Checks whether TCustomDASQL still executes a SQL statement.

Class
TCustomDASQL

Syntax© 2019 Devart

Provide Feedback413

Oracle Data Access Components

function Executing: boolean;
Return Value
True, if a SQL statement is still being executed by TCustomDASQL.

Remarks
Check Executing to find out whether TCustomDASQL still executes a SQL statement. The
Executing method is used for nonblocking execution.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.3.3 FindMacro Method

Searches for a macro with the specified name.

Class
TCustomDASQL

Syntaxfunction FindMacro(const Value: string): TMacro;Parameters
Value
Holds the name of a macro to search for.
Return Valuethe TMacro object, if a macro with the specified name has been found. If it has not, returns
nil.

Remarks
Call the FindMacro method to find a macro with the specified name in a dataset.

See Also
TMacroMacrosMacroByName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference414

5.10.1.6.3.4 FindParam Method

Finds a parameter with the specified name.

Class
TCustomDASQL

Syntaxfunction FindParam(const Value: string): TDAParam;
Parameters
Value
Holds the parameter name to search for.
Return Valuea TDAParm object, if a parameter with the specified name has been found. If it has not,returns nil.

Remarks
Call the FindParam method to find a parameter with the specified name in a dataset.

See Also
ParamByName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.3.5 MacroByName Method

Finds a Macro with the name passed in Name.

Class
TCustomDASQL

Syntaxfunction MacroByName(const Value: string): TMacro;Parameters
Value
Holds the name of the Macro to search for.
Return Value
the Macro, if a match was found.

© 2019 Devart

415

Oracle Data Access Components

Remarks
Call the MacroByName method to find a Macro with the name passed in Name. If a match
was found, MacroByName returns the Macro. Otherwise, an exception is raised. Use thismethod rather than a direct reference to the Items property to avoid depending on the order ofthe entries.
To locate a parameter by name without raising an exception if the parameter is not found, use
the FindMacro method.
To assign the value of macro use the TMacro.Value property.

See Also
TMacroMacrosFindMacro© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.3.6 ParamByName Method

Finds a parameter with the specified name.

Class
TCustomDASQL

Syntaxfunction ParamByName(const Value: string): TDAParam;
Parameters
Value
Holds the name of the parameter to search for.
Return Valuea TDAParam object, if a match was found. Otherwise, an exception is raised.

Remarks
Use the ParamByName method to find a parameter with the specified name. If no parameterwith the specified name found, an exception is raised.

ExampleOraSQL.Execute;© 2019 DevartReference

416

Edit1.Text := OraSQL.ParamsByName('Contact').AsString;See Also
FindParam© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.3.7 Prepare Method

Allocates, opens, and parses cursor for a query.

Class
TCustomDASQL

Syntax
procedure Prepare; virtual;

Remarks
Call the Prepare method to allocate, open, and parse cursor for a query. Calling Prepare
before executing a query improves application performance.
TCustomDADataSet automatically prepares a query if it is executed without being preparedfirst. After execution, TCustomDADataSet unprepares the query. When a query is executed anumber of times, an application should always explicitly prepare the query to avoid multiple
and unnecessary prepares and unprepares.
The UnPrepare method unprepares a query.
Note: When you change the text of a query at runtime, the query is automatically closed andunprepared.

See Also
Prepared
UnPrepare© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.3.8 UnPrepare Method

Frees the resources allocated for a previously prepared query on the server and client sides.

Class© 2019 Devart

417

Oracle Data Access Components

TCustomDASQL

Syntax
procedure UnPrepare; virtual;

Remarks
Call the UnPrepare method to free resources allocated for a previously prepared query on theserver and client sides.

See Also
Prepare© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.3.9 WaitExecuting Method

Waits until TCustomDASQL executes a SQL statement.

Class
TCustomDASQL

Syntaxfunction WaitExecuting(TimeOut: integer = 0): boolean;
Parameters
TimeOut
Holds the time in seconds to wait while TCustomDASQL executes the SQL statement. Zeromeans infinite time.
Return Value
True, if the execution of a SQL statement was completed in the preset time.

Remarks
Call the WaitExecuting method to wait until TCustomDASQL executes a SQL statement. Use
the WaitExecuting method for nonblocking execution.

See Also
Executing© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

418

Reserved.
5.10.1.6.4 Events

Events of the TCustomDASQL class.
For a complete list of the TCustomDASQL class members, see the TCustomDASQLMembers topic.

PublicName

Description
Occurs after a SQL
statement has been
executed.

AfterExecute

See Also
TCustomDASQL Class
TCustomDASQL Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.6.4.1 AfterExecute Event

Occurs after a SQL statement has been executed.

Class
TCustomDASQL

Syntaxproperty AfterExecute: TAfterExecuteEvent;Remarks
Occurs after a SQL statement has been executed. This event may be used for descendantcomponents which use multithreaded environment.

See Also
TCustomDASQL.Execute© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

419

Oracle Data Access Components

5.10.1.7 TCustomDAUpdateSQL ClassA base class for components that provide DML statements for more flexible control over data
modifications.
For a list of all members of this type, see TCustomDAUpdateSQL members.

Unit
DBAccess

SyntaxTCustomDAUpdateSQL = class(TComponent);

Remarks
TCustomDAUpdateSQL is a base class for components that provide DML statements formore flexible control over data modifications. Besides providing BDE compatibility, thiscomponent allows to associate a separate component for each update command.

See Also
TOraDataSet.UpdateObject© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.1 Members

TCustomDAUpdateSQL class overview.

Properties
Name
DataSetDeleteObject
DeleteSQL
InsertObject
InsertSQL

Description
Used to hold a reference tothe TCustomDADataSet
object that is being updated.
Provides ability to perform
advanced adjustment of thedelete operations.
Used when deleting arecord.
Provides ability to perform
advanced adjustment ofinsert operations.
Used when inserting a© 2019 DevartReference

420

record.
Provides ability to perform
advanced adjustment of lock
operations.
Used to lock the current
record.
Provides ability to perform
advanced adjustment ofmodify operations.
Used when updating arecord.
Provides ability to perform
advanced adjustment of
refresh operations.
Used to specify an SQL
statement that will be used
for refreshing the current
record byTCustomDADataSet.Refres
hRecord procedure.
Used to return a SQL
statement for one of the
ModifySQL, InsertSQL, orDeleteSQL properties.

LockObject
LockSQL
ModifyObject
ModifySQL
RefreshObject

RefreshSQL

SQL

Methods
Name

Description
Sets parameters for a SQL
statement and executes it to
update a record.
Executes a SQL statement.

Apply
ExecSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.2 Properties

Properties of the TCustomDAUpdateSQL class.
For a complete list of the TCustomDAUpdateSQL class members, see theTCustomDAUpdateSQL Members topic.

Public© 2019 Devart

421

Oracle Data Access Components

Name
DataSetSQL

Description
Used to hold a reference tothe TCustomDADataSet
object that is being updated.
Used to return a SQL
statement for one of the
ModifySQL, InsertSQL, orDeleteSQL properties.

Published
Name
DeleteObject
DeleteSQL
InsertObject
InsertSQL
LockObject
LockSQL
ModifyObject
ModifySQL
RefreshObject

RefreshSQL

Description
Provides ability to perform
advanced adjustment of thedelete operations.
Used when deleting arecord.
Provides ability to perform
advanced adjustment ofinsert operations.
Used when inserting arecord.
Provides ability to perform
advanced adjustment of lock
operations.
Used to lock the current
record.
Provides ability to perform
advanced adjustment ofmodify operations.
Used when updating arecord.
Provides ability to perform
advanced adjustment of
refresh operations.
Used to specify an SQL
statement that will be used
for refreshing the current
record byTCustomDADataSet.Refres
hRecord procedure.

See Also© 2019 DevartReference

422

TCustomDAUpdateSQL Class
TCustomDAUpdateSQL Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.2.1 DataSet Property

Used to hold a reference to the TCustomDADataSet object that is being updated.

Class
TCustomDAUpdateSQL

Syntaxproperty DataSet: TCustomDADataSet;

Remarks
The DataSet property holds a reference to the TCustomDADataSet object that is being
updated. Generally it is not used directly.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.2.2 DeleteObject Property

Provides ability to perform advanced adjustment of the delete operations.

Class
TCustomDAUpdateSQL

Syntaxproperty DeleteObject: TComponent;

Remarks
Assign SQL component or a TOraDataSet descendant to this property to perform advanced
adjustment of the delete operations. In some cases this can give some additional
performance. Use the same principle to set the SQL property of an object as for setting the
DeleteSQL property.

See Also© 2019 Devart

423

Oracle Data Access Components

DeleteSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.2.3 DeleteSQL Property

Used when deleting a record.

Class
TCustomDAUpdateSQL

Syntaxproperty DeleteSQL: TStrings;

Remarks
Set the DeleteSQL property to a DELETE statement to use when deleting a record.
Statements can be parameterized queries with parameter names corresponding to thedataset field names.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.2.4 InsertObject Property

Provides ability to perform advanced adjustment of insert operations.

Class
TCustomDAUpdateSQL

Syntaxproperty InsertObject: TComponent;

Remarks
Assign SQL component or TOraDataSet descendant to this property to perform advanced
adjustment of insert operations. In some cases this can give some additional performance.
Set the SQL property of the object in the same way as used for the InsertSQL property.

See Also
InsertSQL© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

424

Provide Feedback

5.10.1.7.2.5 InsertSQL Property

Used when inserting a record.

Class
TCustomDAUpdateSQL

Syntaxproperty InsertSQL: TStrings;

Remarks
Set the InsertSQL property to an INSERT INTO statement to use when inserting a record.
Statements can be parameterized queries with parameter names corresponding to thedataset field names.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.2.6 LockObject Property

Provides ability to perform advanced adjustment of lock operations.

Class
TCustomDAUpdateSQL

Syntaxproperty LockObject: TComponent;

Remarks
Assign a SQL component or TOraDataSet descendant to this property to perform advanced
adjustment of lock operations. In some cases that can give some additional performance. Set
the SQL property of an object in the same way as used for the LockSQL property.

See Also
LockSQL© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

425

Oracle Data Access Components

Reserved.
5.10.1.7.2.7 LockSQL Property

Used to lock the current record.

Class
TCustomDAUpdateSQL

Syntaxproperty LockSQL: TStrings;

Remarks
Use the LockSQL property to lock the current record. Statements can be parameterized
queries with parameter names corresponding to the dataset field names.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.2.8 ModifyObject Property

Provides ability to perform advanced adjustment of modify operations.

Class
TCustomDAUpdateSQL

Syntaxproperty ModifyObject: TComponent;

Remarks
Assign a SQL component or TOraDataSet descendant to this property to perform advanced
adjustment of modify operations. In some cases this can give some additional performance.
Set the SQL property of the object in the same way as used for the ModifySQL property.

See Also
ModifySQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference426

5.10.1.7.2.9 ModifySQL Property

Used when updating a record.

Class
TCustomDAUpdateSQL

Syntaxproperty ModifySQL: TStrings;

Remarks
Set ModifySQL to an UPDATE statement to use when updating a record. Statements can beparameterized queries with parameter names corresponding to the dataset field names.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.2.10 RefreshObject Property

Provides ability to perform advanced adjustment of refresh operations.

Class
TCustomDAUpdateSQL

Syntaxproperty RefreshObject: TComponent;

Remarks
Assign a SQL component or TOraDataSet descendant to this property to perform advanced
adjustment of refresh operations. In some cases that can give some additional performance.
Set the SQL property of the object in the same way as used for the RefreshSQL property.

See Also
RefreshSQL© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

427

Oracle Data Access Components

5.10.1.7.2.11 RefreshSQL Property

Used to specify an SQL statement that will be used for refreshing the current record by
TCustomDADataSet.RefreshRecord procedure.

Class
TCustomDAUpdateSQL

Syntaxproperty RefreshSQL: TStrings;

Remarks
Use the RefreshSQL property to specify a SQL statement that will be used for refreshing thecurrent record by the TCustomDADataSet.RefreshRecord procedure.
You can assign to SQLRefresh a WHERE clause only. In such a case it is added to SELECT
defined by the SQL property by TCustomDADataSet.AddWhere.
To create a RefreshSQL statement at design time, use the query statements editor.

See Also
TCustomDADataSet.RefreshRecord© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.2.12 SQL Property(Indexer)

Used to return a SQL statement for one of the ModifySQL, InsertSQL, or DeleteSQL
properties.

Class
TCustomDAUpdateSQL

Syntaxproperty SQL[UpdateKind: TUpdateKind]: TStrings;
Parameters
UpdateKind
Specifies which of update SQL statements to return.

Remarks© 2019 DevartReference

428

Returns a SQL statement for one of the ModifySQL, InsertSQL, or DeleteSQL properties,
depending on the value of the UpdateKind index.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.3 Methods

Methods of the TCustomDAUpdateSQL class.
For a complete list of the TCustomDAUpdateSQL class members, see theTCustomDAUpdateSQL Members topic.

PublicName

Description
Sets parameters for a SQL
statement and executes it to
update a record.
Executes a SQL statement.

Apply
ExecSQL

See Also
TCustomDAUpdateSQL Class
TCustomDAUpdateSQL Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.3.1 Apply Method

Sets parameters for a SQL statement and executes it to update a record.

Class
TCustomDAUpdateSQL

Syntax
procedure Apply(UpdateKind: TUpdateKind); virtual;Parameters
UpdateKind
Specifies which of update SQL statements to execute.

Remarks© 2019 Devart

429

Oracle Data Access Components

Call the Apply method to set parameters for a SQL statement and execute it to update arecord. UpdateKind indicates which SQL statement to bind and execute.
Apply is primarily intended for manually executing update statements from an
OnUpdateRecord event handler.
Note: If a SQL statement does not contain parameters, it is more efficient to call ExecSQL
instead of Apply.

See Also
ExecSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.7.3.2 ExecSQL Method

Executes a SQL statement.

Class
TCustomDAUpdateSQL

Syntax
procedure ExecSQL(UpdateKind: TUpdateKind);Parameters
UpdateKind
Specifies the kind of update statement to be executed.

Remarks
Call the ExecSQL method to execute a SQL statement, necessary for updating the records
belonging to a read-only result set when cached updates is enabled. UpdateKind specifies thestatement to execute.
ExecSQL is primarily intended for manually executing update statements from theOnUpdateRecord event handler.
Note: To both bind parameters and execute a statement, call Apply.

See Also
Apply© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

430

5.10.1.8 TDACondition Class

Represents a condition from the TDAConditions list.
For a list of all members of this type, see TDACondition members.

Unit
DBAccess

SyntaxTDACondition = class(TCollectionItem);Remarks
Manipulate conditions using TDAConditions.

See Also
TDAConditions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.8.1 Members

TDACondition class overview.

Properties
Name

Name

Description
Indicates whether thecondition is enabled or not
The name of the condition

Value

The value of the condition

Enabled

Methods
Name
DisableDescription

EnableEnables the condition© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Disables the condition

Request Support

DAC Forum

Provide Feedback

431

Oracle Data Access Components

5.10.1.8.2 Properties

Properties of the TDACondition class.
For a complete list of the TDACondition class members, see the TDACondition Members
topic.

Published
Name

Name

Description
Indicates whether thecondition is enabled or not
The name of the condition

Value

The value of the condition

EnabledSee Also
TDACondition Class
TDACondition Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.8.2.1 Enabled Property

Indicates whether the condition is enabled or notClass
TDACondition

Syntaxproperty Enabled: Boolean default True;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.8.2.2 Name Property

The name of the condition

Class
TDACondition

Syntax© 2019 DevartReference432

property Name: string;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.10.1.8.2.3 Value Property

The value of the condition

Class
TDACondition

Syntaxproperty Value: string;© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.10.1.8.3 Methods

Methods of the TDACondition class.
For a complete list of the TDACondition class members, see the TDACondition Members
topic.

PublicName
DisableDescription

EnableEnables the condition

Disables the condition

See Also
TDACondition Class
TDACondition Class Members© 1997-2019
Devart. All Rights
Reserved.
5.10.1.8.3.1 Disable Method

Disables the conditionClass© 2019 Devart

Request Support

DAC Forum

Provide Feedback433

Oracle Data Access Components

TDACondition

Syntax
procedure Disable;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.10.1.8.3.2 Enable Method

Enables the condition

Class
TDACondition

Syntax
procedure Enable;© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.10.1.9 TDAConditions Class

Holds a collection of TDACondition objects.
For a list of all members of this type, see TDAConditions members.

Unit
DBAccess

SyntaxTDAConditions = class(TCollection);

Remarks
The given example code
UniTable1.Conditions.Add('1','JOB="MANAGER"');
UniTable1.Conditions.Add('2','SAL>2500');
UniTable1.Conditions.Enable;
UniTable1.Open;will return the following SQL:
SELECT * FROM EMP
WHERE (JOB="MANAGER")and© 2019 DevartReference434(SAL<2500)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.9.1 Members

TDAConditions class overview.

Properties
Name
Condition
Enabled
Items

Text

WhereSQL

Description
Used to iterate through all
the conditions.
Indicates whether thecondition is enabled
Used to iterate through allconditions.
The property returns
condition names and valuesas
CONDITION_NAME=CONDITION
Returns the SQL WHERE
condition added in theConditions property.

Methods
Name

DeleteDescription
Overloaded. Adds a
condition to the WHERE
clause of the query.
Deletes the condition

DisableDisables the condition

EnableEnables the condition
Search for TDACondition(the condition) by its name. If
found, the TDACondition
object is returned, otherwise- nil.
Retrieving a TDACondition
object by its name. If found,the TDACondition object is

Add

Find

Get

© 2019 Devart

435

Oracle Data Access Components

returned, otherwise - anexception is raised.
Retrieving condition index by
its name. If found, thiscondition index is returned,
otherwise - the method
returns -1.
Removes the condition

IndexOf

Remove© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.9.2 Properties

Properties of the TDAConditions class.
For a complete list of the TDAConditions class members, see the TDAConditions Members
topic.

PublicName

Description
Used to iterate through all
the conditions.
Indicates whether thecondition is enabled
Used to iterate through allconditions.
The property returns
condition names and valuesas
CONDITION_NAME=CONDITION
Returns the SQL WHERE
condition added in theConditions property.

Condition
Enabled
Items

Text

WhereSQL

See Also
TDAConditions Class
TDAConditions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

436

5.10.1.9.2.1 Condition Property(Indexer)

Used to iterate through all the conditions.

Class
TDAConditions

Syntaxproperty Condition[Index: Integer]: TDACondition;
Parameters
Index© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.10.1.9.2.2 Enabled Property

Indicates whether the condition is enabledClass
TDAConditions

Syntaxproperty Enabled: Boolean;© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.10.1.9.2.3 Items Property(Indexer)

Used to iterate through all conditions.

Class
TDAConditions

Syntaxproperty Items[Index: Integer]: TDACondition; default;
Parameters
Index
Holds an index in the range 0..Count - 1.
© 2019 Devart437

Oracle Data Access Components

Remarks
Use the Items property to iterate through all conditions. Index identifies the index in the range
0..Count - 1. Items can reference a particular condition by its index, but the Condition property
is preferred in order to avoid depending on the order of the conditions.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.9.2.4 Text Property

The property returns condition names and values as CONDITION_NAME=CONDITIONClass
TDAConditions

Syntaxproperty Text: string;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.9.2.5 WhereSQL Property

Returns the SQL WHERE condition added in the Conditions property.

Class
TDAConditions

Syntaxproperty WhereSQL: string;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.9.3 Methods

Methods of the TDAConditions class.
For a complete list of the TDAConditions class members, see the TDAConditions Members
topic.

Public© 2019 DevartReference

Name

438

DeleteDescription
Overloaded. Adds a
condition to the WHERE
clause of the query.
Deletes the condition

DisableDisables the condition

EnableEnables the condition
Search for TDACondition(the condition) by its name. If
found, the TDACondition
object is returned, otherwise- nil.
Retrieving a TDACondition
object by its name. If found,the TDACondition object isreturned, otherwise - anexception is raised.
Retrieving condition index by
its name. If found, thiscondition index is returned,
otherwise - the method
returns -1.
Removes the condition

Add

Find

Get

IndexOf

RemoveSee Also
TDAConditions Class
TDAConditions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.9.3.1 Add Method

Adds a condition to the WHERE clause of the query.

Class
TDAConditions

Overload List
Name
© 2019 Devart

Description

Provide Feedback

439

Oracle Data Access Components

Add(const Value: string; Enabled:
Boolean)Add(const Name: string; const Value:
string; Enabled: Boolean)© 1997-2019
Request Support
Devart. All Rights
Reserved.

Adds a condition to the WHERE clause of
the query.
Adds a condition to the WHERE clause of
the query.
DAC Forum

Provide Feedback

Adds a condition to the WHERE clause of the query.

Class
TDAConditions

Syntaxfunction Add(const Value: string; Enabled: Boolean = True):
TDACondition; overload;
Parameters
Value
The value of the condition
EnabledIndicates that the condition is enabled

Remarks
If you want then to access the condition, you should use Add and its name in the Name
parameter.
The given example code will return the following SQL:
SELECT * FROM EMP
WHERE (JOB="MANAGER")
and(SAL<2500)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Adds a condition to the WHERE clause of the query.

Class
TDAConditions

Syntax© 2019 DevartReference440

function Add(const Name: string; const Value: string; Enabled:
Boolean = True): TDACondition; overload;
Parameters
Name
Sets the name of the condition
Value
The value of the condition
EnabledIndicates that the condition is enabled

Remarks
The given example code will return the following SQL:
SELECT * FROM EMP
WHERE (JOB="MANAGER")
and(SAL<2500)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.9.3.2 Delete Method

Deletes the condition

Class
TDAConditions

Syntax
procedure Delete(Index: integer);
Parameters
Index
Index of the condition© 1997-2019
Devart. All Rights
Reserved.
5.10.1.9.3.3 Disable Method

Disables the conditionClass© 2019 Devart

Request Support

DAC Forum

Provide Feedback

441

Oracle Data Access Components

TDAConditions

Syntax
procedure Disable;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.10.1.9.3.4 Enable Method

Enables the condition

Class
TDAConditions

Syntax
procedure Enable;© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.10.1.9.3.5 Find Method

Search for TDACondition (the condition) by its name. If found, the TDACondition object isreturned, otherwise - nil.

Class
TDAConditions

Syntaxfunction Find(const Name: string): TDACondition;
ParametersName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.9.3.6 Get Method

Retrieving a TDACondition object by its name. If found, the TDACondition object is returned,
otherwise - an exception is raised.

© 2019 DevartReference

442

Class
TDAConditions

Syntaxfunction Get(const Name: string): TDACondition;
ParametersName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.9.3.7 IndexOf Method

Retrieving condition index by its name. If found, this condition index is returned, otherwise the method returns -1.

Class
TDAConditions

Syntaxfunction IndexOf(const Name: string): Integer;
ParametersName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.9.3.8 Remove Method

Removes the condition

Class
TDAConditions

Syntax
procedure Remove(const Name: string);
ParametersName© 2019 Devart

Provide Feedback443

Oracle Data Access Components

Specifies the name of the removed condition© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.10 TDAConnectionOptions ClassThis class allows setting up the behaviour of the TDAConnection class.
For a list of all members of this type, see TDAConnectionOptions members.

Unit
DBAccess

SyntaxTDAConnectionOptions = class(TPersistent);© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.10.1 Members

TDAConnectionOptions class overview.

Properties
Name
AllowImplicitConnect

DefaultSortType

DisconnectedMode

KeepDesignConnected

Description
Specifies whether to allow or
not implicit connection
opening.
Used to determine thedefault type of local sortingfor string fields. It is used
when a sort type is not
specified explicitly after thefield name in the
TMemDataSet.IndexFieldNa
mes property of a dataset.
Used to open a connection
only when needed for
performing a server call andcloses after performing theoperation.
Used to prevent anapplication from establishing© 2019 DevartReference

a connection at the time ofstartup.
If True, theTCustomDAConnection.On
ConnectionLost event
occurs and a failover
operation can be performed
after connection breaks.

LocalFailover© 1997-2019
Devart. All Rights
Reserved.

444

Request Support

DAC Forum

Provide Feedback

5.10.1.10.2 Properties

Properties of the TDAConnectionOptions class.
For a complete list of the TDAConnectionOptions class members, see the
TDAConnectionOptions Members topic.

PublicName

DefaultSortType

DisconnectedMode

KeepDesignConnected

LocalFailover© 2019 Devart

Description
Used to determine thedefault type of local sortingfor string fields. It is used
when a sort type is not
specified explicitly after thefield name in the
TMemDataSet.IndexFieldNa
mes property of a dataset.
Used to open a connection
only when needed for
performing a server call andcloses after performing theoperation.
Used to prevent anapplication from establishinga connection at the time ofstartup.
If True, theTCustomDAConnection.On
ConnectionLost event
occurs and a failover
operation can be performed
after connection breaks.

445

Oracle Data Access Components

Published
Name

Description
Specifies whether to allow or
not implicit connection
opening.

AllowImplicitConnect

See Also
TDAConnectionOptions Class
TDAConnectionOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.10.2.1 Allow ImplicitConnect Property

Specifies whether to allow or not implicit connection opening.

Class
TDAConnectionOptions

Syntaxproperty AllowImplicitConnect: boolean default True;

Remarks
Use the AllowImplicitConnect property to specify whether allow or not implicit connection
opening.
If a closed connection has AllowImplicitConnect set to True and a dataset that uses theconnection is opened, the connection is opened implicitly to allow opening the dataset.
If a closed connection has AllowImplicitConnect set to False and a dataset that uses theconnection is opened, an exception is raised.
The default value is True.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.10.2.2 DefaultSortType Property

Used to determine the default type of local sorting for string fields. It is used when a sort type
is not specified explicitly after the field name in the TMemDataSet.IndexFieldNames property© 2019 DevartReference446

of a dataset.

Class
TDAConnectionOptions

Syntaxproperty DefaultSortType: TSortType default stCaseSensitive;

Remarks
Use the DefaultSortType property to determine the default type of local sorting for string fields.
It is used when a sort type is not specified explicitly after the field name in the
TMemDataSet.IndexFieldNames property of a dataset.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.10.2.3 DisconnectedMode Property

Used to open a connection only when needed for performing a server call and closes after
performing the operation.

Class
TDAConnectionOptions

Syntaxproperty DisconnectedMode: boolean default False;

Remarks
If True, connection opens only when needed for performing a server call and closes after
performing the operation. Datasets remain opened when connection closes. May be useful tosave server resources and operate in unstable or expensive network. Drawback of using
disconnect mode is that each connection establishing requires some time for authorization. If
connection is often closed and opened it can slow down the application work. See theDisconnected Mode topic for more information.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

447

Oracle Data Access Components

5.10.1.10.2.4 KeepDesignConnected Property

Used to prevent an application from establishing a connection at the time of startup.

Class
TDAConnectionOptions

Syntaxproperty KeepDesignConnected: boolean default True;

Remarks
At the time of startup prevents application from establishing a connection even if theConnected property was set to True at design-time. Set KeepDesignConnected to False toinitialize the connected property to False, even if it was True at design-time.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.10.2.5 LocalFailover Property

If True, the TCustomDAConnection.OnConnectionLost event occurs and a failover operation
can be performed after connection breaks.

Class
TDAConnectionOptions

Syntaxproperty LocalFailover: boolean default False;

Remarks
If True, the TCustomDAConnection.OnConnectionLost event occurs and a failover operation
can be performed after connection breaks. Read the Working in an Unstable Network topic formore information about using failover.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11 TDADataSetOptions ClassThis class allows setting up the behaviour of the TDADataSet class.
For a list of all members of this type, see TDADataSetOptions members.

© 2019 DevartReference

448

Unit
DBAccess

SyntaxTDADataSetOptions = class(TPersistent);© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.1 Members

TDADataSetOptions class overview.

Properties
Name
AutoPrepare

CacheCalcFields

CompressBlobMode

DefaultValues

DetailDelay

FieldsOrigin

FlatBuffers© 2019 Devart

Description
Used to execute automatic
TCustomDADataSet.Prepar
e on the query execution.
Used to enable caching of
the TField.Calculated and
TField.Lookup fields.
Used to store values of the
BLOB fields in compressed
form.
Used to request default
values/expressions from theserver and assign them tothe DefaultExpression
property.
Used to get or set a delay inmilliseconds before
refreshing detail dataset
while navigating masterdataset.
Used forTCustomDADataSet to fill
the Origin property of the
TField objects byappropriate value when
opening a dataset.
Used to control how adataset treats data of the449

Oracle Data Access Components

InsertAllSetFields

LocalMasterDetail

LongStrings

MasterFieldsNullable

NumberRange

QueryRecCount

QuoteNames

RemoveOnRefresh

ftString and ftVarBytes
fields.
Used to include all set
dataset fields in thegenerated INSERT
statement
Used forTCustomDADataSet to use
local filtering to establish
master/detail relationship for
detail dataset and does notrefer to the server.
Used to represent string
fields with the length that isgreater than 255 as
TStringField.
Allows to use NULL values
in the fields by which therelation is built, whengenerating the query for the
Detail tables (when thisoption is enabled, theperformance can get worse).
Used to set the MaxValueand MinValue properties of
TIntegerField and
TFloatField to appropriate
values.
Used forTCustomDADataSet toperform additional query to
get the record count for thisSELECT, so the
RecordCount property
reflects the actual number ofrecords.
Used forTCustomDADataSet toquote all database object
names in autogenerated
SQL statements such as
update SQL.
Used for a dataset to locallyremove a record that can not
be found on the server.
© 2019 DevartReference

Used forTCustomDADataSet to set
the Required property of the
TField objects for the NOTNULL fields.
Used to return the new valueof fields to dataset after
insert or update.
Used for a dataset to set the
ReadOnly property to True
for all fields that do notbelong to UpdatingTable or
can not be updated.
Used forTCustomDADataSet toraise an exception when thenumber of updated ordeleted records is not equal
1.
Specifies whether to discard
all trailing spaces in thestring fields of a dataset.
Used to include all dataset
fields in the generated
UPDATE and INSERT
statements.
Used to get or set a valuethat enables or disables
batch processing support,
and specifies the number ofcommands that can be
executed in a batch.

RequiredFields

ReturnParams

SetFieldsReadOnly

StrictUpdate

TrimFixedChar

UpdateAllFields

UpdateBatchSize© 1997-2019
Devart. All Rights
Reserved.

450

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2 Properties

Properties of the TDADataSetOptions class.
For a complete list of the TDADataSetOptions class members, see the TDADataSetOptions
Members topic.

Public© 2019 Devart

451

Oracle Data Access Components

Name
AutoPrepare

CacheCalcFields

CompressBlobMode

DefaultValues

DetailDelay

FieldsOrigin

FlatBuffers

InsertAllSetFields

LocalMasterDetail

LongStrings

Description
Used to execute automatic
TCustomDADataSet.Prepar
e on the query execution.
Used to enable caching of
the TField.Calculated and
TField.Lookup fields.
Used to store values of the
BLOB fields in compressed
form.
Used to request default
values/expressions from theserver and assign them tothe DefaultExpression
property.
Used to get or set a delay inmilliseconds before
refreshing detail dataset
while navigating masterdataset.
Used forTCustomDADataSet to fill
the Origin property of the
TField objects byappropriate value when
opening a dataset.
Used to control how adataset treats data of theftString and ftVarBytes
fields.
Used to include all set
dataset fields in thegenerated INSERT
statement
Used forTCustomDADataSet to use
local filtering to establish
master/detail relationship for
detail dataset and does notrefer to the server.
Used to represent string
fields with the length that isgreater than 255 as
TStringField.

© 2019 DevartReference

MasterFieldsNullable

NumberRange

QueryRecCount

QuoteNames

RemoveOnRefresh

RequiredFields

ReturnParams

SetFieldsReadOnly

StrictUpdate© 2019 Devart

452

Allows to use NULL values
in the fields by which therelation is built, whengenerating the query for the
Detail tables (when thisoption is enabled, theperformance can get worse).
Used to set the MaxValueand MinValue properties of
TIntegerField and
TFloatField to appropriate
values.
Used forTCustomDADataSet toperform additional query to
get the record count for thisSELECT, so the
RecordCount property
reflects the actual number ofrecords.
Used forTCustomDADataSet toquote all database object
names in autogenerated
SQL statements such as
update SQL.
Used for a dataset to locallyremove a record that can not
be found on the server.
Used forTCustomDADataSet to set
the Required property of the
TField objects for the NOTNULL fields.
Used to return the new valueof fields to dataset after
insert or update.
Used for a dataset to set the
ReadOnly property to True
for all fields that do notbelong to UpdatingTable or
can not be updated.
Used forTCustomDADataSet toraise an exception when the453

Oracle Data Access Components

number of updated ordeleted records is not equal
1.
Specifies whether to discard
all trailing spaces in thestring fields of a dataset.
Used to include all dataset
fields in the generated
UPDATE and INSERT
statements.
Used to get or set a valuethat enables or disables
batch processing support,
and specifies the number ofcommands that can be
executed in a batch.

TrimFixedChar

UpdateAllFields

UpdateBatchSize

See Also
TDADataSetOptions ClassTDADataSetOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.1 AutoPrepare Property

Used to execute automatic TCustomDADataSet.Prepare on the query execution.

Class
TDADataSetOptions

Syntaxproperty AutoPrepare: boolean default False;

Remarks
Use the AutoPrepare property to execute automatic TCustomDADataSet.Prepare on thequery execution. Makes sense for cases when a query will be executed several times, forexample, in Master/Detail relationships.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference454

5.10.1.11.2.2 CacheCalcFields Property

Used to enable caching of the TField.Calculated and TField.Lookup fields.

Class
TDADataSetOptions

Syntaxproperty CacheCalcFields: boolean default False;

Remarks
Use the CacheCalcFields property to enable caching of the TField.Calculated and
TField.Lookup fields. It can be useful for reducing CPU usage for calculated fields. Using
caching of calculated and lookup fields increases memory usage on the client side.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.3 CompressBlobMode Property

Used to store values of the BLOB fields in compressed form.

Class
TDADataSetOptions

Syntaxproperty CompressBlobMode: TCompressBlobMode default cbNone;

Remarks
Use the CompressBlobMode property to store values of the BLOB fields in compressed form.
Add the MemData unit to uses list to use this option. Compression rate greatly depends onstored data, for example, usually graphic data compresses badly unlike text.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.4 DefaultValues Property

Used to request default values/expressions from the server and assign them to theDefaultExpression property.

© 2019 Devart

455

Oracle Data Access Components

Class
TDADataSetOptions

Syntaxproperty DefaultValues: boolean default False;

Remarks
If True, the default values/expressions are requested from the server and assigned to theDefaultExpression property of TField objects replacing already existent values.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.5 DetailDelay Property

Used to get or set a delay in milliseconds before refreshing detail dataset while navigating
master dataset.

Class
TDADataSetOptions

Syntaxproperty DetailDelay: integer default 0;

Remarks
Use the DetailDelay property to get or set a delay in milliseconds before refreshing detaildataset while navigating master dataset. If DetailDelay is 0 (the default value) then refreshingof detail dataset occurs immediately. The DetailDelay option should be used for detail dataset.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.6 FieldsOrigin Property

Used for TCustomDADataSet to fill the Origin property of the TField objects by appropriate
value when opening a dataset.

Class
TDADataSetOptions© 2019 DevartReference

456

Syntaxproperty FieldsOrigin: boolean;

Remarks
If True, TCustomDADataSet fills the Origin property of the TField objects by appropriate value
when opening a dataset.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.7 FlatBuffers Property

Used to control how a dataset treats data of the ftString and ftVarBytes fields.

Class
TDADataSetOptions

Syntaxproperty FlatBuffers: boolean default False;

Remarks
Use the FlatBuffers property to control how a dataset treats data of the ftString and ftVarBytes
fields. When set to True, all data fetched from the server is stored in record pdata without
unused tails.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.8 InsertAllSetFields Property

Used to include all set dataset fields in the generated INSERT statement

Class
TDADataSetOptions

Syntaxproperty InsertAllSetFields: boolean default False;

Remarks© 2019 Devart

457

Oracle Data Access Components

If True, all set dataset fields, including those set to NULL explicitly, will be included in thegenerated INSERT statements. Otherwise, only set fields containing not NULL values will be
included to the generated INSERT statement.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.9 LocalMasterDetail Property

Used for TCustomDADataSet to use local filtering to establish master/detail relationship for
detail dataset and does not refer to the server.

Class
TDADataSetOptions

Syntaxproperty LocalMasterDetail: boolean default False;

Remarks
If True, for detail dataset in master-detail relationship TCustomDADataSet uses local filtering
for establishing master/detail relationship and does not refer to the server. Otherwise detaildataset performs query each time a record is selected in master dataset. This option is usefulfor reducing server calls number, server resources economy. It can be useful for slow
connection. The TMemDataSet.CachedUpdates mode can be used for detail dataset only
when this option is set to true. Setting the LocalMasterDetail option to True is notrecommended when detail table contains too many rows, because when it is set to False,
only records that correspond to the current record in master dataset are fetched.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.10 LongStrings Property

Used to represent string fields with the length that is greater than 255 as TStringField.

Class
TDADataSetOptions

Syntaxproperty LongStrings: boolean default True;© 2019 DevartReference

458

Remarks
Use the LongStrings property to represent string fields with the length that is greater than 255
as TStringField, not as TMemoField.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.11 MasterFieldsNullable Property

Allows to use NULL values in the fields by which the relation is built, when generating thequery for the Detail tables (when this option is enabled, the performance can get worse).

Class
TDADataSetOptions

Syntaxproperty MasterFieldsNullable: boolean default False;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.12 NumberRange Property

Used to set the MaxValue and MinValue properties of TIntegerField and TFloatField toappropriate values.

Class
TDADataSetOptions

Syntaxproperty NumberRange: boolean default False;

Remarks
Use the NumberRange property to set the MaxValue and MinValue properties of TIntegerField
and TFloatField to appropriate values.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

459

Oracle Data Access Components

5.10.1.11.2.13 QueryRecCount Property

Used for TCustomDADataSet to perform additional query to get the record count for thisSELECT, so the RecordCount property reflects the actual number of records.

Class
TDADataSetOptions

Syntaxproperty QueryRecCount: boolean default False;

Remarks
If True, and the FetchAll property is False, TCustomDADataSet performs additional query to
get the record count for this SELECT, so the RecordCount property reflects the actual
number of records. Does not have any effect if the FetchAll property is True.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.14 QuoteNames Property

Used for TCustomDADataSet to quote all database object names in autogenerated SQL
statements such as update SQL.

Class
TDADataSetOptions

Syntaxproperty QuoteNames: boolean default False;

Remarks
If True, TCustomDADataSet quotes all database object names in autogenerated SQL
statements such as update SQL.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

460

5.10.1.11.2.15 RemoveOnRefresh Property

Used for a dataset to locally remove a record that can not be found on the server.

Class
TDADataSetOptions

Syntaxproperty RemoveOnRefresh: boolean default True;

Remarks
When the RefreshRecord procedure can't find necessary record on the server andRemoveOnRefresh is set to True, dataset removes the record locally. Usually
RefreshRecord can't find necessary record when someone else dropped the record orchanged the key value of it.
This option makes sense only if the StrictUpdate option is set to False. If the StrictUpdate
option is True, error will be generated regardless of the RemoveOnRefresh option value.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.16 RequiredFields Property

Used for TCustomDADataSet to set the Required property of the TField objects for the NOTNULL fields.

Class
TDADataSetOptions

Syntaxproperty RequiredFields: boolean default True;

Remarks
If True, TCustomDADataSet sets the Required property of the TField objects for the NOTNULL fields. It is useful when table has a trigger which updates the NOT NULL fields.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

461

Oracle Data Access Components

5.10.1.11.2.17 ReturnParams Property

Used to return the new value of fields to dataset after insert or update.

Class
TDADataSetOptions

Syntaxproperty ReturnParams: boolean default False;

Remarks
Use the ReturnParams property to return the new value of fields to dataset after insert or
update. The actual value of field after insert or update may be different from the value stored
in the local memory if the table has a trigger. When ReturnParams is True, OUT parametersof the SQLInsert and SQLUpdate statements is assigned to the corresponding fields.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.18 SetFieldsReadOnly Property

Used for a dataset to set the ReadOnly property to True for all fields that do not belong toUpdatingTable or can not be updated.

Class
TDADataSetOptions

Syntaxproperty SetFieldsReadOnly: boolean default True;

Remarks
If True, dataset sets the ReadOnly property to True for all fields that do not belong toUpdatingTable or can not be updated. Set this option for datasets that use automatic
generation of the update SQL statements only.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference462

5.10.1.11.2.19 StrictUpdate Property

Used for TCustomDADataSet to raise an exception when the number of updated or deleted
records is not equal 1.

Class
TDADataSetOptions

Syntaxproperty StrictUpdate: boolean default True;

Remarks
If True, TCustomDADataSet raises an exception when the number of updated or deleted
records is not equal 1. Setting this option also causes the exception if the RefreshRecord
procedure returns more than one record. The exception does not occur when you execute
SQL query, that doesn't return resultset.
Note: There can be problems if this option is set to True and triggers for UPDATE, DELETE,
REFRESH commands that are defined for the table. So it is recommended to disable (set to
False) this option with triggers.
TrimFixedChar specifies whether to discard all trailing spaces in the string fields of a dataset.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.20 TrimFixedChar Property

Specifies whether to discard all trailing spaces in the string fields of a dataset.

Class
TDADataSetOptions

Syntaxproperty TrimFixedChar: boolean default True;

Remarks
Specifies whether to discard all trailing spaces in the string fields of a dataset.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback463

Oracle Data Access Components

5.10.1.11.2.21 UpdateAllFields Property

Used to include all dataset fields in the generated UPDATE and INSERT statements.

Class
TDADataSetOptions

Syntaxproperty UpdateAllFields: boolean default False;

Remarks
If True, all dataset fields will be included in the generated UPDATE and INSERT statements.
Unspecified fields will have NULL value in the INSERT statements. Otherwise, only updated
fields will be included to the generated update statements.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.11.2.22 UpdateBatchSize Property

Used to get or set a value that enables or disables batch processing support, and specifies
the number of commands that can be executed in a batch.

Class
TDADataSetOptions

Syntaxproperty UpdateBatchSize: Integer default 1;

Remarks
Use the UpdateBatchSize property to get or set a value that enables or disables batchprocessing support, and specifies the number of commands that can be executed in a batch.
Takes effect only when updating dataset in the TMemDataSet.CachedUpdates mode. The
default value is 1.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference464

5.10.1.12 TDAEncryption Class

Used to specify the options of the data encryption in a dataset.
For a list of all members of this type, see TDAEncryption members.

Unit
DBAccess

SyntaxTDAEncryption = class(TPersistent);

Remarks
Set the properties of Encryption to specify the options of the data encryption in a dataset.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.12.1 Members

TDAEncryption class overview.

Properties
Name

Description
Used to specify theencryptor class that will
perform the data encryption.
Used to set field names forwhich encryption will be
performed.

Encryptor

Fields© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.12.2 Properties

Properties of the TDAEncryption class.
For a complete list of the TDAEncryption class members, see the TDAEncryption Members
topic.

PublicName© 2019 Devart

Description

465

Oracle Data Access Components

Used to specify theencryptor class that will
perform the data encryption.

Encryptor

Published
Name

Description
Used to set field names forwhich encryption will be
performed.

FieldsSee Also
TDAEncryption Class
TDAEncryption Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.12.2.1 Encryptor Property

Used to specify the encryptor class that will perform the data encryption.

Class
TDAEncryption

Syntaxproperty Encryptor: TCREncryptor;

Remarks
Use the Encryptor property to specify the encryptor class that will perform the dataencryption.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.12.2.2 Fields Property

Used to set field names for which encryption will be performed.

Class
TDAEncryption© 2019 DevartReference

466

Syntaxproperty Fields: string;

Remarks
Used to set field names for which encryption will be performed. Field names must be
separated by semicolons.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.13 TDAMapRule ClassClass that formes rules for Data Type Mapping.
For a list of all members of this type, see TDAMapRule members.

Unit
DBAccess

Syntax
TDAMapRule = class(TMapRule);

Remarks
Using properties of this class, it is possible to change parameter values of the specified rules
from the TDAMapRules set.

Inheritance Hierarchy
TMapRule
TDAMapRule© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.13.1 Members

TDAMapRule class overview.

Properties
Name© 2019 Devart

Description

467

Oracle Data Access Components

Maximum DB field length,
until which the rule isapplied.
Minimum DB field length,
starting from which the rule
is applied.
Maximum DB field scale,until which the rule is applied
to the specified DB field.
Minimum DB field Scale,starting from which the rule
is applied to the specified
DB field.
DB field type, that the rule isapplied to.
The resultant field length inDelphi.
DataSet field name, forwhich the rule is applied.
The resultant field Scale in
Delphi.
Delphi field type, that the
specified DB type or
DataSet field will bemapped to.
Ignoring errors whenconverting data from DB toDelphi type.

DBLengthMax

DBLengthMin

DBScaleMax

DBScaleMin

DBTypeFieldLength
FieldName
FieldScale

FieldTypeIgnoreErrors© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.13.2 Properties

Properties of the TDAMapRule class.
For a complete list of the TDAMapRule class members, see the TDAMapRule Members
topic.

PublishedName
DBLengthMax

Description
Maximum DB field length,
until which the rule isapplied.
© 2019 DevartReference

468

Minimum DB field length,
starting from which the rule
is applied.
Maximum DB field scale,until which the rule is applied
to the specified DB field.
Minimum DB field Scale,starting from which the rule
is applied to the specified
DB field.
DB field type, that the rule isapplied to.
The resultant field length inDelphi.
DataSet field name, forwhich the rule is applied.
The resultant field Scale in
Delphi.
Delphi field type, that the
specified DB type or
DataSet field will bemapped to.
Ignoring errors whenconverting data from DB toDelphi type.

DBLengthMin

DBScaleMax

DBScaleMin

DBTypeFieldLength
FieldName
FieldScale

FieldTypeIgnoreErrors

See Also
TDAMapRule Class
TDAMapRule Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.13.2.1 DBLengthMax Property

Maximum DB field length, until which the rule is applied.

Class
TDAMapRule

Syntaxproperty DBLengthMax: Integer default rlAny;© 2019 Devart

Provide Feedback

469

Oracle Data Access Components

Remarks
Setting maximum DB field length, until which the rule is applied to the specified DB field.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.13.2.2 DBLengthMin Property

Minimum DB field length, starting from which the rule is applied.

Class
TDAMapRule

Syntaxproperty DBLengthMin: Integer default rlAny;

Remarks
Setting minimum DB field length, starting from which the rule is applied to the specified DB
field.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.13.2.3 DBScaleMax Property

Maximum DB field scale, until which the rule is applied to the specified DB field.

Class
TDAMapRule

Syntaxproperty DBScaleMax: Integer default rlAny;

Remarks
Setting maximum DB field scale, until which the rule is applied to the specified DB field.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

470

5.10.1.13.2.4 DBScaleMin Property

Minimum DB field Scale, starting from which the rule is applied to the specified DB field.

Class
TDAMapRule

Syntaxproperty DBScaleMin: Integer default rlAny;

Remarks
Setting minimum DB field Scale, starting from which the rule is applied to the specified DB
field.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.13.2.5 DBType Property

DB field type, that the rule is applied to.

Class
TDAMapRule

Syntaxproperty DBType: Word default dtUnknown;

Remarks
Setting DB field type, that the rule is applied to. If the current rule is set for Connection, therule will be applied to all fields of the specified type in all DataSets related to this Connection.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.10.1.13.2.6 FieldLength Property

The resultant field length in Delphi.

Class
TDAMapRule© 2019 Devart

DAC Forum

Provide Feedback

471

Oracle Data Access Components

Syntaxproperty FieldLength: Integer default rlAny;

Remarks
Setting the Delphi field length after conversion.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.13.2.7 FieldName Property

DataSet field name, for which the rule is applied.

Class
TDAMapRule

Syntaxproperty FieldName: string;

Remarks
Specifies the DataSet field name, that the rule is applied to. If the current rule is set forConnection, the rule will be applied to all fields with such name in DataSets related to thisConnection.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.13.2.8 FieldScale Property

The resultant field Scale in Delphi.

Class
TDAMapRule

Syntaxproperty FieldScale: Integer default rlAny;

Remarks
Setting the Delphi field Scale after conversion.

© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

472

Provide Feedback

5.10.1.13.2.9 FieldType Property

Delphi field type, that the specified DB type or DataSet field will be mapped to.

Class
TDAMapRule

Syntaxproperty FieldType: TFieldType stored IsFieldTypeStored default
ftUnknown;

Remarks
Setting Delphi field type, that the specified DB type or DataSet field will be mapped to.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.13.2.10 IgnoreErrors Property

Ignoring errors when converting data from DB to Delphi type.

Class
TDAMapRule

Syntaxproperty IgnoreErrors: Boolean default False;

Remarks
Allows to ignore errors while data conversion in case if data or DB data format cannot berecorded to the specified Delphi field type. The default value is false.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.14 TDAMapRules Class

Used for adding rules for DataSet fields mapping with both identifying by field name and by
field type and Delphi field types.

© 2019 Devart

473

Oracle Data Access Components

For a list of all members of this type, see TDAMapRules members.

Unit
DBAccess

Syntax
TDAMapRules = class(TMapRules);Inheritance Hierarchy
TMapRules
TDAMapRules© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.14.1 Members

TDAMapRules class overview.

Properties
Name

Description
Used to avoid raising
exception on mapping rulesthat can't be applied.

IgnoreInvalidRules© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.14.2 Properties

Properties of the TDAMapRules class.
For a complete list of the TDAMapRules class members, see the TDAMapRules Members
topic.

Published
Name
IgnoreInvalidRules

Description
Used to avoid raising
exception on mapping rulesthat can't be applied.

© 2019 DevartReference

474

See Also
TDAMapRules Class
TDAMapRules Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.14.2.1 IgnoreInvalidRules Property

Used to avoid raising exception on mapping rules that can't be applied.

Class
TDAMapRules

Syntaxproperty IgnoreInvalidRules: boolean default False;

Remarks
Allows to ignore errors (not to raise exception) during data conversion in case if the data or
DB data format cannot be recorded to the specified Delphi field type. The default value isfalse.
Note: In order to ignore errors occurring during data conversion, use the
TDAMapRule.IgnoreErrors property

See Also
TDAMapRule.IgnoreErrors© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.15 TDAMetaData ClassA class for retrieving metainformation of the specified database objects in the form of dataset.
For a list of all members of this type, see TDAMetaData members.

Unit
DBAccess

Syntax© 2019 Devart

475

Oracle Data Access Components

TDAMetaData = class(TMemDataSet);

Remarks
TDAMetaData is a TDataSet descendant standing for retrieving metainformation of thespecified database objects in the form of dataset. First of all you need to specify which kind ofmetainformation you want to see. For this you need to assign the
TDAMetaData.MetaDataKind property. Provide one or more conditions in the
TDAMetaData.Restrictions property to diminish the size of the resultset and get only
information you are interested in.
Use the TDAMetaData.GetMetaDataKinds method to get the full list of supported kinds ofmeta data. With the TDAMetaData.GetRestrictions method you can find out what restrictions
are applicable to the specified MetaDataKind.

ExampleThe code below demonstrates how to get information about columns of the 'emp' table:
MetaData.Connection := Connection;
MetaData.MetaDataKind := 'Columns';
MetaData.Restrictions.Values['TABLE_NAME'] := 'Emp';
MetaData.Open;Inheritance Hierarchy
TMemDataSet
TDAMetaData

See Also
TDAMetaData.MetaDataKind
TDAMetaData.Restrictions
TDAMetaData.GetMetaDataKinds
TDAMetaData.GetRestrictions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.15.1 Members

TDAMetaData class overview.

Properties
Name

Description© 2019 DevartReference

CachedUpdates (inherited from TMemDataSet)

Connection
IndexFieldNames (inherited from TMemDataSet)

KeyExclusive (inherited from TMemDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)
MetaDataKind
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
Restrictions

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

476

Used to enable or disable
the use of cached updates
for a dataset.
Used to specify aconnection object to use toconnect to a data store.
Used to get or set the list offields on which the recordset
is sorted.
Specifies the upper andlower boundaries for arange.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to specify which kindof metainformation to show.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to provide one or moreconditions restricting the listof objects to be described.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)© 2019 Devart

Description
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cached477

Oracle Data Access Components

CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)

CommitUpdates (inherited from TMemDataSet)
DeferredPost (inherited from TMemDataSet)
EditRangeEnd (inherited from TMemDataSet)

EditRangeStart (inherited from TMemDataSet)

GetBlob (inherited from TMemDataSet)

GetMetaDataKinds

GetRestrictions

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Prepare (inherited from TMemDataSet)

RestoreUpdates (inherited from TMemDataSet)

updates to a database.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.
Clears the cached updates
buffer.
Makes permanent changes
to the database server.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Used to get values
acceptable in the
MetaDataKind property.
Used to find out which
restrictions are applicable toa certain MetaDataKind.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Allocates resources andcreates field components fora dataset.
Marks all records in thecache of updates asunapplied.
© 2019 DevartReference

RevertRecord (inherited from TMemDataSet)

SaveToXML (inherited from TMemDataSet)

SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

478

Cancels changes made to
the current record whencached updates areenabled.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

EventsName
OnUpdateError (inherited from TMemDataSet)

Description
Occurs when an exception is
generated while cachedupdates are applied to a
database.

OnUpdateRecord (inherited from TMemDataSet)

Occurs when a single© 2019 Devart

479

Oracle Data Access Components

update component can nothandle the updates.
© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.15.2 Properties

Properties of the TDAMetaData class.
For a complete list of the TDAMetaData class members, see the TDAMetaData Members
topic.

PublicName
CachedUpdates (inherited from TMemDataSet)

Connection
IndexFieldNames (inherited from TMemDataSet)

KeyExclusive (inherited from TMemDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)
MetaDataKind
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
Restrictions

Description
Used to enable or disable
the use of cached updates
for a dataset.
Used to specify aconnection object to use toconnect to a data store.
Used to get or set the list offields on which the recordset
is sorted.
Specifies the upper andlower boundaries for arange.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to specify which kindof metainformation to show.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to provide one or moreconditions restricting the list
© 2019 DevartReference

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

480

of objects to be described.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

See Also
TDAMetaData Class
TDAMetaData Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.15.2.1 Connection Property

Used to specify a connection object to use to connect to a data store.

Class
TDAMetaData

Syntaxproperty Connection: TCustomDAConnection;

Remarks
Use the Connection property to specify a connection object to use to connect to a data store.
Set at design-time by selecting from the list of provided TCustomDAConnection or its
descendant class objects.
At runtime, set the Connection property to reference an instanciated TCustomDAConnection
object.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.15.2.2 MetaDataKind Property

Used to specify which kind of metainformation to show.

Class
TDAMetaData© 2019 Devart

Provide Feedback

481

Oracle Data Access Components

Syntaxproperty MetaDataKind: string;

Remarks
This string property specifies which kind of metainformation to show. The value of thisproperty should be assigned before activating the component. If MetaDataKind equals to an
empty string (the default value), the full value list that this property accepts will be shown.
They are described in the table below:

MetaDataKind
Columns
Constraints
IndexColumns
Indexes

Description
show metainformation about columns of existing tables
show metainformation about the constraints defined in the databaseshow metainformation about indexed columns
show metainformation about indexes in a databaseshow the acceptable values of this property. You will get the same
MetaDataKinds
result if the MetadataKind property is an empty string
ProcedureParashow metainformation about parameters of existing procedures
metersProceduresshow metainformation about existing procedures
generates a dataset that describes which restrictions are applicable
Restrictions
to each MetaDataKind
Tablesshow metainformation about existing tables
Databases
show metainformation about existing databases
If you provide a value that equals neither of the values described in the table, an error will beraised.

See Also
Restrictions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.15.2.3 Restrictions Property

Used to provide one or more conditions restricting the list of objects to be described.

Class
TDAMetaData© 2019 DevartReference

482

Syntaxproperty Restrictions: TStrings;

Remarks
Use the Restriction list to provide one or more conditions restricting the list of objects to be
described. To see the full list of restrictions and to which metadata kinds they are applicable,
you should assign the Restrictions value to the MetaDataKind property and view the result.

See Also
MetaDataKind© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.15.3 Methods

Methods of the TDAMetaData class.
For a complete list of the TDAMetaData class members, see the TDAMetaData Members
topic.

PublicName
ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)

CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)

CommitUpdates (inherited from TMemDataSet)
DeferredPost (inherited from TMemDataSet)
EditRangeEnd (inherited from TMemDataSet)© 2019 Devart

Description
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.
Clears the cached updates
buffer.
Makes permanent changes
to the database server.
Enables changing theending value for an existing
range.

483

Oracle Data Access Components

EditRangeStart (inherited from TMemDataSet)

GetBlob (inherited from TMemDataSet)

GetMetaDataKinds

GetRestrictions

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Prepare (inherited from TMemDataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveToXML (inherited from TMemDataSet)

SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

Enables changing thestarting value for an existing
range.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Used to get values
acceptable in the
MetaDataKind property.
Used to find out which
restrictions are applicable toa certain MetaDataKind.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Allocates resources andcreates field components fora dataset.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in the© 2019 DevartReference

SetRangeStart (inherited from TMemDataSet)

UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

484

dataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

See Also
TDAMetaData Class
TDAMetaData Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.15.3.1 GetMetaDataKinds Method

Used to get values acceptable in the MetaDataKind property.

Class
TDAMetaData

Syntax
procedure GetMetaDataKinds(List: TStrings);
Parameters
List
Holds the object that will be filled with metadata kinds (restrictions).

Remarks© 2019 Devart

Provide Feedback

485

Oracle Data Access Components

Call the GetMetaDataKinds method to get values acceptable in the MetaDataKind property.
The List parameter will be cleared and then filled with values.

See Also
MetaDataKind© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.15.3.2 GetRestrictions Method

Used to find out which restrictions are applicable to a certain MetaDataKind.

Class
TDAMetaData

Syntax
procedure GetRestrictions(List: TStrings; const MetaDataKind:
string);Parameters
List
Holds the object that will be filled with metadata kinds (restrictions).
MetaDataKind
Holds the metadata kind for which restrictions are returned.

Remarks
Call the GetRestrictions method to find out which restrictions are applicable to a certain
MetaDataKind. The List parameter will be cleared and then filled with values.

See Also
Restrictions
GetMetaDataKinds© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16 TDAParam ClassA class that forms objects to represent the values of the parameters set.
For a list of all members of this type, see TDAParam members.

© 2019 DevartReference

486

Unit
DBAccess

SyntaxTDAParam = class(TParam);

Remarks
Use the properties of TDAParam to set the value of a parameter. Objects that use
parameters create TDAParam objects to represent these parameters. For example,
TDAParam objects are used by TCustomDASQL, TCustomDADataSet.
TDAParam shares many properties with TField, as both describe the value of a field in adataset. However, a TField object has several properties to describe the field binding and theway the field is displayed, edited, or calculated, that are not needed in a TDAParam object.
Conversely, TDAParam includes properties that indicate how the field value is passed as aparameter.

See Also
TCustomDADataSet
TCustomDASQL
TDAParams© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.1 Members

TDAParam class overview.

Properties
Name
AsBlobAsBlobRef

AsFloat© 2019 Devart

Description
Used to set and read thevalue of the BLOB
parameter as string.
Used to set and read thevalue of the BLOB
parameter as a TBlob
object.
Used to assign the value fora float field to a parameter.

487

Oracle Data Access Components

AsInteger

AsLargeInt

AsMemoAsMemoRef

AsSQLTimeStamp

AsString
AsWideString
DataType
IsNullParamType
Size
Value

Used to assign the value for
an integer field to theparameter.
Used to assign the value fora LargeInteger field to theparameter.
Used to assign the value fora memo field to theparameter.
Used to set and read thevalue of the memo
parameter as a TBlob
object.
Used to specify the value ofthe parameter when it
represents a SQL
timestamp field.
Used to assign the stringvalue to the parameter.
Used to assign the Unicode
string value to theparameter.
Indicates the data type of theparameter.
Used to indicate whether thevalue assigned to aparameter is NULL.
Used to indicate the type ofuse for a parameter.
Specifies the size of a string
type parameter.
Used to represent the valueof the parameter as Variant.

Methods
Name
AssignField
AssignFieldValue
LoadFromFile

Description
Assigns field name and fieldvalue to a param.
Assigns the specified field
properties and value to aparameter.
Places the content of a
specified file into a© 2019 DevartReference

TDAParam object.
Places the content from astream into a TDAParamobject.
Overloaded. Writes the datafrom a specified buffer to
BLOB.

LoadFromStream

SetBlobData© 1997-2019
Devart. All Rights
Reserved.

488

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2 Properties

Properties of the TDAParam class.
For a complete list of the TDAParam class members, see the TDAParam Members topic.

PublicName
AsBlobAsBlobRef

AsFloat
AsInteger

AsLargeInt

AsMemoAsMemoRef

AsSQLTimeStamp© 2019 Devart

Description
Used to set and read thevalue of the BLOB
parameter as string.
Used to set and read thevalue of the BLOB
parameter as a TBlob
object.
Used to assign the value fora float field to a parameter.
Used to assign the value for
an integer field to theparameter.
Used to assign the value fora LargeInteger field to theparameter.
Used to assign the value fora memo field to theparameter.
Used to set and read thevalue of the memo
parameter as a TBlob
object.
Used to specify the value ofthe parameter when it
represents a SQL

489

Oracle Data Access Components

timestamp field.
Used to assign the stringvalue to the parameter.
Used to assign the Unicode
string value to theparameter.
Used to indicate whether thevalue assigned to aparameter is NULL.

AsString
AsWideString

IsNullPublished
Name

Description
Indicates the data type of theparameter.
Used to indicate the type ofuse for a parameter.
Specifies the size of a string
type parameter.
Used to represent the valueof the parameter as Variant.

DataType
ParamType
Size
Value

See Also
TDAParam Class
TDAParam Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.1 AsBlob Property

Used to set and read the value of the BLOB parameter as string.

Class
TDAParam

Syntaxproperty AsBlob: TBlobData;

Remarks
Use the AsBlob property to set and read the value of the BLOB parameter as string. Setting© 2019 DevartReference

490

AsBlob will set the DataType property to ftBlob. AsBlob is the value of the parameter when it
represents the value of the LONG RAW type.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.2 AsBlobRef Property

Used to set and read the value of the BLOB parameter as a TBlob object.

Class
TDAParam

Syntaxproperty AsBlobRef: TBlob;

Remarks
Use the AsBlobRef property to set and read the value of the BLOB parameter as a TBlob
object. Setting AsBlobRef will set the DataType property to ftBlob. Specifies the value of theparameter when it represents the value of the LONG RAW type.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.3 AsFloat Property

Used to assign the value for a float field to a parameter.

Class
TDAParam

Syntaxproperty AsFloat: double;

Remarks
Use the AsFloat property to assign the value for a float field to the parameter. Setting AsFloat
will set the DataType property to dtFloat.
Read the AsFloat property to determine the value that was assigned to an output parameter,
represented as Double. The value of the parameter will be converted to the Double value if
possible.

© 2019 Devart

491

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.4 AsInteger Property

Used to assign the value for an integer field to the parameter.

Class
TDAParam

Syntaxproperty AsInteger: LongInt;

Remarks
Use the AsInteger property to assign the value for an integer field to the parameter. Setting
AsInteger will set the DataType property to dtInteger.
Read the AsInteger property to determine the value that was assigned to an output parameter,
represented as a 32-bit integer. The value of the parameter will be converted to the Integer
value if possible.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.5 AsLargeInt Property

Used to assign the value for a LargeInteger field to the parameter.

Class
TDAParam

Syntaxproperty AsLargeInt: Int64;

Remarks
Set the AsLargeInt property to assign the value for an Int64 field to the parameter. Setting
AsLargeInt will set the DataType property to dtLargeint.
Read the AsLargeInt property to determine the value that was assigned to an output
parameter, represented as a 64-bit integer. The value of the parameter will be converted to
the Int64 value if possible.

© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

492

Provide Feedback

5.10.1.16.2.6 AsMemo Property

Used to assign the value for a memo field to the parameter.

Class
TDAParam

Syntaxproperty AsMemo: string;

Remarks
Use the AsMemo property to assign the value for a memo field to the parameter. Setting
AsMemo will set the DataType property to ftMemo. AsMemo is the value of the parameter
when it represents the value of the LONG type.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.7 AsMemoRef Property

Used to set and read the value of the memo parameter as a TBlob object.

Class
TDAParam

Syntaxproperty AsMemoRef: TBlob;

Remarks
Use the AsMemoRef property to set and read the value of the memo parameter as a TBlob
object. Setting AsMemoRef will set the DataType property to ftMemo. Specifies the value ofthe parameter when it represents the value of the LONG type.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

493

Oracle Data Access Components

5.10.1.16.2.8 AsSQLTimeStamp Property

Used to specify the value of the parameter when it represents a SQL timestamp field.

Class
TDAParam

Syntaxproperty AsSQLTimeStamp: TSQLTimeStamp;

Remarks
Set the AsSQLTimeStamp property to assign the value for a SQL timestamp field to theparameter. Setting AsSQLTimeStamp sets the DataType property to ftTimeStamp.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.9 AsString Property

Used to assign the string value to the parameter.

Class
TDAParam

Syntaxproperty AsString: string;

Remarks
Use the AsString property to assign the string value to the parameter. Setting AsString will set
the DataType property to ftString.
Read the AsString property to determine the value that was assigned to an output parameter
represented as a string. The value of the parameter will be converted to a string.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.10 AsWideString Property

Used to assign the Unicode string value to the parameter.

Class© 2019 DevartReference494

TDAParam

Syntaxproperty AsWideString: string;

Remarks
Set AsWideString to assign the Unicode string value to the parameter. Setting AsWideString
will set the DataType property to ftWideString.
Read the AsWideString property to determine the value that was assigned to an output
parameter, represented as a Unicode string. The value of the parameter will be converted to a
Unicode string.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.11 DataType Property

Indicates the data type of the parameter.

Class
TDAParam

Syntaxproperty DataType: TFieldType stored IsDataTypeStored;

Remarks
DataType is set automatically when a value is assigned to a parameter. Do not set DataTypefor bound fields, as this may cause the assigned value to be misinterpreted.
Read DataType to learn the type of data that was assigned to the parameter. Every possible
value of DataType corresponds to the type of a database field.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.16.2.12 IsNull Property

Used to indicate whether the value assigned to a parameter is NULL.

Class
TDAParam© 2019 Devart

Provide Feedback

495

Oracle Data Access Components

Syntaxproperty IsNull: boolean;

Remarks
Use the IsNull property to indicate whether the value assigned to a parameter is NULL.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.13 ParamType Property

Used to indicate the type of use for a parameter.

Class
TDAParam

Syntaxproperty ParamType default DB . ptUnknown;

Remarks
Objects that use TDAParam objects to represent field parameters set ParamType to indicate
the type of use for a parameter.
To learn the description of TParamType refer to Delphi Help.
Note: The value of ParamType is important for the LONG, LONG RAW, BLOB and CLOB
parameters. To write data to database, set ptInput to ParamType, to read data from database,set ptOutput to ParamType.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.14 Size Property

Specifies the size of a string type parameter.

Class
TDAParam

Syntaxproperty Size: integer default 0;© 2019 DevartReference

496

Remarks
Use the Size property to indicate the maximum number of characters the parameter may
contain. Use the Size property only for Output parameters of the ftString, ftFixedChar,ftBytes, ftVarBytes, or ftWideString type.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.2.15 Value Property

Used to represent the value of the parameter as Variant.

Class
TDAParam

Syntaxproperty Value: variant stored IsValueStored;

Remarks
The Value property represents the value of the parameter as Variant.
Use Value in generic code that manipulates the values of parameters without the need toknow the field type the parameter represent.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.3 Methods

Methods of the TDAParam class.
For a complete list of the TDAParam class members, see the TDAParam Members topic.

PublicName
AssignField
AssignFieldValue
LoadFromFile© 2019 Devart

Description
Assigns field name and fieldvalue to a param.
Assigns the specified field
properties and value to aparameter.
Places the content of a
specified file into a497

Oracle Data Access Components

TDAParam object.
Places the content from astream into a TDAParamobject.
Overloaded. Writes the datafrom a specified buffer to
BLOB.

LoadFromStream

SetBlobData

See Also
TDAParam Class
TDAParam Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.3.1 AssignField Method

Assigns field name and field value to a param.

Class
TDAParam

Syntax
procedure AssignField(Field: TField);Parameters
Field
Holds the field which name and value should be assigned to the param.

Remarks
Call the AssignField method to assign field name and field value to a param.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.3.2 AssignFieldValue Method

Assigns the specified field properties and value to a parameter.

Class
TDAParam© 2019 DevartReference

498

Syntax
procedure AssignFieldValue(Field: TField; const Value: Variant);
virtual;Parameters
Field
Holds the field the properties of which will be assigned to the parameter.
Value
Holds the value for the parameter.

Remarks
Call the AssignFieldValue method to assign the specified field properties and value to aparameter.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.3.3 LoadFromFile Method

Places the content of a specified file into a TDAParam object.

Class
TDAParam

Syntax
procedure LoadFromFile(const FileName: string; BlobType:
TBlobType);
Parameters
FileName
Holds the name of the file.
BlobType
Holds a value that modifies the DataType property so that this TDAParam object now holds
the BLOB value.

Remarks
Use the LoadFromFile method to place the content of a file specified by FileName into a
TDAParam object. The BlobType value modifies the DataType property so that thisTDAParam object now holds the BLOB value.

© 2019 Devart

499

Oracle Data Access Components

See Also
LoadFromStream© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.3.4 LoadFromStream Method

Places the content from a stream into a TDAParam object.

Class
TDAParam

Syntax
procedure LoadFromStream(Stream: TStream; BlobType: TBlobType);
virtual;Parameters
StreamHolds the stream to copy content from.
BlobType
Holds a value that modifies the DataType property so that this TDAParam object now holds
the BLOB value.

Remarks
Call the LoadFromStream method to place the content from a stream into a TDAParamobject. The BlobType value modifies the DataType property so that this TDAParam object
now holds the BLOB value.

See Also
LoadFromFile© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.16.3.5 SetBlobData Method

Writes the data from a specified buffer to BLOB.

Class
TDAParam© 2019 DevartReference

500

Overload List
Name
SetBlobData(Buffer: TValueBuffer)
SetBlobData(Buffer: IntPtr; Size: Integer)© 1997-2019
Devart. All Rights
Reserved.

Request Support

Description
Writes the data from a specified buffer to
BLOB.
Writes the data from a specified buffer to
BLOB.
DAC Forum

Provide Feedback

Writes the data from a specified buffer to BLOB.

Class
TDAParam

Syntax
procedure SetBlobData(Buffer: TValueBuffer); overload;
Parameters
BufferHolds the pointer to the data.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Writes the data from a specified buffer to BLOB.

Class
TDAParam

Syntax
procedure SetBlobData(Buffer: IntPtr; Size: Integer); overload;
Parameters
BufferHolds the pointer to data.
Size
Holds the number of bytes to read from the buffer.

© 2019 Devart

501

Oracle Data Access Components

Remarks
Call the SetBlobData method to write data from a specified buffer to BLOB.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.17 TDAParams ClassThis class is used to manage a list of TDAParam objects for an object that uses fieldparameters.
For a list of all members of this type, see TDAParams members.

Unit
DBAccess

SyntaxTDAParams = class(TParams);

Remarks
Use TDAParams to manage a list of TDAParam objects for an object that uses fieldparameters. For example, TCustomDADataSet objects and TCustomDASQL objects use
TDAParams objects to create and access their parameters.

See Also
TCustomDADataSet.Params
TCustomDASQL.Params
TDAParam© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.17.1 Members

TDAParams class overview.

Properties
Name
Items

Description
Used to interate through allparameters.
© 2019 DevartReference

502

Methods
Name

Description
Searches for a parameterwith the specified name.
Searches for a parameterwith the specified name.

FindParam
ParamByName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.17.2 Properties

Properties of the TDAParams class.
For a complete list of the TDAParams class members, see the TDAParams Members topic.

PublicName

Description
Used to interate through allparameters.

Items

See Also
TDAParams Class
TDAParams Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.17.2.1 Items Property(Indexer)

Used to interate through all parameters.

Class
TDAParams

Syntaxproperty Items[Index: integer]: TDAParam; default;
Parameters
Index
Holds an index in the range 0..Count - 1.
© 2019 Devart

503

Oracle Data Access Components

Remarks
Use the Items property to iterate through all parameters. Index identifies the index in the range
0..Count - 1. Items can reference a particular parameter by its index, but the ParamByName
method is preferred in order to avoid depending on the order of the parameters.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.17.3 Methods

Methods of the TDAParams class.
For a complete list of the TDAParams class members, see the TDAParams Members topic.

PublicName

Description
Searches for a parameterwith the specified name.
Searches for a parameterwith the specified name.

FindParam
ParamByName

See Also
TDAParams Class
TDAParams Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.17.3.1 FindParam Method

Searches for a parameter with the specified name.

Class
TDAParams

Syntaxfunction FindParam(const Value: string): TDAParam;
Parameters
Value
Holds the parameter name.
© 2019 DevartReference

504

Return Valuea parameter, if a match was found. Nil otherwise.

Remarks
Use the FindParam method to find a parameter with the name passed in Value. If a match isfound, FindParam returns the parameter. Otherwise, it returns nil. Use this method rather
than a direct reference to the Items property to avoid depending on the order of the entries.
To locate more than one parameter at a time by name, use the GetParamList method
instead. To get only the value of a named parameter, use the ParamValues property.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.17.3.2 ParamByName Method

Searches for a parameter with the specified name.

Class
TDAParams

Syntaxfunction ParamByName(const Value: string): TDAParam;
Parameters
Value
Holds the parameter name.
Return Valuea parameter, if the match was found. otherwise an exception is raised.

Remarks
Use the ParamByName method to find a parameter with the name passed in Value. If amatch was found, ParamByName returns the parameter. Otherwise, an exception is raised.
Use this method rather than a direct reference to the Items property to avoid depending on theorder of the entries.
To locate a parameter by name without raising an exception if the parameter is not found, use
the FindParam method.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

505

Oracle Data Access Components

5.10.1.18 TDATransaction ClassA base class that implements functionality for controlling transactions.
For a list of all members of this type, see TDATransaction members.

Unit
DBAccess

SyntaxTDATransaction = class(TComponent);

Remarks
TDATransaction is a base class for components implementing functionality for managing
transactions.
Do not create instances of TDATransaction. Use descendants of the TDATransaction classinstead.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.1 Members

TDATransaction class overview.

Properties
Name
ActiveDefaultCloseAction

Description
Used to determine if thetransaction is active.
Used to specify thetransaction behaviour when
it is destroyed while being
active, or when one of its
connections is closed withthe active transaction.

Methods
Name
CommitDescription
Commits the current
transaction.

Rollback

Discards all modifications of© 2019 DevartReference

506

data associated with thecurrent transaction and ends
the transaction.
Begins a new transaction.

StartTransaction

EventsName

Description
Occurs after the transaction
has been successfullycommitted.
Occurs after
CommitRetaining has been
executed.
Used to process errors that
occur during executing atransaction.
Occurs after the transaction
has been successfully rolledback.
Occurs after
RollbackRetaining has been
executed.

OnCommit

OnCommitRetaining

OnError

OnRollback

OnRollbackRetaining© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.2 Properties

Properties of the TDATransaction class.
For a complete list of the TDATransaction class members, see the TDATransaction
Members topic.

PublicName
ActiveDefaultCloseAction© 2019 Devart

Description
Used to determine if thetransaction is active.
Used to specify thetransaction behaviour when
it is destroyed while being
active, or when one of its
connections is closed with

507

Oracle Data Access Components

the active transaction.

See Also
TDATransaction Class
TDATransaction Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.2.1 Active Property

Used to determine if the transaction is active.

Class
TDATransaction

Syntaxproperty Active: boolean;

Remarks
Indicates whether the transaction is active. This property is read-only.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.2.2 DefaultCloseAction Property

Used to specify the transaction behaviour when it is destroyed while being active, or when
one of its connections is closed with the active transaction.

Class
TDATransaction

Syntaxproperty DefaultCloseAction: TCRTransactionAction default
taRollback;Remarks
Use DefaultCloseAction to specify the transaction behaviour when it is destroyed while being
active, or when one of its connections is closed with the active transaction.
© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

508

Provide Feedback

5.10.1.18.3 Methods

Methods of the TDATransaction class.
For a complete list of the TDATransaction class members, see the TDATransaction
Members topic.

PublicName

Description
Commits the current
transaction.
Discards all modifications ofdata associated with thecurrent transaction and ends
the transaction.
Begins a new transaction.

CommitRollback
StartTransaction

See Also
TDATransaction Class
TDATransaction Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.3.1 Commit Method

Commits the current transaction.

Class
TDATransaction

Syntax
procedure Commit; virtual;

Remarks
Call the Commit method to commit the current transaction. On commit server writes
permanently all pending data updates associated with the current transaction to the database,and then finishes the transaction.
© 2019 Devart

509

Oracle Data Access Components

See Also
Rollback
StartTransaction© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.3.2 Rollback Method

Discards all modifications of data associated with the current transaction and ends thetransaction.

Class
TDATransaction

Syntax
procedure Rollback; virtual;

Remarks
Call Rollback to cancel all data modifications made within the current transaction to the
database server, and finish the transaction.

See Also
CommitStartTransaction© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.3.3 StartTransaction Method

Begins a new transaction.

Class
TDATransaction

Syntax
procedure StartTransaction; virtual;

Remarks© 2019 DevartReference

510

Call the StartTransaction method to begin a new transaction against the database server.
Before calling StartTransaction, an application should check the Active property. If
TDATransaction.Active is True, indicating that a transaction is already in progress, a
subsequent call to StartTransaction will raise EDatabaseError. An active transaction must be
finished by call to Commit or Rollback before call to StartTransaction. Call to StartTransaction
when connection is closed also will raise EDatabaseError.
Updates, insertions, and deletions that take place after a call to StartTransaction are held by
the server until the application calls Commit to save the changes, or Rollback to cancel them.

See Also
CommitRollback© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.4 Events

Events of the TDATransaction class.
For a complete list of the TDATransaction class members, see the TDATransaction
Members topic.

PublicName
OnCommit

OnCommitRetaining

OnError

OnRollback

OnRollbackRetaining

See Also© 2019 Devart

Description
Occurs after the transaction
has been successfullycommitted.
Occurs after
CommitRetaining has been
executed.
Used to process errors that
occur during executing atransaction.
Occurs after the transaction
has been successfully rolledback.
Occurs after
RollbackRetaining has been
executed.

511

Oracle Data Access Components

TDATransaction Class
TDATransaction Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.4.1 OnCommit Event

Occurs after the transaction has been successfully committed.

Class
TDATransaction

Syntaxproperty OnCommit: TNotifyEvent;Remarks
The OnCommit event fires when the M:Devart.Dac.TDATransaction.Commit method is
executed, just after the transaction is successfully committed. In order to respond to the
M:Devart.Odac.TOraTransaction.CommitRetaining() method execution, theOnCommitRetaining event is used. When an error occurs during commit, the OnError event
fires.

See Also
Commit
M:Devart.Odac.TOraTransaction.CommitRetaining()
OnCommitRetaining
OnError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.4.2 OnCommitRetaining Event

Occurs after CommitRetaining has been executed.

Class
TDATransaction

Syntax© 2019 DevartReference

512

property OnCommitRetaining: TNotifyEvent;Remarks
The OnCommitRetaining event fires when the
M:Devart.Odac.TOraTransaction.CommitRetaining() method is executed, just after thetransaction is successfully committed. In order to respond to the
M:Devart.Dac.TDATransaction.Commit method execution, the OnCommit event is used.
When an error occurs during commit, the OnError event fired.

See Also
M:Devart.Odac.TOraTransaction.CommitRetaining()
Commit
OnCommit
OnError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.4.3 OnError Event

Used to process errors that occur during executing a transaction.

Class
TDATransaction

Syntaxproperty OnError: TDATransactionErrorEvent;Remarks
Add a handler to the OnError event to process errors that occur during executing atransaction and save point control statements such as Commit, Rollback,TOraTransaction.Savepoint, TOraTransaction.RollbackToSavepoint, and others. Check the Eparameter to get the error code.

See Also
CommitRollback
StartTransaction© 2019 Devart

513

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.4.4 OnRollback Event

Occurs after the transaction has been successfully rolled back.

Class
TDATransaction

Syntaxproperty OnRollback: TNotifyEvent;Remarks
The OnRollback event fires when the M:Devart.Dac.TDATransaction.Rollback method is
executed, just after the transaction is successfully rolled back. In order to respond to the
M:Devart.Odac.TOraTransaction.RollbackRetaining() method execution, theOnRollbackRetaining event is used.
When an error occurs during rollback, the OnError event fired.

See Also
Rollback
M:Devart.Odac.TOraTransaction.RollbackRetaining()
OnRollbackRetaining
OnError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.18.4.5 OnRollbackRetaining Event

Occurs after RollbackRetaining has been executed.

Class
TDATransaction

Syntaxproperty OnRollbackRetaining: TNotifyEvent;Remarks© 2019 DevartReference

514

The OnRollbackRetaining event fires when the
M:Devart.Odac.TOraTransaction.RollbackRetaining() method is executed, just after thetransaction is successfully rolled back. In order to respond to the
M:Devart.Dac.TDATransaction.Rollback method execution, the OnRollback event is used.
When an error occurs during rollback, the OnError event fired.

See Also
Rollback
M:Devart.Odac.TOraTransaction.RollbackRetaining()
OnRollback
OnError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.19 TMacro Class

Object that represents the value of a macro.
For a list of all members of this type, see TMacro members.

Unit
DBAccess

SyntaxTMacro = class(TCollectionItem);Remarks
TMacro object represents the value of a macro. Macro is a variable that holds string value.
You just insert & MacroName in a SQL query text and change the value of macro by the
Macro property editor at design time or the Value property at run time. At the time of opening
query macro is replaced by its value.
If by any reason it is not convenient for you to use the ' & ' symbol as a character of macro
replacement, change the value of the MacroChar variable.

See Also
TMacros© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

515

Oracle Data Access Components

5.10.1.19.1 Members

TMacro class overview.

Properties
Name

Description
Used to determine if themacro should be expanded.
Used to set the TDataTime
value to a macro.
Used to set the float value toa macro.
Used to set the integer value
to a macro.
Used to assign the stringvalue to a macro.
Used to identify a particularmacro.
Used to set the value to a
macro.

ActiveAsDateTime
AsFloat
AsInteger
AsString
Name
Value© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.19.2 Properties

Properties of the TMacro class.
For a complete list of the TMacro class members, see the TMacro Members topic.

PublicName
AsDateTime
AsFloat
AsInteger
AsString

Description
Used to set the TDataTime
value to a macro.
Used to set the float value toa macro.
Used to set the integer value
to a macro.
Used to assign the stringvalue to a macro.

Published© 2019 DevartReference

Name

516

Description
Used to determine if themacro should be expanded.
Used to identify a particularmacro.
Used to set the value to a
macro.

ActiveName
Value

See Also
TMacro Class
TMacro Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.19.2.1 Active Property

Used to determine if the macro should be expanded.

Class
TMacroSyntaxproperty Active: boolean default True;

Remarks
When set to True, the macro will be expanded, otherwise macro definition is replaced by null
string. You can use the Active property to modify the SQL property.
The default value is True.

ExampleOraQuery.SQL.Text := 'SELECT * FROM Dept WHERE DeptNo > 20 &Cond1';
OraQuery.Macros[0].Value := 'and DName is NULL';
OraQuery.Macros[0].Active:= False;© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

517

Oracle Data Access Components

5.10.1.19.2.2 AsDateTime Property

Used to set the TDataTime value to a macro.

Class
TMacroSyntaxproperty AsDateTime: TDateTime;

Remarks
Use the AsDataTime property to set the TDataTime value to a macro.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.19.2.3 AsFloat Property

Used to set the float value to a macro.

Class
TMacroSyntaxproperty AsFloat: double;

Remarks
Use the AsFloat property to set the float value to a macro.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.19.2.4 AsInteger Property

Used to set the integer value to a macro.

Class
TMacroSyntaxproperty AsInteger: integer;© 2019 DevartReference

518

Remarks
Use the AsInteger property to set the integer value to a macro.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.19.2.5 AsString Property

Used to assign the string value to a macro.

Class
TMacroSyntaxproperty AsString: string;

Remarks
Use the AsString property to assign the string value to a macro. Read the AsString property todetermine the value of macro represented as a string.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.19.2.6 Name Property

Used to identify a particular macro.

Class
TMacroSyntaxproperty Name: string;

Remarks
Use the Name property to identify a particular macro.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

519

Oracle Data Access Components

5.10.1.19.2.7 Value Property

Used to set the value to a macro.

Class
TMacroSyntaxproperty Value: string;

Remarks
Use the Value property to set the value to a macro.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.20 TMacros Class

Controls a list of TMacro objects for the TCustomDASQL.Macros or TCustomDADataSet
components.
For a list of all members of this type, see TMacros members.

Unit
DBAccess

SyntaxTMacros = class(TCollection);

Remarks
Use TMacros to manage a list of TMacro objects for the TCustomDASQL or
TCustomDADataSet components.

See Also
TMacro© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

520

5.10.1.20.1 Members

TMacros class overview.

Properties
Name

Description
Used to iterate through all
the macros parameters.

Items

Methods
Name

Description
Copies the macros values
and properties from thespecified source.
Changes the macros in thepassed SQL statement totheir values.
Searches for a TMacroobject by its name.
Compares itself with another
TMacro object.
Used to search for a macrowith the specified name.
Creates a macros from thepassed SQL statement.

AssignValues

ExpandFindMacro
IsEqualMacroByName
Scan© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.20.2 Properties

Properties of the TMacros class.
For a complete list of the TMacros class members, see the TMacros Members topic.

PublicName
Items

See Also© 2019 Devart

Description
Used to iterate through all
the macros parameters.

521

Oracle Data Access Components

TMacros Class
TMacros Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.20.2.1 Items Property(Indexer)

Used to iterate through all the macros parameters.

Class
TMacros

Syntaxproperty Items[Index: integer]: TMacro; default;
Parameters
Index
Holds the index in the range 0..Count - 1.

Remarks
Use the Items property to iterate through all macros parameters. Index identifies the index in
the range 0..Count - 1.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.20.3 Methods

Methods of the TMacros class.
For a complete list of the TMacros class members, see the TMacros Members topic.

PublicName
AssignValues

ExpandFindMacro

Description
Copies the macros values
and properties from thespecified source.
Changes the macros in thepassed SQL statement totheir values.
Searches for a TMacroobject by its name.
© 2019 DevartReference

522

Compares itself with another
TMacro object.
Used to search for a macrowith the specified name.
Creates a macros from thepassed SQL statement.

IsEqualMacroByName
Scan

See Also
TMacros Class
TMacros Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.20.3.1 AssignValues Method

Copies the macros values and properties from the specified source.

Class
TMacros

Syntax
procedure AssignValues(Value: TMacros);Parameters
Value
Holds the source to copy the macros values and properties from.

Remarks
The Assign method copies the macros values and properties from the specified source.
Macros are not recreated. Only the values of macros with matching names are assigned.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.10.1.20.3.2 Expand Method

Changes the macros in the passed SQL statement to their values.

Class
TMacros© 2019 Devart

Provide Feedback

523

Oracle Data Access Components

Syntax
procedure Expand(var SQL: string);
Parameters
SQL
Holds the passed SQL statement.

Remarks
Call the Expand method to change the macros in the passed SQL statement to their values.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.20.3.3 FindMacro Method

Searches for a TMacro object by its name.

Class
TMacros

Syntaxfunction FindMacro(const Value: string): TMacro;Parameters
Value
Holds the value of a macro to search for.
Return Value
TMacro object if a match was found, nil otherwise.

Remarks
Call the FindMacro method to find a macro with the name passed in Value. If a match isfound, FindMacro returns the macro. Otherwise, it returns nil. Use this method rather than adirect reference to the Items property to avoid depending on the order of the entries.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference524

5.10.1.20.3.4 IsEqual Method

Compares itself with another TMacro object.

Class
TMacros

Syntaxfunction IsEqual(Value: TMacros): boolean;
Parameters
Value
Holds the values of TMacro objects.
Return Value
True, if the number of TMacro objects and the values of all TMacro objects are equal.

Remarks
Call the IsEqual method to compare itself with another TMacro object. Returns True if thenumber of TMacro objects and the values of all TMacro objects are equal.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.20.3.5 MacroByName Method

Used to search for a macro with the specified name.

Class
TMacros

Syntaxfunction MacroByName(const Value: string): TMacro;Parameters
Value
Holds a name of the macro to search for.
Return Value
TMacro object, if a macro with specified name was found.

Remarks
Call the MacroByName method to find a Macro with the name passed in Value. If a match is© 2019 Devart

525

Oracle Data Access Components

found, MacroByName returns the Macro. Otherwise, an exception is raised. Use this method
rather than a direct reference to the Items property to avoid depending on the order of theentries.
To locate a macro by name without raising an exception if the parameter is not found, use the
FindMacro method.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.20.3.6 Scan Method

Creates a macros from the passed SQL statement.

Class
TMacros

Syntax
procedure Scan(const SQL: string);
Parameters
SQL
Holds the passed SQL statement.

Remarks
Call the Scan method to create a macros from the passed SQL statement. On that allexisting TMacro objects are cleared.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.21 TPoolingOptions ClassThis class allows setting up the behaviour of the connection pool.
For a list of all members of this type, see TPoolingOptions members.

Unit
DBAccess

Syntax
TPoolingOptions = class(TPersistent);© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

526

Devart. All Rights
Reserved.
5.10.1.21.1 Members

TPoolingOptions class overview.

Properties
Name

Description
Used to specify the
maximum time during which
an opened connection canbe used by connection pool.
Used to specify the
maximum number ofconnections that can be
opened in connection pool.
Used to specify theminimum number ofconnections that can be
opened in the connection
pool.
Used for a connection to bevalidated when it is returned
from the pool.

ConnectionLifetime

MaxPoolSize

MinPoolSize

Validate© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.21.2 Properties

Properties of the TPoolingOptions class.
For a complete list of the TPoolingOptions class members, see the TPoolingOptions
Members topic.

Published
Name
ConnectionLifetime

Description
Used to specify the
maximum time during which
an opened connection canbe used by connection pool.

MaxPoolSize

Used to specify the
maximum number of© 2019 Devart

527

Oracle Data Access Components

connections that can be
opened in connection pool.
Used to specify theminimum number ofconnections that can be
opened in the connection
pool.
Used for a connection to bevalidated when it is returned
from the pool.

MinPoolSize

Validate

See Also
TPoolingOptions Class
TPoolingOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.21.2.1 ConnectionLifetime Property

Used to specify the maximum time during which an opened connection can be used byconnection pool.

Class
TPoolingOptions

Syntaxproperty ConnectionLifetime: integer default
DefValConnectionLifetime;

Remarks
Use the ConnectionLifeTime property to specify the maximum time during which an opened
connection can be used by connection pool. Measured in milliseconds. Pool deletesconnections with exceeded connection lifetime when TCustomDAConnection is about toclose. If the ConnectionLifetime property is set to 0 (by default), then the lifetime of connection
is infinity. ConnectionLifetime concerns only inactive connections in the pool.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

528

5.10.1.21.2.2 MaxPoolSize Property

Used to specify the maximum number of connections that can be opened in connection pool.

Class
TPoolingOptions

Syntaxproperty MaxPoolSize: integer default DefValMaxPoolSize;

Remarks
Specifies the maximum number of connections that can be opened in connection pool. Once
this value is reached, no more connections are opened. The valid values are 1 and higher.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.21.2.3 MinPoolSize Property

Used to specify the minimum number of connections that can be opened in the connection
pool.

Class
TPoolingOptions

Syntaxproperty MinPoolSize: integer default DefValMinPoolSize;

Remarks
Use the MinPoolSize property to specify the minimum number of connections that can be
opened in the connection pool.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.21.2.4 Validate Property

Used for a connection to be validated when it is returned from the pool.

Class
TPoolingOptions© 2019 Devart

529

Oracle Data Access Components

Syntaxproperty Validate: boolean default DefValValidate;

Remarks
If the Validate property is set to True, connection will be validated when it is returned from thepool. By default this option is set to False and pool does not validate connection when it isreturned to be used by a TCustomDAConnection component.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.22 TSmartFetchOptions Class

Smart fetch options are used to set up the behavior of the SmartFetch mode.
For a list of all members of this type, see TSmartFetchOptions members.

Unit
DBAccess

SyntaxTSmartFetchOptions = class(TPersistent);© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.22.1 Members

TSmartFetchOptions class overview.

Properties
Name
Enabled
LiveBlockPrefetchedFields
SQLGetKeyValues

Description
Sets SmartFetch mode
enabled or not.
Used to minimize memory
consumption.
List of fields additional to
key fields that will be readfrom the database on
dataset open.
SQL query for the read key© 2019 DevartReference

530

and prefetched fields fromthe database.
© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.22.2 Properties

Properties of the TSmartFetchOptions class.
For a complete list of the TSmartFetchOptions class members, see theTSmartFetchOptions Members topic.

Published
Name

Description
Sets SmartFetch mode
enabled or not.
Used to minimize memory
consumption.
List of fields additional to
key fields that will be readfrom the database on
dataset open.
SQL query for the read key
and prefetched fields fromthe database.

Enabled
LiveBlockPrefetchedFields

SQLGetKeyValues

See Also
TSmartFetchOptions Class
TSmartFetchOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.10.1.22.2.1 Enabled Property

Sets SmartFetch mode enabled or not.

Class
TSmartFetchOptions

Syntax© 2019 Devart

DAC Forum

Provide Feedback

531

Oracle Data Access Components

property Enabled: Boolean default False;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.22.2.2 LiveBlock Property

Used to minimize memory consumption.

Class
TSmartFetchOptions

Syntaxproperty LiveBlock: Boolean default True;

Remarks
If LiveBlock is True, then on navigating through a dataset forward or backward, memory willbe allocated for records count defined in the the FetchRows propety, and no additional
memory will be allocated. But if you return records that were read from the database before,
they will be read from the database again, because when you left block with these records,
memory was free. So the LiveBlock mode minimizes memory consumption, but candecrease performance, because it can lead to repeated data reading from the database.
The default value of LiveBlock is False.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.1.22.2.3 PrefetchedFields Property

List of fields additional to key fields that will be read from the database on dataset open.

Class
TSmartFetchOptions

Syntaxproperty PrefetchedFields: string;

Remarks
If you are going to use locate, filter or sort by some fields, then these fields should be added tothe prefetched fields list to avoid excessive reading from the database.
© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

532

Provide Feedback

5.10.1.22.2.4 SQLGetKeyValues Property

SQL query for the read key and prefetched fields from the database.

Class
TSmartFetchOptions

Syntaxproperty SQLGetKeyValues: TStrings;

Remarks
SQLGetKeyValues is used when the basic SQL query is complex and the query for reading
the key and prefetched fields can't be generated automatically.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.2 Types
Types in the DBAccess unit.

Types
Name
TAfterExecuteEvent

TAfterFetchEvent

TBeforeFetchEvent

TConnectionLostEvent
TDAConnectionErrorEvent© 2019 Devart

Description
This type is used for the
TCustomDADataSet.AfterE
xecute andTCustomDASQL.AfterExecu
te events.
This type is used for the
TCustomDADataSet.AfterF
etch event.
This type is used for the
TCustomDADataSet.Before
Fetch event.
This type is used for the
TCustomDAConnection.On
ConnectionLost event.
This type is used for the
TCustomDAConnection.On

533

Oracle Data Access Components

Error event.
This type is used for the
TDATransaction.OnError
event.
Represents the set of
TRefreshOption.
This type is used for the
TCustomDADataSet.AfterU
pdateExecute andTCustomDADataSet.Before
UpdateExecute events.

TDATransactionErrorEvent
TRefreshOptions

TUpdateExecuteEvent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.2.1 TAfterExecuteEvent Procedure ReferenceThis type is used for the TCustomDADataSet.AfterExecute andTCustomDASQL.AfterExecute events.

Unit
DBAccess

SyntaxTAfterExecuteEvent = procedure (Sender: TObject; Result: boolean)of object;Parameters
SenderAn object that raised the event.
Result
The result is True if SQL statement is executed successfully. False otherwise.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.2.2 TAfterFetchEvent Procedure ReferenceThis type is used for the TCustomDADataSet.AfterFetch event.

Unit
DBAccess© 2019 DevartReference

534

SyntaxTAfterFetchEvent = procedure (DataSet: TCustomDADataSet) of
object;Parameters
DataSetHolds the TCustomDADataSet descendant to synchronize the record position with.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.2.3 TBeforeFetchEvent Procedure ReferenceThis type is used for the TCustomDADataSet.BeforeFetch event.

Unit
DBAccess

SyntaxTBeforeFetchEvent = procedure (DataSet: TCustomDADataSet; var
Cancel: boolean) of object;Parameters
DataSetHolds the TCustomDADataSet descendant to synchronize the record position with.
CancelTrue, if the current fetch operation should be aborted.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.2.4 TConnectionLostEvent Procedure ReferenceThis type is used for the TCustomDAConnection.OnConnectionLost event.

Unit
DBAccess

SyntaxTConnectionLostEvent = procedure (Sender: TObject; Component:
TComponent; ConnLostCause: TConnLostCause; var RetryMode:© 2019 Devart

535

Oracle Data Access Components

TRetryMode) of object;Parameters
SenderAn object that raised the event.
Component
ConnLostCause
The reason of the connection loss.
RetryMode
The application behavior when connection is lost.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.2.5 TDAConnectionErrorEvent Procedure ReferenceThis type is used for the TCustomDAConnection.OnError event.

Unit
DBAccess

SyntaxTDAConnectionErrorEvent = procedure (Sender: TObject; E: EDAError;
var Fail: boolean) of object;Parameters
SenderAn object that raised the event.
E
The error information.
Fail
False, if an error dialog should be prevented from being displayed and EAbort exception
should be raised to cancel current operation .

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.2.6 TDATransactionErrorEvent Procedure ReferenceThis type is used for the TDATransaction.OnError event.

Unit© 2019 DevartReference536

DBAccess

SyntaxTDATransactionErrorEvent = procedure (Sender: TObject; E:
EDAError; var Fail: boolean) of object;Parameters
SenderAn object that raised the event.
E
The error code.
Fail
False, if an error dialog should be prevented from being displayed and EAbort exception tocancel the current operation should be raised.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.2.7 TRefreshOptions Set

Represents the set of TRefreshOption.

Unit
DBAccess

SyntaxTRefreshOptions = set of TRefreshOption;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.2.8 TUpdateExecuteEvent Procedure ReferenceThis type is used for the TCustomDADataSet.AfterUpdateExecute andTCustomDADataSet.BeforeUpdateExecute events.

Unit
DBAccess

SyntaxTUpdateExecuteEvent = procedure (Sender: TDataSet; StatementTypes:© 2019 Devart

537

Oracle Data Access Components

TStatementTypes; Params: TDAParams) of object;Parameters
SenderAn object that raised the event.
StatementTypes
Holds the type of the SQL statement being executed.
ParamsHolds the parameters with which the SQL statement will be executed.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.3 Enumerations
Enumerations in the DBAccess unit.

Enumerations
Name

Description
Specifies the action to takewhen another user makes
modifications to a record.
Sets the languauge of labelsin the connect dialog.
Specifies when the lockingof an editing record shouldbe performed.
Indicates when the editing
record will be refreshed.
Specifies the application
behavior when connection is
lost.

TCheckMode
TLabelSet
TLockMode
TRefreshOption
TRetryMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.3.1 TCheckMode Enumeration

Specifies the action to take when another user makes modifications to a record.

Unit
DBAccess© 2019 DevartReference

538

SyntaxTCheckMode = (cmNone, cmException, cmRefresh);

ValuesValue
cmException
cmNonecmRefresh© 1997-2019
Devart. All Rights
Reserved.

Meaning
If a record was changed, TOraDataSet raises an exception.
No check is performed. The default value.
If a record was changed, TOraDataSet refreshes it.
Request Support

DAC Forum

Provide Feedback

5.10.3.2 TLabelSet Enumeration

Sets the languauge of labels in the connect dialog.

Unit
DBAccess

SyntaxTLabelSet = (lsCustom, lsEnglish, lsFrench, lsGerman, lsItalian,lsPolish, lsPortuguese, lsRussian, lsSpanish);

ValuesValue
lsCustomlsEnglish
lsFrenchlsGermanlsItalianlsPolishlsPortuguese
lsRussianlsSpanish© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Meaning
Set the language of labels in the connect dialog manually.
Set English as the language of labels in the connect dialog.
Set French as the language of labels in the connect dialog.
Set German as the language of labels in the connect dialog.
Set Italian as the language of labels in the connect dialog.
Set Polish as the language of labels in the connect dialog.
Set Portuguese as the language of labels in the connect dialog.
Set Russian as the language of labels in the connect dialog.
Set Spanish as the language of labels in the connect dialog.
Request Support

DAC Forum

Provide Feedback

539

Oracle Data Access Components

5.10.3.3 TLockMode Enumeration

Specifies when the locking of an editing record should be performed.

Unit
DBAccess

SyntaxTLockMode = (lmNone);

ValuesValuelmLockDelayed
lmLockImmediate
lmNone© 1997-2019
Devart. All Rights
Reserved.

Meaning
Locking is performed, then the user posts an edited record. Afterthat the lock is released.
Locking is performed then the user starts editing a record. The
lock remains until the user posts or cancels the changes.
No locking is performed. This should only be used in single user
applications. The default value.
Request Support

DAC Forum

Provide Feedback

5.10.3.4 TRefreshOption Enumeration

Indicates when the editing record will be refreshed.

Unit
DBAccess

SyntaxTRefreshOption = (roAfterInsert, roAfterUpdate, roBeforeEdit);ValuesValue
roAfterInsert
roAfterUpdate
roBeforeEdit

Meaning
Refresh is performed after inserting.
Refresh is performed after updating.
Refresh is performed by Edit method.

© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

540

Reserved.
5.10.3.5 TRetryMode Enumeration

Specifies the application behavior when connection is lost.

Unit
DBAccess

SyntaxTRetryMode = (rmRaise, rmReconnect, rmReconnectExecute);

ValuesValue
MeaningrmRaiseAn exception is raised.
rmReconnect
Reconnect is performed and then exception is raised.
rmReconnectExec Reconnect is performed and abortive operation is reexecuted.
ute
Exception is not raised.
© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.4 Variables
Variables in the DBAccess unit.

Variables
Name

BaseSQLOldBehavior

ChangeCursor

SQLGeneratorCompatibility© 2019 Devart

Description
After assigning SQL text andmodifying it by AddWhere,
DeleteWhere, and
SetOrderBy, all subsequentchanges of the SQL property
will not be reflected in the
BaseSQL property.
When set to True allows
data access components tochange screen cursor for the
execution time.
The value of theTCustomDADataSet.BaseS

541

Oracle Data Access Components

QL property is used tocomplete the refresh SQL
statement, if the manuallyassigned
TCustomDAUpdateSQL.Ref
reshSQL property contains
only WHERE clause.
© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.4.1 BaseSQLOldBehavior Variable

After assigning SQL text and modifying it by AddWhere, DeleteWhere, and SetOrderBy, allsubsequent changes of the SQL property will not be reflected in the BaseSQL property.

Unit
DBAccess

SyntaxBaseSQLOldBehavior: boolean = False;

Remarks
The BaseSQL property is similar to the SQL property, but it does not store changes made by
the AddWhere, DeleteWhere, and SetOrderBy methods. After assigning SQL text andmodifying it by one of these methods, all subsequent changes of the SQL property will not bereflected in the BaseSQL property. This behavior was changed in ODAC 5.55.1.26. To
restore old behavior, set the BaseSQLOldBehavior variable to True.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.4.2 ChangeCursor Variable

When set to True allows data access components to change screen cursor for the execution
time.

Unit
DBAccess

Syntax© 2019 DevartReference

542

ChangeCursor: boolean = True;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.10.4.3 SQLGeneratorCompatibility Variable

The value of the TCustomDADataSet.BaseSQL property is used to complete the refresh SQL
statement, if the manually assigned TCustomDAUpdateSQL.RefreshSQL property contains
only WHERE clause.

Unit
DBAccess

SyntaxSQLGeneratorCompatibility: boolean = False;

Remarks
If the manually assigned TCustomDAUpdateSQL.RefreshSQL property contains only
WHERE clause, ODAC uses the value of the TCustomDADataSet.BaseSQL property tocomplete the refresh SQL statement. In this situation all modifications applied to the SELECT
query by functions TCustomDADataSet.AddWhere, TCustomDADataSet.DeleteWhere are
not taken into account. This behavior was changed in ODAC 6.00.0.4. To restore the oldbehavior, set the BaseSQLOldBehavior variable to True.

© 1997-2019
Devart. All Rights
Reserved.

5.11

Request Support

DAC Forum

Provide Feedback

MemDataThis unit contains classes for storing data in memory.

ClassesName
TAttribute
TBlob
TCompressedBlob© 2019 Devart

Description
Holds the description of
object attributes.
Holds large object value forfield and parameter dtBlob,
dtMemo data types.
Holds large object value for543

Oracle Data Access Components

TDBObject
TMemData
TObjectType

TSharedObject

field and parameter dtBlob,
dtMemo data types and cancompress its data.
A base class for classes thatwork with user-defined datatypes that have attributes.
Implements storing data inmemory.
Holds description object
type and its attributes.
A base class that allows to
simplify memory
management for objectreferenced by several otherobjects.

Types
Name
TLocateExOptions
TUpdateRecKinds

Description
Represents the set of
TLocateExOption.
Represents the set of
TUpdateRecKind.

Enumerations
Name
TCompressBlobMode

TConnLostCause

TDANumericType

TLocateExOption

TSortType

Description
Specifies when the values
should be compressed andthe way they should be
stored.
Specifies the cause of theconnection loss.
Specifies the format ofstoring and representing of
the NUMERIC (DECIMAL)
fields.
Allows to set additional
search parameters which
will be used by the LocateEx
method.
Specifies a sort type forstring fields.
© 2019 DevartReference

Indicates records for which
the ApplyUpdates method
will be performed.

TUpdateRecKind© 1997-2019
Devart. All Rights
Reserved.

544

Request Support

DAC Forum

Provide Feedback

5.11.1 Classes
Classes in the MemData unit.

ClassesName

Description
Holds the description of
object attributes.
Holds large object value forfield and parameter dtBlob,
dtMemo data types.
Holds large object value forfield and parameter dtBlob,
dtMemo data types and cancompress its data.
A base class for classes thatwork with user-defined datatypes that have attributes.
Implements storing data inmemory.
Holds description object
type and its attributes.
A base class that allows to
simplify memory
management for objectreferenced by several otherobjects.

TAttribute
TBlob

TCompressedBlob

TDBObject
TMemData
TObjectType

TSharedObject© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.11.1.1 TAttribute Class

Holds the description of object attributes.
For a list of all members of this type, see TAttribute members.

© 2019 Devart

Provide Feedback

545

Oracle Data Access Components

Unit
MemData

SyntaxTAttribute = class(System.TObject);Remarks
The TAttribute class holds the description of object attributes. You can use
TObjectType.Attibutes to access individual attributes. To create TAttribute objects call the
TOraType.Describe method. It is called implicitly when ODAC fetches Oracle objects.

See Also
TObjectType
TOraType© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.1.1 Members

TAttribute class overview.

Properties
Name
AttributeNo
DataSize

DataType

LengthObjectType
OffsetDescription
Returns an attribute's ordinal
position in object.
Returns the size of an
attribute value in internal
representation.
Returns the type of data that
was assigned to the
Attribute.
Returns the length of thestring for dtString attributeand precision for dtInteger
and dtFloat attribute.
Returns a TObjectTypeobject for an object attribute.
Returns an offset of theattribute value in internal© 2019 DevartReference

representation.
Indicates TObjectType thatuses the attribute torepresent one of its
attributes.
Returns the scale of dtFloatand dtInteger attributes.
Returns the size of an
attribute value in external
representation.

Owner

Scale
Size
© 1997-2019
Devart. All Rights
Reserved.

546

Request Support

DAC Forum

Provide Feedback

5.11.1.1.2 Properties

Properties of the TAttribute class.
For a complete list of the TAttribute class members, see the TAttribute Members topic.

PublicName
AttributeNo
DataSize

DataType

LengthObjectType
OffsetOwner
Scale© 2019 Devart

Description
Returns an attribute's ordinal
position in object.
Returns the size of an
attribute value in internal
representation.
Returns the type of data that
was assigned to the
Attribute.
Returns the length of thestring for dtString attributeand precision for dtInteger
and dtFloat attribute.
Returns a TObjectTypeobject for an object attribute.
Returns an offset of theattribute value in internal
representation.
Indicates TObjectType thatuses the attribute torepresent one of its
attributes.
Returns the scale of dtFloat

547

Oracle Data Access Components

and dtInteger attributes.
Returns the size of an
attribute value in external
representation.

Size

See Also
TAttribute Class
TAttribute Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.1.2.1 AttributeNo Property

Returns an attribute's ordinal position in object.

Class
TAttribute

Syntaxproperty AttributeNo: Word;

Remarks
Use the AttributeNo property to learn an attribute's ordinal position in object, where 1 is thefirst field.

See Also
TObjectType.Attributes© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.1.2.2 DataSize Property

Returns the size of an attribute value in internal representation.

Class
TAttribute

Syntax© 2019 DevartReference548

property DataSize: Integer;

Remarks
Use the DataSize property to learn the size of an attribute value in internal representation.
For example:

dtDatedtFloat
dtInteger

17 (sizeof(OCIDate)
22 (sizeof(OCINumber))
22 (sizeof(OCINumber))See Also
TOraObject.Instance
Offset© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.1.2.3 DataType Property

Returns the type of data that was assigned to the Attribute.

Class
TAttribute

Syntaxproperty DataType: Word;

Remarks
Use the DataType property to discover the type of data that was assigned to the Attribute.
Possible values: dtDate, dtFloat, dtInteger, dtString, dtObject.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.1.2.4 Length Property

Returns the length of the string for dtString attribute and precision for dtInteger and dtFloat
attribute.

Class
TAttribute© 2019 Devart

549

Oracle Data Access Components

Syntaxproperty Length: Word;

Remarks
Use the Length property to learn the length of the string for dtString attribute and precision for
dtInteger and dtFloat attribute.

See Also
Scale© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.1.2.5 ObjectType Property

Returns a TObjectType object for an object attribute.

Class
TAttribute

Syntaxproperty ObjectType: TObjectType;

Remarks
Use the ObjectType property to return a TObjectType object for an object attribute.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.1.2.6 Offset Property

Returns an offset of the attribute value in internal representation.

Class
TAttribute

Syntaxproperty Offset: Integer;© 2019 DevartReference

550

Remarks
Use the DataSize property to learn an offset of the attribute value in internal representation.

See Also
TOraObject.Instance
DataSize© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.1.2.7 Ow ner Property

Indicates TObjectType that uses the attribute to represent one of its attributes.

Class
TAttribute

Syntaxproperty Owner: TObjectType;

Remarks
Check the value of the Owner property to determine TObjectType that uses the attribute torepresent one of its attributes. Applications should not assign the Owner property directly. It isassigned automatically when attribute is created from TOraType.Describe.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.11.1.1.2.8 Scale Property

Returns the scale of dtFloat and dtInteger attributes.

Class
TAttribute

Syntaxproperty Scale: Word;

Remarks© 2019 Devart

Provide Feedback

551

Oracle Data Access Components

Use the Scale property to learn the scale of dtFloat and dtInteger attributes.

See Also
Length© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.1.2.9 Size Property

Returns the size of an attribute value in external representation.

Class
TAttribute

Syntaxproperty Size: Integer;

Remarks
Read Size to learn the size of an attribute value in external representation.
For example:

dtDate8(sizeof(TDateTi
me)
8(sizeof(Double))4(sizeof(Integer))dtFloat
dtInteger

See Also
DataSize© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2 TBlob Class

Holds large object value for field and parameter dtBlob, dtMemo data types.
For a list of all members of this type, see TBlob members.

Unit© 2019 DevartReference

552

MemData

SyntaxTBlob = class(TSharedObject);Remarks
Object TBlob holds large object value for the field and parameter dtBlob, dtMemo,dtWideMemo data types.

Inheritance Hierarchy
TSharedObject
TBlob

See Also
TMemDataSet.GetBlob© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.1 Members

TBlob class overview.

Properties
Name
AsString
AsWideString

IsUnicode

RefCount (inherited from TSharedObject)
Size

Methods© 2019 Devart

Description
Used to manipulate BLOB
value as string.
Used to manipulate BLOB
value as Unicode string.
Gives choice of making
TBlob store and processdata in Unicode format ornot.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of the
TBlob value in bytes.

553

Oracle Data Access Components

Name

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Sets BLOB value fromanother TBlob object.
Deletes the current value in
TBlob object.
Loads the contents of a file
into a TBlob object.
Copies the contents of a
stream into the TBlob object.
Acquires a raw sequence ofbytes from the data stored in
TBlob.
Decrements the reference
count.
Saves the contents of the
TBlob object to a file.
Copies the contents of a
TBlob object to a stream.
Sets new TBlob size anddiscards all data over it.
Stores a raw sequence ofbytes into a TBlob object.

AddRef (inherited from TSharedObject)

AssignClear
LoadFromFile
LoadFromStream
Read
Release (inherited from TSharedObject)
SaveToFile
SaveToStream
Truncate
Write© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.2 Properties

Properties of the TBlob class.
For a complete list of the TBlob class members, see the TBlob Members topic.

PublicName
AsString
AsWideString
IsUnicode

Description
Used to manipulate BLOB
value as string.
Used to manipulate BLOB
value as Unicode string.
Gives choice of making
TBlob store and process© 2019 DevartReference

554

data in Unicode format ornot.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of the
TBlob value in bytes.

RefCount (inherited from TSharedObject)
Size

See Also
TBlob Class
TBlob Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.2.1 AsString Property

Used to manipulate BLOB value as string.

Class
TBlob

Syntaxproperty AsString: string;

Remarks
Use the AsString property to manipulate BLOB value as string.

See Also
AssignAsWideString© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.11.1.2.2.2 AsWideString Property

Used to manipulate BLOB value as Unicode string.

Class
TBlob
© 2019 Devart

Provide Feedback

555

Oracle Data Access Components

Syntaxproperty AsWideString: string;

Remarks
Use the AsWideString property to manipulate BLOB value as Unicode string.

See Also
AssignAsString© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.2.3 IsUnicode Property

Gives choice of making TBlob store and process data in Unicode format or not.

Class
TBlob

Syntaxproperty IsUnicode: boolean;

Remarks
Set IsUnicode to True if you want TBlob to store and process data in Unicode format.
Note: changing this property raises an exception if TBlob is not empty.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.2.4 Size Property

Used to learn the size of the TBlob value in bytes.

Class
TBlob

Syntaxproperty Size: Cardinal;© 2019 DevartReference

556

Remarks
Use the Size property to find out the size of the TBlob value in bytes.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.3 Methods

Methods of the TBlob class.
For a complete list of the TBlob class members, see the TBlob Members topic.

PublicName
AddRef (inherited from TSharedObject)

AssignClear
LoadFromFile
LoadFromStream
Read
Release (inherited from TSharedObject)
SaveToFile
SaveToStream
TruncateWrite

See Also
TBlob Class© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Sets BLOB value fromanother TBlob object.
Deletes the current value in
TBlob object.
Loads the contents of a file
into a TBlob object.
Copies the contents of a
stream into the TBlob object.
Acquires a raw sequence ofbytes from the data stored in
TBlob.
Decrements the reference
count.
Saves the contents of the
TBlob object to a file.
Copies the contents of a
TBlob object to a stream.
Sets new TBlob size anddiscards all data over it.
Stores a raw sequence ofbytes into a TBlob object.

557

Oracle Data Access Components

TBlob Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.3.1 Assign Method

Sets BLOB value from another TBlob object.

Class
TBlob

Syntax
procedure Assign(Source: TBlob);
Parameters
SourceHolds the BLOB from which the value to the current object will be assigned.

Remarks
Call the Assign method to set BLOB value from another TBlob object.

See Also
LoadFromStream
AsString
AsWideString© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.3.2 Clear Method

Deletes the current value in TBlob object.

Class
TBlob

Syntax
procedure Clear; virtual;

Remarks© 2019 DevartReference

558

Call the Clear method to delete the current value in TBlob object.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.3.3 LoadFromFile Method

Loads the contents of a file into a TBlob object.

Class
TBlob

Syntax
procedure LoadFromFile(const FileName: string);
Parameters
FileName
Holds the name of the file from which the TBlob value is loaded.

Remarks
Call the LoadFromFile method to load the contents of a file into a TBlob object. Specify thename of the file to load into the field as the value of the FileName parameter.

See Also
SaveToFile© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.3.4 LoadFromStream Method

Copies the contents of a stream into the TBlob object.

Class
TBlob

Syntax
procedure LoadFromStream(Stream: TStream); virtual;Parameters
StreamHolds the specified stream from which the field's value is copied.
© 2019 Devart

559

Oracle Data Access Components

Remarks
Call the LoadFromStream method to copy the contents of a stream into the TBlob object.
Specify the stream from which the field's value is copied as the value of the Stream
parameter.

See Also
SaveToStream© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.3.5 Read Method

Acquires a raw sequence of bytes from the data stored in TBlob.

Class
TBlob

Syntaxfunction Read(Position: Cardinal; Count: Cardinal; Dest: IntPtr):
Cardinal; virtual;Parameters
Position
Holds the starting point of the byte sequence.
Count
Holds the size of the sequence in bytes.
Dest
Holds a pointer to the memory area where to store the sequence.
Return Value
Actually read byte count if the sequence crosses object size limit.

Remarks
Call the Read method to acquire a raw sequence of bytes from the data stored in TBlob.
The Position parameter is the starting point of byte sequence which lasts Count number ofbytes. The Dest parameter is a pointer to the memory area where to store the sequence.
If the sequence crosses object size limit, function will return actually read byte count.

See Also© 2019 DevartReference

560

Write

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.3.6 SaveToFile Method

Saves the contents of the TBlob object to a file.

Class
TBlob

Syntax
procedure SaveToFile(const FileName: string);
Parameters
FileName
Holds a string that contains the name of the file.

Remarks
Call the SaveToFile method to save the contents of the TBlob object to a file. Specify thename of the file as the value of the FileName parameter.

See Also
LoadFromFile© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.3.7 SaveToStream Method

Copies the contents of a TBlob object to a stream.

Class
TBlob

Syntax
procedure SaveToStream(Stream: TStream); virtual;Parameters
StreamHolds the name of the stream.
© 2019 Devart

561

Oracle Data Access Components

Remarks
Call the SaveToStream method to copy the contents of a TBlob object to a stream. Specify
the name of the stream to which the field's value is saved as the value of the Stream
parameter.

See Also
LoadFromStream© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.3.8 Truncate Method

Sets new TBlob size and discards all data over it.

Class
TBlob

Syntax
procedure Truncate(NewSize: Cardinal); virtual;Parameters
NewSize
Holds the new size of TBlob.

Remarks
Call the Truncate method to set new TBlob size and discard all data over it. If NewSize isgreater or equal TBlob.Size, it does nothing.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.2.3.9 Write Method

Stores a raw sequence of bytes into a TBlob object.

Class
TBlob

Syntax© 2019 DevartReference

562

procedure Write(Position: Cardinal; Count: Cardinal; Source:
IntPtr); virtual;Parameters
Position
Holds the starting point of the byte sequence.
Count
Holds the size of the sequence in bytes.
SourceHolds a pointer to a source memory area.

Remarks
Call the Write method to store a raw sequence of bytes into a TBlob object.
The Position parameter is the starting point of byte sequence which lasts Count number ofbytes. The Source parameter is a pointer to a source memory area.
If the value of the Position parameter crosses current size limit of TBlob object, source data
will be appended to the object data.

See Also
Read© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.3 TCompressedBlob Class

Holds large object value for field and parameter dtBlob, dtMemo data types and cancompress its data.
For a list of all members of this type, see TCompressedBlob members.

Unit
MemData

SyntaxTCompressedBlob = class(TBlob);

Remarks
TCompressedBlob is a descendant of the TBlob class. It holds large object value for field andparameter dtBlob, dtMemo data types and can compress its data. For more information about
using BLOB compression see TCustomDADataSet.Options.
© 2019 Devart

563

Oracle Data Access Components

Note: Internal compression functions are available in CodeGear Delphi 2007 for Win32,
Borland Developer Studio 2006, Borland Delphi 2005, and Borland Delphi 7. To use BLOB
compression under Borland Delphi 6 and Borland C++ Builder you should use your own
compression functions. To use them set the CompressProc and UncompressProc variables
declared in the MemUtils unit.

Exampletype
TCompressProc = function(dest: IntPtr; destLen: IntPtr; const source: In
TUncompressProc = function(dest: IntPtr; destlen: IntPtr; source: IntPtr
var
CompressProc: TCompressProc;
UncompressProc: TUncompressProc;

Inheritance Hierarchy
TSharedObject
TBlob
TCompressedBlob

See Also
TBlob
TMemDataSet.GetBlob
TCustomDADataSet.Options© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.3.1 Members

TCompressedBlob class overview.

Properties
Name
AsString (inherited from TBlob)
AsWideString (inherited from TBlob)
Compressed
CompressedSize

Description
Used to manipulate BLOB
value as string.
Used to manipulate BLOB
value as Unicode string.
Used to indicate if the Blob
is compressed.
Used to indicatecompressed size of the Blobdata.
© 2019 DevartReference

564

Gives choice of making
TBlob store and processdata in Unicode format ornot.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of the
TBlob value in bytes.

IsUnicode (inherited from TBlob)

RefCount (inherited from TSharedObject)
Size (inherited from TBlob)

Methods
Name

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Sets BLOB value fromanother TBlob object.
Deletes the current value in
TBlob object.
Loads the contents of a file
into a TBlob object.
Copies the contents of a
stream into the TBlob object.
Acquires a raw sequence ofbytes from the data stored in
TBlob.
Decrements the reference
count.
Saves the contents of the
TBlob object to a file.
Copies the contents of a
TBlob object to a stream.
Sets new TBlob size anddiscards all data over it.
Stores a raw sequence ofbytes into a TBlob object.

AddRef (inherited from TSharedObject)

Assign (inherited from TBlob)
Clear (inherited from TBlob)
LoadFromFile (inherited from TBlob)
LoadFromStream (inherited from TBlob)
Read (inherited from TBlob)
Release (inherited from TSharedObject)
SaveToFile (inherited from TBlob)
SaveToStream (inherited from TBlob)
Truncate (inherited from TBlob)
Write (inherited from TBlob)© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

565

Oracle Data Access Components

5.11.1.3.2 Properties

Properties of the TCompressedBlob class.
For a complete list of the TCompressedBlob class members, see the TCompressedBlob
Members topic.

PublicName

Description
Used to manipulate BLOB
value as string.
Used to manipulate BLOB
value as Unicode string.
Used to indicate if the Blob
is compressed.
Used to indicatecompressed size of the Blob
data.
Gives choice of making
TBlob store and processdata in Unicode format ornot.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of the
TBlob value in bytes.

AsString (inherited from TBlob)
AsWideString (inherited from TBlob)
Compressed
CompressedSize

IsUnicode (inherited from TBlob)

RefCount (inherited from TSharedObject)
Size (inherited from TBlob)

See Also
TCompressedBlob Class
TCompressedBlob Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.3.2.1 Compressed Property

Used to indicate if the Blob is compressed.

Class
TCompressedBlob

Syntax© 2019 DevartReference566

property Compressed: boolean;

Remarks
Indicates whether the Blob is compressed. Set this property to True or False to compress or
decompress the Blob.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.3.2.2 CompressedSize Property

Used to indicate compressed size of the Blob data.

Class
TCompressedBlob

Syntaxproperty CompressedSize: Cardinal;

Remarks
Indicates compressed size of the Blob data.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.4 TDBObject ClassA base class for classes that work with user-defined data types that have attributes.
For a list of all members of this type, see TDBObject members.

Unit
MemData

Syntax
TDBObject = class(TSharedObject);Remarks
TDBObject is a base class for classes that work with user-defined data types that haveattributes.

© 2019 Devart

567

Oracle Data Access Components

Inheritance Hierarchy
TSharedObject
TDBObject© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.4.1 Members

TDBObject class overview.

Properties
Name

Description
Used to return the count ofreference to a
TSharedObject object.

RefCount (inherited from TSharedObject)

Methods
Name

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Decrements the reference
count.

AddRef (inherited from TSharedObject)

Release (inherited from TSharedObject)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.5 TMemData Class

Implements storing data in memory.
For a list of all members of this type, see TMemData members.

Unit
MemData

Syntax
TMemData = class(TData);© 2019 DevartReference

568

Inheritance Hierarchy
TData
TMemData© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.11.1.5.1 Members

TMemData class overview.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.11.1.6 TObjectType Class

Holds description object type and its attributes.
For a list of all members of this type, see TObjectType members.

Unit
MemData

SyntaxTObjectType = class(TSharedObject);Remarks
TObjectType holds description object type and its attributes. TObjectType is an ancestor for
TOraType.

Inheritance Hierarchy
TSharedObject
TObjectType

See Also
TOraType© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

569

Oracle Data Access Components

5.11.1.6.1 Members

TObjectType class overview.

Properties
Name

Description
Used to indicate the numberof attributes of type.
Used to access separate
attributes.
Used to indicate the type ofobject dtObject, dtArray or
dtTable.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of an
object instance.

AttributeCount
Attributes
DataType

RefCount (inherited from TSharedObject)
Size

Methods
Name

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Indicates whether a
specified Attributecomponent is referenced in
the TAttributes object.
Decrements the reference
count.

AddRef (inherited from TSharedObject)

FindAttribute

Release (inherited from TSharedObject)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.6.2 Properties

Properties of the TObjectType class.
For a complete list of the TObjectType class members, see the TObjectType Members
topic.

Public© 2019 DevartReference

Name

570

Description
Used to indicate the numberof attributes of type.
Used to access separate
attributes.
Used to indicate the type ofobject dtObject, dtArray or
dtTable.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of an
object instance.

AttributeCount
Attributes
DataType
RefCount (inherited from TSharedObject)
Size

See Also
TObjectType Class
TObjectType Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.6.2.1 AttributeCount Property

Used to indicate the number of attributes of type.

Class
TObjectType

Syntaxproperty AttributeCount: Integer;

Remarks
Use the AttributeCount property to determine the number of attributes of type.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.11.1.6.2.2 Attributes Property(Indexer)

Used to access separate attributes.

Class© 2019 Devart

DAC Forum

Provide Feedback

571

Oracle Data Access Components

TObjectType

Syntaxproperty Attributes[Index: integer]: TAttribute;
Parameters
Index
Holds the attribute's ordinal position.

Remarks
Use the Attributes property to access individual attributes. The value of the Index parametercorresponds to the AttributeNo property of TAttribute.

See Also
TAttribute
FindAttribute© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.6.2.3 DataType Property

Used to indicate the type of object dtObject, dtArray or dtTable.

Class
TObjectType

Syntaxproperty DataType: Word;

Remarks
Use the DataType property to determine the type of object dtObject, dtArray or dtTable.

See Also
T:Devart.Dac.Units.MemData
T:Devart.Odac.Units.OraClasses© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference572

5.11.1.6.2.4 Size Property

Used to learn the size of an object instance.

Class
TObjectType

Syntaxproperty Size: Integer;

Remarks
Use the Size property to find out the size of an object instance. Size is a sum of all attribute
sizes.

See Also
TAttribute.Size© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.6.3 Methods

Methods of the TObjectType class.
For a complete list of the TObjectType class members, see the TObjectType Members
topic.

PublicName
AddRef (inherited from TSharedObject)

FindAttribute

Release (inherited from TSharedObject)

See Also
TObjectType Class© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Indicates whether a
specified Attributecomponent is referenced in
the TAttributes object.
Decrements the reference
count.

573

Oracle Data Access Components

TObjectType Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.6.3.1 FindAttribute Method

Indicates whether a specified Attribute component is referenced in the TAttributes object.

Class
TObjectType

Syntaxfunction FindAttribute(const Name: string): TAttribute; virtual;Parameters
Name
Holds the name of the attribute to search for.
Return Value
TAttribute, if an attribute with a matching name was found. Nil Otherwise.

Remarks
Call FindAttribute to determine if a specified Attribute component is referenced in theTAttributes object. Name is the name of the Attribute for which to search. If FindAttribute finds
an Attribute with a matching name, it returns the TAttribute. Otherwise it returns nil.

See Also
TAttribute
M:Devart.Dac.TObjectType.AttributeByName(System.String)
Attributes© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.7 TSharedObject ClassA base class that allows to simplify memory management for object referenced by several
other objects.
For a list of all members of this type, see TSharedObject members.

Unit© 2019 DevartReference

574

MemData

SyntaxTSharedObject = class(System.TObject);Remarks
TSharedObject allows to simplify memory management for object referenced by several
other objects. TSharedObject holds a count of references to itself. When any object (referer
object) is going to use TSharedObject, it calls the TSharedObject.AddRef method. Referer
object has to call the TSharedObject.Release method after using TSharedObject.

See Also
TBlob
TObjectType© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.7.1 Members

TSharedObject class overview.

Properties
Name

Description
Used to return the count ofreference to a
TSharedObject object.

RefCount

Methods
Name

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Decrements the reference
count.

AddRefRelease© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

575

Oracle Data Access Components

5.11.1.7.2 Properties

Properties of the TSharedObject class.
For a complete list of the TSharedObject class members, see the TSharedObject Members
topic.

PublicName

Description
Used to return the count ofreference to a
TSharedObject object.

RefCount

See Also
TSharedObject Class
TSharedObject Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.7.2.1 RefCount Property

Used to return the count of reference to a TSharedObject object.

Class
TSharedObject

Syntaxproperty RefCount: Integer;

Remarks
Returns the count of reference to a TSharedObject object.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.7.3 Methods

Methods of the TSharedObject class.
For a complete list of the TSharedObject class members, see the TSharedObject Members
topic.

© 2019 DevartReference

576

PublicName

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Decrements the reference
count.

AddRefReleaseSee Also
TSharedObject Class
TSharedObject Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.1.7.3.1 AddRef Method

Increments the reference count for the number of references dependent on theTSharedObject object.

Class
TSharedObject

Syntax
procedure AddRef;

Remarks
Increments the reference count for the number of references dependent on theTSharedObject object.

See Also
Release© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

577

Oracle Data Access Components

5.11.1.7.3.2 Release Method

Decrements the reference count.

Class
TSharedObject

Syntax
procedure Release;

Remarks
Call the Release method to decrement the reference count. When RefCount is 1,
TSharedObject is deleted from memory.

See Also
AddRef© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.2 Types
Types in the MemData unit.

Types
Name

Description
Represents the set of
TLocateExOption.
Represents the set of
TUpdateRecKind.

TLocateExOptions
TUpdateRecKinds© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.2.1 TLocateExOptions Set

Represents the set of TLocateExOption.

Unit
MemData© 2019 DevartReference

578

Syntax
TLocateExOptions = set of TLocateExOption;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.2.2 TUpdateRecKinds Set

Represents the set of TUpdateRecKind.

Unit
MemData

SyntaxTUpdateRecKinds = set of TUpdateRecKind;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.3 Enumerations
Enumerations in the MemData unit.

Enumerations
Name
TCompressBlobMode

TConnLostCause

TDANumericType

TLocateExOption

TSortType© 2019 Devart

Description
Specifies when the values
should be compressed andthe way they should be
stored.
Specifies the cause of theconnection loss.
Specifies the format ofstoring and representing of
the NUMERIC (DECIMAL)
fields.
Allows to set additional
search parameters which
will be used by the LocateEx
method.
Specifies a sort type forstring fields.

579

Oracle Data Access Components

Indicates records for which
the ApplyUpdates method
will be performed.

TUpdateRecKind© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.11.3.1 TCompressBlobMode Enumeration

Specifies when the values should be compressed and the way they should be stored.

Unit
MemData

SyntaxTCompressBlobMode = (cbNone, cbClient, cbServer, cbClientServer);ValuesValue

cbClient

cbClientServer

cbNonecbServerMeaning
Values are compressed and stored as compressed data at theclient side. Before posting data to the server decompression is
performed and data at the server side stored in the original form.
Allows to reduce used client memory due to increase accesstime to field values. The time spent on the opening DataSet andexecuting Post increases.
Values are compressed and stored in compressed form. Allows
to decrease the volume of used memory at client and serversides. Access time to the field values increases as for cbClient.
The time spent on opening DataSet and executing Post
decreases.Note: On using cbServer or cbClientServer data on
the server is stored as compressed. Other applications can add
records in uncompressed format but can't read and write alreadycompressed data. If compressed BLOB is partially changed byanother application (if signature was not changed), DAC willconsider its value as NULL.Blob compression is not applied toMemo fields because of possible cutting.
Values not compressed. The default value.
Values are compressed before passing to the server and store at
the server in compressed form. Allows to decrease databasesize on the server. Access time to the field values does notchange. The time spent on opening DataSet and executing Post
usually decreases.
© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

580

Provide Feedback

5.11.3.2 TConnLostCause Enumeration

Specifies the cause of the connection loss.

Unit
MemData

SyntaxTConnLostCause = (clUnknown, clExecute, clOpen, clRefresh, clApply,
clServiceQuery, clTransStart, clConnectionApply, clConnect);

ValuesValue

Meaning
Connection loss detected during DataSet.ApplyUpdates
clApply(Reconnect/Reexecute possible).
Connection loss detected during connection establishingclConnect(Reconnect possible).
clConnectionApply Connection loss detected during Connection.ApplyUpdates(Reconnect/Reexecute possible).
Connection loss detected during SQL execution (Reconnect with
clExecuteexception is possible).
Connection loss detected during execution of a SELECT
clOpenstatement (Reconnect with exception possible).
Connection loss detected during query opening (Reconnect/
clRefresh
Reexecute possible).
Connection loss detected during service information request
clServiceQuery(Reconnect/Reexecute possible).
Connection loss detected during transaction start (Reconnect/
clTransStart
Reexecute possible). clTransStart has less priority thenclConnectionApply.
clUnknown
The connection loss reason is unknown.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.

© 2019 Devart

581

Oracle Data Access Components

5.11.3.3 TDANumericType Enumeration

Specifies the format of storing and representing of the NUMERIC (DECIMAL) fields.

Unit
MemData

SyntaxTDANumericType = (ntFloat, ntBCD, ntFmtBCD);

ValuesValue
ntBCD
ntFloat
ntFmtBCD© 1997-2019
Devart. All Rights
Reserved.

Meaning
Data is stored on the client side as currency and represented as
TBCDField. This format allows storing data with precision up to
0,0001.
Data stored on the client side is in double format andrepresented as TFloatField. The default value.
Data is represented as TFMTBCDField. TFMTBCDField gives
greater precision and accuracy than TBCDField, but it is slower.
Request Support

DAC Forum

Provide Feedback

5.11.3.4 TLocateExOption Enumeration

Allows to set additional search parameters which will be used by the LocateEx method.

Unit
MemData

Syntax
TLocateExOption = (lxCaseInsensitive, lxPartialKey, lxNearest,lxNext, lxUp, lxPartialCompare);ValuesValuelxCaseInsensitivelxNearest

Meaning
Similar to loCaseInsensitive. Key fields and key values arematched without regard to the case.
LocateEx moves the cursor to a specific record in a dataset or to
the first record in the dataset that is greater than the values© 2019 DevartReferencelxNextlxPartialCompare

lxPartialKey
lxUp© 1997-2019
Devart. All Rights
Reserved.

582

specified in the KeyValues parameter. For this option to work
correctly dataset should be sorted by the fields the search is
performed in. If dataset is not sorted, the function may return aline that is not connected with the search condition.
LocateEx searches from the current record.
Similar to lxPartialKey, but the difference is that it can process
value entries in any position. For example, 'HAM' would match
both 'HAMM', 'HAMMER.', and also 'MR HAMMER'.
Similar to loPartialKey. Key values can include only a part of thematching key field value. For example, 'HAM' would match both
'HAMM' and 'HAMMER.', but not 'MR HAMMER'.
LocateEx searches from the current record to the first record.
Request Support

DAC Forum

Provide Feedback

5.11.3.5 TSortType Enumeration

Specifies a sort type for string fields.

Unit
MemData

SyntaxTSortType = (stCaseSensitive, stCaseInsensitive, stBinary);

ValuesValue
stBinary
stCaseInsensitive
stCaseSensitive© 1997-2019
Devart. All Rights
Reserved.

Meaning
Sorting by character ordinal values (this comparison is also casesensitive).
Sorting without case sensitivity.
Sorting with case sensitivity.
Request Support

DAC Forum

Provide Feedback

5.11.3.6 TUpdateRecKind Enumeration

Indicates records for which the ApplyUpdates method will be performed.

Unit© 2019 Devart

583

Oracle Data Access Components

MemData

SyntaxTUpdateRecKind = (ukUpdate, ukInsert, ukDelete);

ValuesValue
ukDeleteukInsert
ukUpdate© 1997-2019
Devart. All Rights
Reserved.

5.12

Meaning
ApplyUpdates will be performed for deleted records.
ApplyUpdates will be performed for inserted records.
ApplyUpdates will be performed for updated records.
Request Support

DAC Forum

Provide Feedback

MemDS
This unit contains implementation of the TMemDataSet class.

ClassesName

Description
A base class for working
with data and manipulating
data in memory.

TMemDataSet

Variables
Name

Description
An exception will be raised if
the value of theUpdateAction parameter is
uaFail.
The DataSetChange event
is sent after a dataset gets
open. It was necessary to fix
a problem with disappeared
vertical scrollbar in some
types of DB-aware grids.

DoNotRaiseExcetionOnUaFail

SendDataSetChangeEventAfterOpen© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference584

5.12.1 Classes
Classes in the MemDS unit.

ClassesName

Description
A base class for working
with data and manipulating
data in memory.

TMemDataSet© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1 TMemDataSet ClassA base class for working with data and manipulating data in memory.
For a list of all members of this type, see TMemDataSet members.

Unit
MemDS

Syntax
TMemDataSet = class(TDataSet);

Remarks
TMemDataSet derives from the TDataSet database-engine independent set of properties,
events, and methods for working with data and introduces additional techniques to store andmanipulate data in memory.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.1 Members

TMemDataSet class overview.

Properties
Name
CachedUpdates© 2019 Devart

Description
Used to enable or disable
the use of cached updates
for a dataset.

585

Oracle Data Access Components

IndexFieldNames

KeyExclusive

LocalConstraints

LocalUpdate

PreparedRangedUpdateRecordTypes

UpdatesPending

Used to get or set the list offields on which the recordset
is sorted.
Specifies the upper andlower boundaries for arange.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
ApplyRange
ApplyUpdates

CancelRange

CancelUpdates

CommitUpdates

Description
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.
Clears the cached updates
buffer.

© 2019 DevartReference

DeferredPost
EditRangeEnd

EditRangeStart

GetBlob

LocateLocateEx

PrepareRestoreUpdates

RevertRecord

SaveToXML

SetRange

SetRangeEnd© 2019 Devart

586

Makes permanent changes
to the database server.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Allocates resources andcreates field components fora dataset.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.

587

Oracle Data Access Components

Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

SetRangeStart

UnPrepare

UpdateResult

UpdateStatus

EventsName

Description
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.

OnUpdateError

OnUpdateRecord© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.2 Properties

Properties of the TMemDataSet class.
For a complete list of the TMemDataSet class members, see the TMemDataSet Members
topic.

PublicName

Description

CachedUpdates

Used to enable or disable© 2019 DevartReference588

the use of cached updates
for a dataset.
Used to get or set the list offields on which the recordset
is sorted.
Specifies the upper andlower boundaries for arange.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

IndexFieldNames

KeyExclusive

LocalConstraints

LocalUpdate

PreparedRangedUpdateRecordTypes

UpdatesPending

See Also
TMemDataSet Class
TMemDataSet Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.12.1.1.2.1 CachedUpdates Property

Used to enable or disable the use of cached updates for a dataset.

Class
TMemDataSet

Syntax© 2019 Devart

Provide Feedback

589

Oracle Data Access Components

property CachedUpdates: boolean default False;

Remarks
Use the CachedUpdates property to enable or disable the use of cached updates for adataset. Setting CachedUpdates to True enables updates to a dataset (such as postingchanges, inserting new records, or deleting records) to be stored in an internal cache on theclient side instead of being written directly to the dataset's underlying database tables. Whenchanges are completed, an application writes all cached changes to the database in thecontext of a single transaction.
Cached updates are especially useful for client applications working with remote databaseservers. Enabling cached updates brings up the following benefits:
Fewer transactions and shorter transaction times.
Minimized network traffic.
The potential drawbacks of enabling cached updates are:
Other applications can access and change the actual data on the server while users are
editing local copies of data, resulting in an update conflict when cached updates are applied
to the database.
Other applications cannot access data changes made by an application until its cachedupdates are applied to the database.
The default value is False.
Note: When establishing master/detail relationship the CachedUpdates property of detaildataset works properly only when TDADataSetOptions.LocalMasterDetail is set to True.

See Also
UpdatesPending
TMemDataSet.ApplyUpdates
RestoreUpdates
CommitUpdates
CancelUpdates
UpdateStatus
TCustomDADataSet.Options© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference590

5.12.1.1.2.2 IndexFieldNames Property

Used to get or set the list of fields on which the recordset is sorted.

Class
TMemDataSet

Syntaxproperty IndexFieldNames: string;

Remarks
Use the IndexFieldNames property to get or set the list of fields on which the recordset issorted. Specify the name of each column in IndexFieldNames to use as an index for a table.
Ordering of column names is significant. Separate names with semicolon. The specified
columns don't need to be indexed. Set IndexFieldNames to an empty string to reset therecordset to the sort order originally used when the recordset's data was first retrieved.
Each field may optionally be followed by the keyword ASC / DESC or CIS / CS / BIN.
Use ASC, DESC keywords to specify a sort direction for the field. If one of these keywords is
not used, the default sort direction for the field is ascending.
Use CIS, CS or BIN keywords to specify a sort type for string fields:
CIS - compare without case sensitivity;
CS - compare with case sensitivity;
BIN - compare by character ordinal values (this comparison is also case sensitive).
If a dataset uses a TCustomDAConnection component, the default value of sort type depends
on the TCustomDAConnection.Options option of the connection. If a dataset does not use aconnection (TVirtualTable dataset), the default is CS.
Read IndexFieldNames to determine the field (or fields) on which the recordset is sorted.
Ordering is processed locally.
Note: You cannot process ordering by BLOB fields.

ExampleThe following procedure illustrates how to set IndexFieldNames in response to a button click:
DataSet1.IndexFieldNames := 'LastName ASC CIS; DateDue DESC';© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

591

Oracle Data Access Components

5.12.1.1.2.3 KeyExclusive Property

Specifies the upper and lower boundaries for a range.

Class
TMemDataSet

Syntaxproperty KeyExclusive: Boolean;

Remarks
Use KeyExclusive to specify whether a range includes or excludes the records that match its
specified starting and ending values.
By default, KeyExclusive is False, meaning that matching values are included.
To restrict a range to those records that are greater than the specified starting value and lessthan the specified ending value, set KeyExclusive to True.

See Also
SetRange
SetRangeEnd
SetRangeStart© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.2.4 LocalConstraints Property

Used to avoid setting the Required property of a TField component for NOT NULL fields at thetime of opening TMemDataSet.

Class
TMemDataSet

Syntaxproperty LocalConstraints: boolean default True;

Remarks
Use the LocalConstraints property to avoid setting the Required property of a TField
component for NOT NULL fields at the time of opening TMemDataSet. When LocalConstrains© 2019 DevartReference592

is True, TMemDataSet ignores NOT NULL server constraints. It is useful for tables that havefields updated by triggers.
LocalConstraints is obsolete, and is only included for backward compatibility.
The default value is True.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.2.5 LocalUpdate Property

Used to prevent implicit update of rows on database server.

Class
TMemDataSet

Syntaxproperty LocalUpdate: boolean default False;

Remarks
Set the LocalUpdate property to True to prevent implicit update of rows on database server.
Data changes are cached locally in client memory.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.2.6 Prepared Property

Determines whether a query is prepared for execution or not.

Class
TMemDataSet

Syntaxproperty Prepared: boolean;

Remarks
Check the Prepared property to determine if a query is already prepared for execution.
Prepared is True if the query has already been prepared. While queries don't need to beprepared before execution, performance is often boosted if queries are prepared beforehand,particularly if there are parameterized queries that are executed more than once using the© 2019 Devart

593

Oracle Data Access Components

same parameter values.

See Also
Prepare© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.2.7 Ranged Property

Indicates whether a range is applied to a dataset.

Class
TMemDataSet

Syntaxproperty Ranged: Boolean;

Remarks
Use the Ranged property to detect whether a range is applied to a dataset.

See Also
SetRange
SetRangeEnd
SetRangeStart© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.2.8 UpdateRecordTypes Property

Used to indicate the update status for the current record when cached updates are enabled.

Class
TMemDataSet

Syntaxproperty UpdateRecordTypes: TUpdateRecordTypes default[rtModified, rtInserted, rtUnmodified];© 2019 DevartReference

594

Remarks
Use the UpdateRecordTypes property to determine the update status for the current record
when cached updates are enabled. Update status can change frequently as records areedited, inserted, or deleted. UpdateRecordTypes offers a convenient method for applications
to assess the current status before undertaking or completing operations that depend on the
update status of records.

See Also
CachedUpdates© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.2.9 UpdatesPending Property

Used to check the status of the cached updates buffer.

Class
TMemDataSet

Syntaxproperty UpdatesPending: boolean;

Remarks
Use the UpdatesPending property to check the status of the cached updates buffer. If
UpdatesPending is True, then there are edited, deleted, or inserted records remaining in local
cache and not yet applied to the database. If UpdatesPending is False, there are no suchrecords in the cache.

See Also
CachedUpdates© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3 Methods

Methods of the TMemDataSet class.
For a complete list of the TMemDataSet class members, see the TMemDataSet Members
topic.
© 2019 Devart

595

Oracle Data Access Components

PublicName
ApplyRange
ApplyUpdates

CancelRange

CancelUpdates

CommitUpdates
DeferredPost
EditRangeEnd

EditRangeStart

GetBlob

LocateLocateEx

PrepareRestoreUpdates

Description
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.
Clears the cached updates
buffer.
Makes permanent changes
to the database server.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Allocates resources andcreates field components fora dataset.
Marks all records in thecache of updates as© 2019 DevartReference596

unapplied.
Cancels changes made to
the current record whencached updates areenabled.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

RevertRecord

SaveToXML

SetRange

SetRangeEnd

SetRangeStart

UnPrepare

UpdateResult

UpdateStatus

See Also
TMemDataSet Class
TMemDataSet Class Members© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

597

Oracle Data Access Components

5.12.1.1.3.1 ApplyRange Method

Applies a range to the dataset.

Class
TMemDataSet

Syntax
procedure ApplyRange;

Remarks
Call ApplyRange to cause a range established with SetRangeStart and SetRangeEnd, or
EditRangeStart and EditRangeEnd, to take effect.
When a range is in effect, only those records that fall within the range are available to theapplication for viewing and editing.
After a call to ApplyRange, the cursor is left on the first record in the range.

See Also
CancelRange
EditRangeEnd
EditRangeStart
IndexFieldNames
SetRange
SetRangeEnd
SetRangeStart© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.2 ApplyUpdates Method

Writes dataset's pending cached updates to a database.

Class
TMemDataSet

Overload List
Name
ApplyUpdates

Description
Writes dataset's pending cached updates© 2019 DevartReference

ApplyUpdates(const UpdateRecKinds:
TUpdateRecKinds)© 1997-2019
Request Support
Devart. All Rights
Reserved.

598

to a database.
Writes dataset's pending cached updatesof specified records to a database.
DAC Forum

Provide Feedback

Writes dataset's pending cached updates to a database.

Class
TMemDataSet

Syntax
procedure ApplyUpdates; overload; virtual;

Remarks
Call the ApplyUpdates method to write a dataset's pending cached updates to a database.
This method passes cached data to the database, but the changes are not committed to the
database if there is an active transaction. An application must explicitly call the database
component's Commit method to commit the changes to the database if the write is
successful, or call the database's Rollback method to undo the changes if there is an error.
Following a successful write to the database, and following a successful call to aconnection's Commit method, an application should call the CommitUpdates method to clear
the cached update buffer.
Note: The preferred method for updating datasets is to call a connection component's
ApplyUpdates method rather than to call each individual dataset's ApplyUpdates method. The
connection component's ApplyUpdates method takes care of committing and rolling backtransactions and clearing the cache when the operation is successful.

ExampleThe following procedure illustrates how to apply a dataset's cached updates to a database in
response to a button click:procedure ApplyButtonClick(Sender: TObject);
beginwith MyQuery do
begin
Session.StartTransaction;try... <Modify data>
ApplyUpdates; <try to write the updates to the database>© 2019 Devart

599

Oracle Data Access Components

Session.Commit; <on success, commit the changes>
exceptRestoreUpdates; <restore update result for applied records>
Session.Rollback; <on failure, undo the changes>
raise; <raise the exception to prevent a call to CommitUpdates!>end;
CommitUpdates; <on success, clear the cache>
end;
end;

See Also
TMemDataSet.CachedUpdates
TMemDataSet.CancelUpdates
TMemDataSet.CommitUpdates
TMemDataSet.UpdateStatus© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Writes dataset's pending cached updates of specified records to a database.

Class
TMemDataSet

Syntax
procedure ApplyUpdates(const UpdateRecKinds: TUpdateRecKinds);
overload; virtual;Parameters
UpdateRecKinds
Indicates records for which the ApplyUpdates method will be performed.

Remarks
Call the ApplyUpdates method to write a dataset's pending cached updates of specified
records to a database. This method passes cached data to the database, but the changes
are not committed to the database if there is an active transaction. An application must
explicitly call the database component's Commit method to commit the changes to the
database if the write is successful, or call the database's Rollback method to undo thechanges if there is an error.
Following a successful write to the database, and following a successful call to aconnection's Commit method, an application should call the CommitUpdates method to clear
the cached update buffer.

© 2019 DevartReference

600

Note: The preferred method for updating datasets is to call a connection component's
ApplyUpdates method rather than to call each individual dataset's ApplyUpdates method. The
connection component's ApplyUpdates method takes care of committing and rolling backtransactions and clearing the cache when the operation is successful.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.3 CancelRange Method

Removes any ranges currently in effect for a dataset.

Class
TMemDataSet

Syntax
procedure CancelRange;

Remarks
Call CancelRange to remove a range currently applied to a dataset. Canceling a range
reenables access to all records in the dataset.

See Also
ApplyRange
EditRangeEnd
EditRangeStart
IndexFieldNames
SetRange
SetRangeEnd
SetRangeStart© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.4 CancelUpdates Method

Clears all pending cached updates from cache and restores dataset in its prior state.

Class
TMemDataSet© 2019 Devart

601

Oracle Data Access Components

Syntax
procedure CancelUpdates;

Remarks
Call the CancelUpdates method to clear all pending cached updates from cache and restore
dataset in its prior state.
It restores the dataset to the state it was in when the table was opened, cached updates werelast enabled, or updates were last successfully applied to the database.
When a dataset is closed, or the CachedUpdates property is set to False, CancelUpdates iscalled automatically.

See Also
CachedUpdates
TMemDataSet.ApplyUpdates
UpdateStatus© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.5 CommitUpdates Method

Clears the cached updates buffer.

Class
TMemDataSet

Syntax
procedure CommitUpdates;

Remarks
Call the CommitUpdates method to clear the cached updates buffer after both a successful
call to ApplyUpdates and a database component's Commit method. Clearing the cache after
applying updates ensures that the cache is empty except for records that could not beprocessed and were skipped by the OnUpdateRecord or OnUpdateError event handlers. An
application can attempt to modify the records still in cache.
CommitUpdates also checks wether there are pending updates in dataset. And if there are, itcalls ApplyUpdates.
Record modifications made after a call to CommitUpdates repopulate the cached update© 2019 DevartReference602

buffer and require a subsequent call to ApplyUpdates to move them to the database.

See Also
CachedUpdates
TMemDataSet.ApplyUpdates
UpdateStatus© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.6 DeferredPost Method

Makes permanent changes to the database server.

Class
TMemDataSet

Syntax
procedure DeferredPost;

Remarks
Call DeferredPost to make permanent changes to the database server while retaining dataset
in its state whether it is dsEdit or dsInsert.
Explicit call to the Cancel method after DeferredPost has been applied does not abandon
modifications to a dataset already fixed in database.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.12.1.1.3.7 EditRangeEnd Method

Enables changing the ending value for an existing range.

Class
TMemDataSet

Syntax
procedure EditRangeEnd;

Remarks© 2019 Devart

Provide Feedback

603

Oracle Data Access Components

Call EditRangeEnd to change the ending value for an existing range.
To specify an end range value, call FieldByName after calling EditRangeEnd.
After assigning a new ending value, call ApplyRange to activate the modified range.

See Also
ApplyRange
CancelRange
EditRangeStart
IndexFieldNames
SetRange
SetRangeEnd
SetRangeStart© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.8 EditRangeStart Method

Enables changing the starting value for an existing range.

Class
TMemDataSet

Syntax
procedure EditRangeStart;

Remarks
Call EditRangeStart to change the starting value for an existing range.
To specify a start range value, call FieldByName after calling EditRangeStart.
After assigning a new ending value, call ApplyRange to activate the modified range.

See Also
ApplyRange
CancelRange
EditRangeEnd
IndexFieldNames
SetRange
SetRangeEnd© 2019 DevartReference

604

SetRangeStart© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.9 GetBlob Method

Retrieves TBlob object for a field or current record when only its name or the field itself isknown.

Class
TMemDataSet

Overload List
Name
GetBlob(Field: TField)
GetBlob(const FieldName: string)© 1997-2019
Devart. All Rights
Reserved.

Request Support

Description
Retrieves TBlob object for a field or current
record when the field itself is known.
Retrieves TBlob object for a field or current
record when its name is known.
DAC Forum

Provide Feedback

Retrieves TBlob object for a field or current record when the field itself is known.

Class
TMemDataSet

Syntaxfunction GetBlob(Field: TField): TBlob; overload;
Parameters
Field
Holds an existing TField object.
Return Value
TBlob object that was retrieved.

Remarks
Call the GetBlob method to retrieve TBlob object for a field or current record when only its
name or the field itself is known. FieldName is the name of an existing field. The field should© 2019 Devart

605

Oracle Data Access Components

have MEMO or BLOB type.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Retrieves TBlob object for a field or current record when its name is known.

Class
TMemDataSet

Syntaxfunction GetBlob(const FieldName: string): TBlob; overload;
Parameters
FieldName
Holds the name of an existing field.
Return Value
TBlob object that was retrieved.

ExampleOraQuery1.GetBlob('Comment').SaveToFile('Comment.txt');

See Also
TBlob© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.10 Locate Method

Searches a dataset for a specific record and positions the cursor on it.

Class
TMemDataSet

Overload List
Name
Locate(const KeyFields: array of TField;
const KeyValues: variant; Options:TLocateOptions)

Description
Searches a dataset by the specified fields
for a specific record and positions cursor
on it.
© 2019 DevartReference

Locate(const KeyFields: string; const
KeyValues: variant; Options:TLocateOptions)© 1997-2019
Request Support
Devart. All Rights
Reserved.

606

Searches a dataset by the fields specified
by name for a specific record and positions
the cursor on it.
DAC Forum

Provide Feedback

Searches a dataset by the specified fields for a specific record and positions cursor on it.

Class
TMemDataSet

Syntaxfunction Locate(const KeyFields: array of TField; const
KeyValues: variant; Options: TLocateOptions): boolean;
reintroduce; overload;
Parameters
KeyFields
Holds TField objects in which to search.
KeyValues
Holds the variant that specifies the values to match in the key fields.
Options
Holds additional search latitude when searching in string fields.
Return Value
True if it finds a matching record, and makes this record the current one. Otherwise it
returns False.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Searches a dataset by the fields specified by name for a specific record and positions the
cursor on it.

Class
TMemDataSet

Syntaxfunction Locate(const KeyFields: string; const KeyValues:
variant; Options: TLocateOptions): boolean; overload; override;© 2019 Devart

607

Oracle Data Access Components

Parameters
KeyFields
Holds a semicolon-delimited list of field names in which to search.
KeyValues
Holds the variant that specifies the values to match in the key fields.
Options
Holds additional search latitude when searching in string fields.
Return Value
True if it finds a matching record, and makes this record the current one. Otherwise it
returns False.

Remarks
Call the Locate method to search a dataset for a specific record and position cursor on it.
KeyFields is a string containing a semicolon-delimited list of field names on which to search.
KeyValues is a variant that specifies the values to match in the key fields. If KeyFields lists a
single field, KeyValues specifies the value for that field on the desired record. To specify
multiple search values, pass a variant array as KeyValues, or construct a variant array on the
fly using the VarArrayOf routine. An example is provided below.
Options is a set that optionally specifies additional search latitude when searching in string
fields. If Options contains the loCaseInsensitive setting, then Locate ignores case whenmatching fields. If Options contains the loPartialKey setting, then Locate allows partial-string
matching on strings in KeyValues. If Options is an empty set, or if KeyFields does not include
any string fields, Options is ignored.
Locate returns True if it finds a matching record, and makes this record the current one.
Otherwise it returns False.
The Locate function works faster when dataset is locally sorted on the KeyFields fields. Local
dataset sorting can be set with the TMemDataSet.IndexFieldNames property.

ExampleAn example of specifying multiple search values:
with CustTable do
Locate('Company;Contact;Phone', VarArrayOf(['Sight Diver', 'P',
'408-431-1000']), [loPartialKey]);

See Also
TMemDataSet.IndexFieldNames
TMemDataSet.LocateEx© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

608

Reserved.
5.12.1.1.3.11 LocateEx Method

Excludes features that don't need to be included to the TMemDataSet.Locate method of
TDataSet.

Class
TMemDataSet

Overload List
Name
Description
LocateEx(const KeyFields: array of
Excludes features that don't need to be
TField; const KeyValues: variant; Options: included to the TMemDataSet.Locate
method of TDataSet by the specified fields.
TLocateExOptions)
LocateEx(const KeyFields: string; const Excludes features that don't need to be
included to the TMemDataSet.Locate
KeyValues: variant; Options:
method of TDataSet by the specified field
TLocateExOptions)names.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
Excludes features that don't need to be included to the TMemDataSet.Locate method of
TDataSet by the specified fields.

Class
TMemDataSet

Syntaxfunction LocateEx(const KeyFields: array of TField; const
KeyValues: variant; Options: TLocateExOptions): boolean; overload;
Parameters
KeyFields
Holds TField objects to search in.
KeyValues
Holds the values of the fields to search for.
Options
Holds additional search parameters which will be used by the LocateEx method.
Return Value© 2019 Devart

609

Oracle Data Access Components

True, if a matching record was found. Otherwise returns False.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Excludes features that don't need to be included to the TMemDataSet.Locate method of
TDataSet by the specified field names.

Class
TMemDataSet

Syntaxfunction LocateEx(const KeyFields: string; const KeyValues:
variant; Options: TLocateExOptions): boolean; overload;
Parameters
KeyFields
Holds the fields to search in.
KeyValues
Holds the values of the fields to search for.
Options
Holds additional search parameters which will be used by the LocateEx method.
Return Value
True, if a matching record was found. Otherwise returns False.

Remarks
Call the LocateEx method when you need some features not to be included to the
TMemDataSet.Locate method of TDataSet.
LocateEx returns True if it finds a matching record, and makes that record the current one.
Otherwise LocateEx returns False.
The LocateEx function works faster when dataset is locally sorted on the KeyFields fields.
Local dataset sorting can be set with the TMemDataSet.IndexFieldNames property.
Note: Please add the MemData unit to the "uses" list to use the TLocalExOption
enumeration.

See Also
TMemDataSet.IndexFieldNames
TMemDataSet.Locate© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

610

Reserved.
5.12.1.1.3.12 Prepare Method

Allocates resources and creates field components for a dataset.

Class
TMemDataSet

Syntax
procedure Prepare; virtual;

Remarks
Call the Prepare method to allocate resources and create field components for a dataset. The
Prepare method is called automatically by the Open method if dataset is not prepared. To
learn whether dataset is prepared or not use the Prepared property.
The UnPrepare method unprepares a query.
Note: When you change the text of a query at runtime, the query is automatically closed andunprepared.
The Prepare method is called automatically by the Open method if dataset is not prepared.

See Also
Prepared
UnPrepare© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.13 RestoreUpdates Method

Marks all records in the cache of updates as unapplied.

Class
TMemDataSet

Syntax
procedure RestoreUpdates;

Remarks
Call the RestoreUpdates method to return the cache of updates to its state before calling© 2019 Devart

611

Oracle Data Access Components

ApplyUpdates. RestoreUpdates marks all records in the cache of updates as unapplied. It isuseful when ApplyUpdates fails.

See Also
CachedUpdates
TMemDataSet.ApplyUpdates
CancelUpdates
UpdateStatus© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.14 RevertRecord Method

Cancels changes made to the current record when cached updates are enabled.

Class
TMemDataSet

Syntax
procedure RevertRecord;

Remarks
Call the RevertRecord method to undo changes made to the current record when cachedupdates are enabled.

See Also
CachedUpdates
CancelUpdates© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.15 SaveToXML Method

Saves the current dataset data to a file or a stream in the XML format compatible with ADO
format.

Class
TMemDataSet© 2019 DevartReference

612

Overload List
Name
SaveToXML(Destination: TStream)

SaveToXML(const FileName: string)© 1997-2019
Devart. All Rights
Reserved.

Request Support

Description
Saves the current dataset data to a stream
in the XML format compatible with ADO
format.
Saves the current dataset data to a file in
the XML format compatible with ADO
format.
DAC Forum

Provide Feedback

Saves the current dataset data to a stream in the XML format compatible with ADO format.

Class
TMemDataSet

Syntax
procedure SaveToXML(Destination: TStream); overload;
Parameters
Destination
Holds a TStream object.

Remarks
Call the SaveToXML method to save the current dataset data to a file or a stream in the XML
format compatible with ADO format.
If the destination file already exists, it is overwritten. It remains open from the first call to
SaveToXML until the dataset is closed. This file can be read by other applications while it isopened, but they cannot write to the file.
When saving data to a stream, a TStream object must be created and its position must be
set in a preferable value.

See Also
M:Devart.Dac.TVirtualTable.LoadFromFile(System.String,System.Boolean)
M:Devart.Dac.TVirtualTable.LoadFromStream(Borland.Vcl.TStream,System.Boolean)© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

613

Oracle Data Access Components

Saves the current dataset data to a file in the XML format compatible with ADO format.

Class
TMemDataSet

Syntax
procedure SaveToXML(const FileName: string); overload;
Parameters
FileName
Holds the name of a destination file.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.16 SetRange Method

Sets the starting and ending values of a range, and applies it.

Class
TMemDataSet

Syntax
procedure SetRange(const StartValues: array of System.TVarRec;
const EndValues: array of System.TVarRec; StartExlusive: Boolean= False; EndExclusive: Boolean = False);
Parameters
StartValues
Indicates the field values that designate the first record in the range. In C++,
StartValues_Size is the index of the last value in the StartValues array.
EndValues
Indicates the field values that designate the last record in the range. In C++,
EndValues_Size is the index of the last value in the EndValues array.
StartExlusive
Iindicates the upper and lower boundaries of the start range.
EndExclusive
Indicates the upper and lower boundaries of the end range.

Remarks
Call SetRange to specify a range and apply it to the dataset. The new range replaces the© 2019 DevartReference614

currently specified range, if any.
SetRange combines the functionality of SetRangeStart, SetRangeEnd, and ApplyRange in asingle procedure call. SetRange performs the following functions:
1. Puts the dataset into dsSetKey state.
2. Erases any previously specified starting range values and ending range values.
3. Sets the start and end range values.
4. Applies the range to the dataset.
After a call to SetRange, the cursor is left on the first record in the range.
If either StartValues or EndValues has fewer elements than the number of fields in the current
index, then the remaining entries are ignored when performing a search.

See Also
ApplyRange
CancelRange
EditRangeEnd
EditRangeStart
IndexFieldNames
KeyExclusive
SetRangeEnd
SetRangeStart© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.17 SetRangeEnd Method

Indicates that subsequent assignments to field values specify the end of the range of rows to
include in the dataset.

Class
TMemDataSet

Syntax
procedure SetRangeEnd;

Remarks
Call SetRangeEnd to put the dataset into dsSetKey state, erase any previous end range
values, and set them to NULL.
© 2019 Devart

615

Oracle Data Access Components

Subsequent field assignments made with FieldByName specify the actual set of ending
values for a range.
After assigning end-range values, call ApplyRange to activate the modified range.

See Also
ApplyRange
CancelRange
EditRangeStart
IndexFieldNames
SetRange
SetRangeStart© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.18 SetRangeStart Method

Indicates that subsequent assignments to field values specify the start of the range of rows to
include in the dataset.

Class
TMemDataSet

Syntax
procedure SetRangeStart;

Remarks
Call SetRangeStart to put the dataset into dsSetKey state, erase any previous start range
values, and set them to NULL.
Subsequent field assignments to FieldByName specify the actual set of starting values for arange.
After assigning start-range values, call ApplyRange to activate the modified range.

See Also
ApplyRange
CancelRange
EditRangeStart
IndexFieldNames
SetRange© 2019 DevartReference

616

SetRangeEnd© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.19 UnPrepare Method

Frees the resources allocated for a previously prepared query on the server and client sides.

Class
TMemDataSet

Syntax
procedure UnPrepare; virtual;

Remarks
Call the UnPrepare method to free the resources allocated for a previously prepared query on
the server and client sides.
Note: When you change the text of a query at runtime, the query is automatically closed andunprepared.

See Also
Prepare© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.20 UpdateResult Method

Reads the status of the latest call to the ApplyUpdates method while cached updates areenabled.

Class
TMemDataSet

Syntaxfunction UpdateResult: TUpdateAction;
Return Valuea value of the TUpdateAction enumeration.

© 2019 Devart

617

Oracle Data Access Components

Remarks
Call the UpdateResult method to read the status of the latest call to the ApplyUpdates method
while cached updates are enabled. UpdateResult reflects updates made on the records thathave been edited, inserted, or deleted.
UpdateResult works on the record by record basis and is applicable to the current record
only.

See Also
CachedUpdates© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.3.21 UpdateStatus Method

Indicates the current update status for the dataset when cached updates are enabled.

Class
TMemDataSet

Syntaxfunction UpdateStatus: TUpdateStatus; override;
Return Valuea value of the TUpdateStatus enumeration.

Remarks
Call the UpdateStatus method to determine the current update status for the dataset whencached updates are enabled. Update status can change frequently as records are edited,
inserted, or deleted. UpdateStatus offers a convenient method for applications to assess thecurrent status before undertaking or completing operations that depend on the update statusof the dataset.

See Also
CachedUpdates© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference618

5.12.1.1.4 Events

Events of the TMemDataSet class.
For a complete list of the TMemDataSet class members, see the TMemDataSet Members
topic.

PublicName

Description
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.

OnUpdateError

OnUpdateRecord

See Also
TMemDataSet Class
TMemDataSet Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.4.1 OnUpdateError Event

Occurs when an exception is generated while cached updates are applied to a database.

Class
TMemDataSet

Syntaxproperty OnUpdateError: TUpdateErrorEvent;Remarks
Write the OnUpdateError event handler to respond to exceptions generated when cachedupdates are applied to a database.
E is a pointer to an EDatabaseError object from which application can extract an error
message and the actual cause of the error condition. The OnUpdateError handler can use
this information to determine how to respond to the error condition.
UpdateKind describes the type of update that generated the error.

© 2019 Devart

619

Oracle Data Access Components

UpdateAction indicates the action to take when the OnUpdateError handler exits. On entry into
the handler, UpdateAction is always set to uaFail. If OnUpdateError can handle or correct theerror, set UpdateAction to uaRetry before exiting the error handler.
The error handler can use the TField.OldValue and TField.NewValue properties to evaluateerror conditions and set TField.NewValue to a new value to reapply. In this case, set
UpdateAction to uaRetry before exiting.
Note: If a call to ApplyUpdates raises an exception and ApplyUpdates is not called within thecontext of a try...except block, an error message is displayed. If the OnUpdateError handler
cannot correct the error condition and leaves UpdateAction set to uaFail, the error message isdisplayed twice. To prevent redisplay, set UpdateAction to uaAbort in the error handler.

See Also
CachedUpdates© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.1.1.4.2 OnUpdateRecord Event

Occurs when a single update component can not handle the updates.

Class
TMemDataSet

Syntaxproperty OnUpdateRecord: TUpdateRecordEvent;Remarks
Write the OnUpdateRecord event handler to process updates that cannot be handled by asingle update component, such as implementation of cascading updates, insertions, ordeletions. This handler is also useful for applications that require additional control overparameter substitution in update components.
UpdateKind describes the type of update to perform.
UpdateAction indicates the action taken by the OnUpdateRecord handler before it exits. On
entry into the handler, UpdateAction is always set to uaFail. If OnUpdateRecord is successful,it should set UpdateAction to uaApplied before exiting.

See Also
CachedUpdates© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

620

Provide Feedback

5.12.2 Variables
Variables in the MemDS unit.

Variables
Name

Description
An exception will be raised if
the value of theUpdateAction parameter is
uaFail.
The DataSetChange event
is sent after a dataset gets
open. It was necessary to fix
a problem with disappeared
vertical scrollbar in some
types of DB-aware grids.

DoNotRaiseExcetionOnUaFail

SendDataSetChangeEventAfterOpen© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.12.2.1 DoNotRaiseExcetionOnUaFail Variable

An exception will be raised if the value of the UpdateAction parameter is uaFail.

Unit
MemDS

SyntaxDoNotRaiseExcetionOnUaFail: boolean = False;

Remarks
Starting with ODAC 6.20.0.12, if the OnUpdateRecord event handler sets the UpdateAction
parameter to uaFail, an exception is raised. The default value of UpdateAction is uaFail. So,
the exception will be raised when the value of this parameter is left unchanged.
To restore the old behaviour, set DoNotRaiseExcetionOnUaFail to True.

© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

621

Oracle Data Access Components

5.12.2.2 SendDataSetChangeEventAfterOpen Variable

The DataSetChange event is sent after a dataset gets open. It was necessary to fix a problem
with disappeared vertical scrollbar in some types of DB-aware grids.

Unit
MemDS

Syntax
SendDataSetChangeEventAfterOpen: boolean = True;

Remarks
Starting with ODAC 6.20.0.11, the DataSetChange event is sent after a dataset gets open. It
was necessary to fix a problem with disappeared vertical scrollbar in some types of DBaware grids. This problem appears only under Windows XP when visual styles are enabled.
To disable sending this event, change the value of this variable to False.

© 1997-2019
Devart. All Rights
Reserved.

5.13

Request Support

DAC Forum

Provide Feedback

OdacVclThis unit contains the visual constituent of ODAC.

ClassesName

Description
A component providing a
dialog box for a user tosupply login information.

TConnectDialog© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.13.1 Classes
Classes in the OdacVcl unit.

ClassesName
TConnectDialog

Description
A component providing a© 2019 DevartReference622

dialog box for a user tosupply login information.
© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.13.1.1 TConnectDialog Class

A component providing a dialog box for a user to supply login information.
For a list of all members of this type, see TConnectDialog members.

Unit
OdacVclSyntaxTConnectDialog = class(TCustomConnectDialog);

Remarks
TConnectDialog component is a direct descendent of TCustomConnectDialog class. Use
TConnectDialog to provide a dialog box for a user to supply username, password and server
name. You may want to customize appearance of the dialog box using the properties of thisclass.

Inheritance Hierarchy
TCustomConnectDialog
TConnectDialog

See Also
TCustomDAConnection.ConnectDialog© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.13.1.1.1 Members

TConnectDialog class overview.

Properties
Name© 2019 Devart

Description

623

Oracle Data Access Components

CancelButton (inherited from TCustomConnectDialog) Used to specify the label for
the Cancel button.
Used to set the caption of
Caption (inherited from TCustomConnectDialog)
dialog box.
ConnectButton (inherited from TCustomConnectDialog) Used to specify the label for
the Connect button.
Used to specify the class of
DialogClass (inherited from TCustomConnectDialog) the form that will be
displayed to enter login
information.
Used to set the language ofLabelSet (inherited from TCustomConnectDialog)
buttons and labels captions.
PasswordLabel (inherited from
Used to specify a prompt for
TCustomConnectDialog)
ReadAliases

Retries (inherited from TCustomConnectDialog)
SavePassword (inherited fromTCustomConnectDialog)
ServerLabel (inherited from TCustomConnectDialog)
SessionStoreLogInfo (inherited from TCustomConnectDialog)

UsernameLabel (inherited fromTCustomConnectDialog)

password edit.
Used to specify where theTConnectDialog object
should acquire the names of
database instances.
Used to indicate the numberof retries of failed
connections.
Used for the password to be
displayed in ConnectDialog
in asterisks.
Used to specify a prompt forthe server name edit.
Shows what TOraSession
component uses
TConnectDialog object.
Used to specify whether thelogin information should be
kept in system registry after
a connection wasestablished.
Used to specify a prompt forusername edit.

Methods
Name

Description

Execute (inherited from TCustomConnectDialog)

Displays the connect dialog
and calls the connection's© 2019 DevartReference

624

Connect method when user
clicks the Connect button.
GetServerList (inherited from TCustomConnectDialog) Retrieves a list of available
server names.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
5.13.1.1.2 Properties

Properties of the TConnectDialog class.
For a complete list of the TConnectDialog class members, see the TConnectDialog
Members topic.

PublicName

Description
CancelButton (inherited from TCustomConnectDialog) Used to specify the label for
the Cancel button.
Used to set the caption of
Caption (inherited from TCustomConnectDialog)
dialog box.
ConnectButton (inherited from TCustomConnectDialog) Used to specify the label for
the Connect button.
Used to specify the class of
DialogClass (inherited from TCustomConnectDialog) the form that will be
displayed to enter login
information.
Used to set the language ofLabelSet (inherited from TCustomConnectDialog)
buttons and labels captions.
PasswordLabel (inherited from
Used to specify a prompt for
TCustomConnectDialog)
Retries (inherited from TCustomConnectDialog)
SavePassword (inherited fromTCustomConnectDialog)
ServerLabel (inherited from TCustomConnectDialog)
Session© 2019 Devart

password edit.
Used to indicate the numberof retries of failed
connections.
Used for the password to be
displayed in ConnectDialog
in asterisks.
Used to specify a prompt forthe server name edit.
Shows what TOraSession
component uses
TConnectDialog object.

625

Oracle Data Access Components

StoreLogInfo (inherited from TCustomConnectDialog)

UsernameLabel (inherited from

Used to specify whether thelogin information should be
kept in system registry after
a connection wasestablished.
Used to specify a prompt forusername edit.

TCustomConnectDialog)

Published
Name

Description
Used to specify where theTConnectDialog object
should acquire the names of
database instances.

ReadAliases

See Also
TConnectDialog Class
TConnectDialog Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.13.1.1.2.1 ReadAliases Property

Used to specify where the TConnectDialog object should acquire the names of databaseinstances.

Class
TConnectDialog

Syntaxproperty ReadAliases: boolean default False;

Remarks
Use ReadAliases property to specify whether the TConnectDialog object should acquire thenames of database instances from TNSNAMES.ORA configuration file found in the Oracle
home directory or read them from Odac registry entries.
Set this property to False to make ODAC read aliases from registry.

© 2019 DevartReference626

The default value is False.
Note: ODAC relies on valid local Oracle home directory structure if ReadAliases property is
set to True.
Description
T:Devart.Odac.Units.OdacVcl© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.13.1.1.2.2 Session Property

Shows what TOraSession component uses TConnectDialog object.

Class
TConnectDialog

Syntaxproperty Session: TOraSession;

Remarks
Read Session property to learn what TOraSession component uses TConnectDialog object.
This property is read-only.

See Also
TCustomDAConnection.ConnectDialog© 1997-2019
Devart. All Rights
Reserved.

5.14

Request Support

DAC Forum

Provide Feedback

Ora
This unit contains main components of ODAC.

ClassesName
TBFileField
TCursorField
TCustomOraQuery© 2019 Devart

Description
A class representing BFile
field in dataset.
A class representing REF
CURSOR field in dataset.
A base class defining
functionality for descendent

627

Oracle Data Access Components

TOraChangeNotification

TOraChangeNotificationOptions
TOraDataSet
TOraDataSetField
TOraDataSetOptions

TOraDataSetOptionsDS

TOraDataSource

TOraEncryptor
TOraIntervalField

TOraMetaData

TOraNestedTable
TOraNumberField

TOraParam

classes which accessdatabase using SQL
statements.
A component for keeping
information in local dataset
up-to-date through receiving
notifications.
Used to specify how query
notifications will be
generated.
A class defining the Oracle
functionality for a dataset.
A class providing access toOracle nested datasets.
This class allows setting up
the behaviour of the
TOraDataSet class.
This class allows setting up
the behaviour of the
TOraDaatSet class (thisproperty is obsolete).
TOraDataSource provides
an interface between an
ODAC dataset components
and data-aware controls on
a form.
The class that performs
encrypting and decrypting ofdata.
A class providing access to
the Oracle interval fields.
A component for obtaining
metainformation about
database objects from theserver.
A component for controlling
nested table data.
A class providing access to
the Oracle number fields.
A class that is used to set
the values of individual
parameters passed with
queries or stored
procedures.
© 2019 DevartReference

TOraParams
TOraPoolingOptions

TOraQuery

TOraReferenceField

TOraSession

TOraSessionOptions

TOraSQLTOraStoredProc
TOraTimeStampField

TOraTrace

TOraUpdateSQLTOraXMLField

Used to control TOraParamobjects.
This class allows setting up
the behaviour of theconnecton pool.
A component for executing
queries and operatingrecord sets. It also provides
flexible way to update data.
A class representing an
Oracle REF field in adataset.
A component for maintaining
connection to an Oracle
database.
This class allows setting up
the behaviour of the
TOraSession class.
A component for executing
SQL statements and callingstored procedures on the
database server.
A component for accessing
and executing stored
procedures and functions.
A class providing access to
the Oracle timestamp fields.
A component allowing
starting and stopping a SQL
trace for a specified
session. This component
provides access to the
DBMS_TRACE package.
A component for tuning
update operations for the
DataSet component.
A class providing access to
the Oracle SYS.XMLTYPE
objects.

Types
Name

© 2019 Devart

628

Description

629

Oracle Data Access Components

TConnectChangeEvent

TFailoverEvent

TOraChangeNotificationEvent
TPlSqlTraceMode
TSqlTraceMode

This type is used for the
TOraSession.OnConnectChange event.
This Type is used for the
TOraSession.OnFailover
event.
This type is used for the
TOraChangeNotification.On
Change event.
Specifies the level of PL/
SQL trace.
Specifies the level of SQL
trace statistics level.

Enumerations
Name
TFailoverState

Description

TFailoverType

Specifies the failover type.

TOraIsolationLevel

TRefreshMode
TSequenceMode

Indicates the failover state.
Specifies the way thetransactions containing
database modifications arehandled.
Defines when to refresh an
editing record.
Specifies the method usedinternally to generatesequenced field.

Variables
Name
DefSession

OraQueryCompatibilityMode

Sessions

Description
Read this variable to get
pointer to default session
object. Same as
DefaultSession function.
All TOraQuery components
in project become editable,
and can be modified by theend users.
Holds pointers to all
TOraSession objects of an© 2019 DevartReference

application.
When set to True enables
TOraDataSet and TOraSQL
components to use default
session if they are notattached to any session.

UseDefSession© 1997-2019
Devart. All Rights
Reserved.

630

Request Support

DAC Forum

Provide Feedback

5.14.1 Classes
Classes in the Ora unit.

ClassesName
TBFileField
TCursorField

TCustomOraQuery

TOraChangeNotification

TOraChangeNotificationOptions
TOraDataSet
TOraDataSetField
TOraDataSetOptions

TOraDataSetOptionsDS© 2019 Devart

Description
A class representing BFile
field in dataset.
A class representing REF
CURSOR field in dataset.
A base class defining
functionality for descendentclasses which accessdatabase using SQL
statements.
A component for keeping
information in local dataset
up-to-date through receiving
notifications.
Used to specify how query
notifications will be
generated.
A class defining the Oracle
functionality for a dataset.
A class providing access toOracle nested datasets.
This class allows setting up
the behaviour of the
TOraDataSet class.
This class allows setting up
the behaviour of the
TOraDaatSet class (thisproperty is obsolete).

631

Oracle Data Access Components

TOraDataSource

TOraEncryptor
TOraIntervalField

TOraMetaData

TOraNestedTable
TOraNumberField

TOraParam

TOraParams
TOraPoolingOptions

TOraQuery

TOraReferenceField

TOraSession

TOraSessionOptions

TOraSQL

TOraDataSource provides
an interface between an
ODAC dataset components
and data-aware controls on
a form.
The class that performs
encrypting and decrypting ofdata.
A class providing access to
the Oracle interval fields.
A component for obtaining
metainformation about
database objects from theserver.
A component for controlling
nested table data.
A class providing access to
the Oracle number fields.
A class that is used to set
the values of individual
parameters passed with
queries or stored
procedures.
Used to control TOraParamobjects.
This class allows setting up
the behaviour of theconnecton pool.
A component for executing
queries and operatingrecord sets. It also provides
flexible way to update data.
A class representing an
Oracle REF field in adataset.
A component for maintaining
connection to an Oracle
database.
This class allows setting up
the behaviour of the
TOraSession class.
A component for executing
SQL statements and callingstored procedures on the© 2019 DevartReference

database server.
A component for accessing
and executing stored
procedures and functions.
A class providing access to
the Oracle timestamp fields.
A component allowing
starting and stopping a SQL
trace for a specified
session. This component
provides access to the
DBMS_TRACE package.
A component for tuning
update operations for the
DataSet component.
A class providing access to
the Oracle SYS.XMLTYPE
objects.

TOraStoredProc
TOraTimeStampField

TOraTrace

TOraUpdateSQLTOraXMLField© 1997-2019
Devart. All Rights
Reserved.

632

Request Support

DAC Forum

Provide Feedback

5.14.1.1 TBFileField ClassA class representing BFile field in dataset.
For a list of all members of this type, see TBFileField members.

Unit
Ora

SyntaxTBFileField = class(TBlobField);

Remarks
TBFileField object represents BFile field in dataset.
The BFile datatype provides access to file LOBs that are stored in file systems outside an
Oracle database. Oracle 8 currently supports access to binary files, or BFILEs. The BFILE
datatype allows read-only support of large binary files; you cannot modify a file throughOracle.
TBFileField holds a TOraFile object. To get it use the AsFile property.
As a descendent of TField, TBFileField inherits many properties, methods, and events that© 2019 Devart

633

Oracle Data Access Components

are useful for managing the value and properties of a field in the database.

See Also
TOraFile© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.1.1 Members

TBFileField class overview.

Properties
Name
AsFileDescription
Returns a TOraFile object.
Used to refresh content of
BFile when FileDir or
FileName is being changed.
Indicates the type of BLOB
field.
Returns True when a fileassociated with BFile exists,
False otherwise.
Used to indicate thedirectory alias where BFile
is stored.
Indicates the name of a fileassociated with BFile.

AutoRefresh
BlobType
ExistsFileDir
FileName

Methods
Name
Refresh© 1997-2019
Devart. All Rights
Reserved.

Description
Reloads BFile.
Request Support

DAC Forum

Provide Feedback

5.14.1.1.2 Properties

Properties of the TBFileField class.
For a complete list of the TBFileField class members, see the TBFileField Members topic.

© 2019 DevartReference

634

PublicName
AsFileDescription
Returns a TOraFile object.
Returns True when a fileassociated with BFile exists,
False otherwise.
Used to indicate thedirectory alias where BFile
is stored.
Indicates the name of a fileassociated with BFile.

ExistsFileDir
FileName

Published
Name

Description
Used to refresh content of
BFile when FileDir or
FileName is being changed.
Indicates the type of BLOB
field.

AutoRefresh
BlobType

See Also
TBFileField Class
TBFileField Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.14.1.1.2.1 AsFile Property

Returns a TOraFile object.

Class
TBFileField

Syntaxproperty AsFile: TOraFile;

Remarks© 2019 Devart

DAC Forum

Provide Feedback

635

Oracle Data Access Components

Returns a TOraFile object. Later you can open TOraDataSet once.

See Also
TOraFile© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.1.2.2 AutoRefresh Property

Used to refresh content of BFile when FileDir or FileName is being changed.

Class
TBFileField

Syntaxproperty AutoRefresh: boolean default True;

Remarks
When AutoRefresh is True, TBFileField will refresh content of BFile when FileDir or FileNameis changed.
The default value is True.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.1.2.3 BlobType Property

Indicates the type of BLOB field.

Class
TBFileField

Syntaxproperty BlobType: TBlobType;

Remarks
Indicates the type of BLOB field. For TBFileField is always equal to ftBlob.

© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

636

Reserved.
5.14.1.1.2.4 Exists Property

Returns True when a file associated with BFile exists, False otherwise.

Class
TBFileField

Syntaxproperty Exists: boolean;

Remarks
Exists returns True when a file associated with BFile exists, False otherwise.

Exampleif not TBFileField(DataSet.FieldByName('Value')).Exists then
St:= St + '(NoExist)';© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.1.2.5 FileDir Property

Used to indicate the directory alias where BFile is stored.

Class
TBFileField

Syntaxproperty FileDir: string;

Remarks
Use the FileDir property to determine the directory alias where BFile is stored.
To create a directory alias use CREATE DIRECTORY.

ExampleedFileDir.Text:= TBFileField(OraQuery.FieldByName('Value')).FileDir;© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

637

Oracle Data Access Components

5.14.1.1.2.6 FileName Property

Indicates the name of a file associated with BFile.

Class
TBFileField

Syntaxproperty FileName: string;

Remarks
Use the FileName property to determine the name of a file associated with BFile.

ExampleedFileName.Text := BFileField(OraQuery.FieldByName('Value')).FileName;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.1.3 Methods

Methods of the TBFileField class.
For a complete list of the TBFileField class members, see the TBFileField Members topic.

PublicName
RefreshDescription
Reloads BFile.

See Also
TBFileField Class
TBFileField Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.1.3.1 Refresh Method

Reloads BFile.

Class© 2019 DevartReference

638

TBFileField

Syntax
procedure Refresh;

Remarks
Call the Refresh procedure to reload BFile.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.2 TCursorField ClassA class representing REF CURSOR field in dataset.
For a list of all members of this type, see TCursorField members.

Unit
Ora

SyntaxTCursorField = class(TDACursorField);

Remarks
A TCursorField object represents REF CURSOR field in dataset.
TCursorField holds a TOraCursor object. To get it use the AsCursor property.
As a descendent of TField, TCursorField inherits many properties, methods, and events thatare useful for managing the value and properties of a field in a database.

Inheritance Hierarchy
TDACursorField
TCursorField

See Also
TOraCursor
TOraDataSet.Cursor© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

639

Oracle Data Access Components

5.14.1.2.1 Members

TCursorField class overview.

Properties
Name

Description
Returns a TOraCursor object
you can assign to the Cursor
property of TOraDataSet.

AsCursor© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.2.2 Properties

Properties of the TCursorField class.
For a complete list of the TCursorField class members, see the TCursorField Members
topic.

PublicName

Description
Returns a TOraCursor object
you can assign to the Cursor
property of TOraDataSet.

AsCursor

See Also
TCursorField Class
TCursorField Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.2.2.1 AsCursor Property

Returns a TOraCursor object you can assign to the Cursor property of TOraDataSet.

Class
TCursorField

Syntaxproperty AsCursor: TOraCursor;© 2019 DevartReference

640

Remarks
Returns a TOraCursor object which you can assign to the Cursor property of TOraDataSet.
Later you can open TOraDataSet once.

See Also
TOraDataSet.Cursor© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.3 TCustomOraQuery ClassA base class defining functionality for descendent classes which access database using SQL
statements.
For a list of all members of this type, see TCustomOraQuery members.

Unit
Ora

SyntaxTCustomOraQuery = class(TOraDataSet);

Remarks
TCustomOraQuery is a base class that defines functionality for descendent classes whichaccess database using SQL statements. Applications never use TCustomOraQuery objects
directly. Instead they use descendants of TCustomOraQuery, such as TOraQuery,
TSmartQuery, TOraStoredProc and TOraTable.
TCustomOraQuery implements functionality for an insertion, deletion, and update of a recordby dynamically generated SQL statements. It offers such features as automatic blocking ofrecords, checking records before edit, refreshing records after post.
To modify records of TCustomOraQuery SELECT statement in the SQL property should
retrieve ROWID of updating table. When the KeyFields property is modified,TCustomOraQuery is updated too. TCustomOraQuery can update only one Oracle table.
Updating table is defined by the UpdatingTable property or used by the first table in the FROM
clause.
SQLInsert, SQLDelete, SQLUpdate, SQLLock, SQLRefresh properties support automatic
binding of parameters which have names identical to the fields captions. To retrieve the valueof a field as it was before operation, use the field name with 'OLD_'. This is particularly useful© 2019 Devart

641

Oracle Data Access Components

when doing field comparisons in the WHERE clause of a statement. Use theTCustomDADataSet.BeforeUpdateExecute event to assign the value to additional parameters
and the TCustomDADataSet.AfterUpdateExecute event for reading them.
TCustomOraQuery is read-only when none of the SQLInsert, SQLDelete, SQLUpdate
properties are defined.

Inheritance Hierarchy
TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQuery

See Also
TOraDataSet
TOraQuery
TSmartQueryTOraStoredProc
TOraTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.3.1 Members

TCustomOraQuery class overview.

Properties
Name
BaseSQL (inherited from TCustomDADataSet)

CachedUpdates (inherited from TMemDataSet)

ChangeNotification (inherited from TOraDataSet)

CheckMode (inherited from TOraDataSet)

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.
Used to define the checkmode before editing a© 2019 DevartReference

CommandTimeout (inherited from TOraDataSet)

Conditions (inherited from TCustomDADataSet)
Connection (inherited from TCustomDADataSet)

Cursor (inherited from TOraDataSet)
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)

DetailFields (inherited from TCustomDADataSet)

Disconnected (inherited from TCustomDADataSet)

DMLRefresh (inherited from TOraDataSet)

Encryption (inherited from TOraDataSet)

FetchAll (inherited from TOraDataSet)

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)© 2019 Devart

642

record.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption
options in a dataset.
Used to request all recordsof the query from databaseserver when a dataset isbeing opened.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.

643

Oracle Data Access Components

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)

IsPLSQL (inherited from TOraDataSet)

IsQuery (inherited from TOraDataSet)

KeyExclusive (inherited from TMemDataSet)

KeyFields (inherited from TOraDataSet)

KeySequence (inherited from TOraDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

LockMode (inherited from TOraDataSet)

MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows ornot.
Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.
Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted orposted to a database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to define when to
perform the locking of an
editing record.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.

© 2019 DevartReference

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

NonBlocking (inherited from TOraDataSet)

Options (inherited from TOraDataSet)

OptionsDS (inherited from TOraDataSet)

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)
Params (inherited from TOraDataSet)
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly (inherited from TCustomDADataSet)
RefreshMode (inherited from TOraDataSet)
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams (inherited from TOraDataSet)© 2019 Devart

644

Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.
Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.
Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert

645

Oracle Data Access Components

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed (inherited from TOraDataSet)
SequenceMode (inherited from TOraDataSet)

Session (inherited from TOraDataSet)

SmartFetch (inherited from TOraDataSet)

SQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)

SQLInsert (inherited from TCustomDADataSet)

SQLLock (inherited from TCustomDADataSet)

SQLRecCount (inherited from TCustomDADataSet)

SQLRefresh (inherited from TCustomDADataSet)

SQLType (inherited from TOraDataSet)or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.
Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be
executed.
The SmartFetch mode isused for fast navigation
through a huge amount ofrecords and to minimize
memory consumption.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of© 2019 DevartReference

SQLUpdate (inherited from TCustomDADataSet)

StrictUpdate (inherited from TOraDataSet)

UniDirectional (inherited from TCustomDADataSet)

UpdateObject (inherited from TOraDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)646

the SQL statement being
processed by Oracle
database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used for TOraDataSet toraise the 'Update failed'exception when the numberof updated or deleted
records are not equal to 1.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which
provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
AddWhere (inherited from TCustomDADataSet)

ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)
BreakExec (inherited from TCustomDADataSet)
CancelRange (inherited from TMemDataSet)© 2019 Devart

Description
Adds condition to the
WHERE clause of SELECT
statement in the SQL
property.
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
statement on the server.
Removes any ranges
currently in effect for a647

Oracle Data Access Components

dataset.
Clears all pending cachedupdates from cache andCancelUpdates (inherited from TMemDataSet)
restores dataset in its priorstate.
Clears the cached updates
CommitUpdates (inherited from TMemDataSet)buffer.
Used to obtain a stream forreading data from or writing
CreateBlobStream (inherited from TCustomDADataSet) data to a BLOB field,
specified by the Field
parameter.
Generates the stored
CreateProcCall (inherited from TOraDataSet)
procedure call.
Makes permanent changes
DeferredPost (inherited from TMemDataSet)
to the database server.
Removes WHERE clausefrom the SQL property and
DeleteWhere (inherited from TCustomDADataSet)
assigns the BaseSQL
property.
Enables changing the
EditRangeEnd (inherited from TMemDataSet)
ending value for an existing
range.
Enables changing the
EditRangeStart (inherited from TMemDataSet)
starting value for an existing
range.
Returns the parse error
ErrorOffset (inherited from TOraDataSet)
offset.
Overloaded. Executes a
Execute (inherited from TCustomDADataSet)
SQL statement on theserver.
Indicates whether SQL
Executing (inherited from TCustomDADataSet)
statement is still being
executed.
Used to learn whether
Fetching (inherited from TCustomDADataSet)
TCustomDADataSet is still
fetching rows.
Used to learn whether
FetchingAll (inherited from TCustomDADataSet)
TCustomDADataSet isfetching all rows to the end.
Searches for a record which
FindKey (inherited from TCustomDADataSet)
contains specified fieldvalues.
FindMacro (inherited from TCustomDADataSet)
Description is not available© 2019 DevartReference648

at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset that
FindNearest (inherited from TCustomDADataSet)
matches or is greater thanthe values specified in the
KeyValues parameter.
Determines whether a
FindParam (inherited from TOraDataSet)
parameter with the specified
name exists in a dataset.
Retrieves a TOraArray
GetArray (inherited from TOraDataSet)
object for a field when only
its name is known.
Overloaded. Retrieves
TBlob object for a field or
GetBlob (inherited from TMemDataSet)
current record when only its
name or the field itself isknown.
Returns internal field types
GetDataType (inherited from TCustomDADataSet)
defined in the MemData andaccompanying modules.
Returns a row and column of
GetErrorPos (inherited from TOraDataSet)parse error for a SQL
statement.
Returns a multireference
GetFieldObject (inherited from TCustomDADataSet)
shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) Retrieves the precision of anumber field.
Retrieves the scale of a
GetFieldScale (inherited from TCustomDADataSet)
number field.
Retrieves a TOraFile object
GetFile (inherited from TOraDataSet)
for a field with known name.
Retrieves a TOraInterval
GetInterval (inherited from TOraDataSet)
object for a field with known
name.
GetKeyFieldNames (inherited from
Provides a list of available
TCustomDADataSet)

key field names.

GetKeyList (inherited from TOraDataSet)

Returns the list of tableprimary key fields.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraLob object
for a field with known name.

GetLob (inherited from TOraDataSet)
GetLobLocator (inherited from TOraDataSet)© 2019 Devart

649

Oracle Data Access Components

GetObject (inherited from TOraDataSet)

GetOrderBy (inherited from TCustomDADataSet)
GetRef (inherited from TOraDataSet)
GetTable (inherited from TOraDataSet)

GetTimeStamp (inherited from TOraDataSet)

GotoCurrent (inherited from TCustomDADataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock (inherited from TCustomDADataSet)
MacroByName (inherited from TCustomDADataSet)
OpenNext (inherited from TOraDataSet)

ParamByName (inherited from TOraDataSet)

Prepare (inherited from TCustomDADataSet)
RefreshRecord (inherited from TCustomDADataSet)
RestoreSQL (inherited from TCustomDADataSet)

Retrieves a TOraObject
object for a field with known
name.
Retrieves an ORDER BY
clause from a SQL
statement.
Retrieves a TOraRef object
for a field with known name.
Retrieve a TOraNestTable
object for a field with known
name.
Retrieves a
TOraTimeStamp object for afield with known name.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Opens next cursor or rowset
in the statement.
Sets or uses parameter
information for a specificparameter based on its
name.
Allocates, opens, andparses cursor for a query.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.

© 2019 DevartReference

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveSQL (inherited from TCustomDADataSet)

SaveToXML (inherited from TMemDataSet)

SetOrderBy (inherited from TCustomDADataSet)
SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

SQLSaved (inherited from TCustomDADataSet)
UnLock (inherited from TCustomDADataSet)
UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)© 2019 Devart

650

Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset when651

Oracle Data Access Components

cached updates areenabled.

EventsName
AfterExecute (inherited from TCustomDADataSet)
AfterFetch (inherited from TCustomDADataSet)
AfterUpdateExecute (inherited fromTCustomDADataSet)
BeforeFetch (inherited from TCustomDADataSet)
BeforeUpdateExecute (inherited fromTCustomDADataSet)
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Description
Occurs after a component
has executed a query todatabase.
Occurs after dataset finishes
fetching data from server.
Occurs after executing
insert, delete, update, lockand refresh operations.
Occurs before dataset isgoing to fetch block ofrecords from the server.
Occurs before executing
insert, delete, update, lock,and refresh operations.
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Provide Feedback

5.14.1.4 TOraChangeNotification Class

A component for keeping information in local dataset up-to-date through receiving
notifications.
For a list of all members of this type, see TOraChangeNotification members.

Unit
Ora

SyntaxTOraChangeNotification = class(TComponent);© 2019 DevartReference

652

Remarks
The TOraChangeNotification component is used to register queries with the database andreceive notifications in response to DML or DDL changes on the objects associated with
queries. The notifications are published by database when the DML or DDL transaction
commits.

See Also
TOraChangeNotification Component© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.4.1 Members

TOraChangeNotification class overview.

Properties
Name
ActiveEnabledOperations
Persistent
TimeOut

Description
Indicates whether there is anactive dataset connectedwith theTOraChangeNotification
component.
Used to enable or disableusing change notification.
Used to be notified of theparticular operations
execution.
Used to store notifications ina database persistently.
Indicates the interval for a
notification to remain active.

Methods
Name

Description

RemoveRegistration

Removes the change
notification registration for all
open datasets, connectedwith theTOraChangeNotification© 2019 Devart

653

Oracle Data Access Components

component.

EventsName

Description
Occurs when data in one of
the associated datasets waschanged on the server.

OnChange© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.4.2 Properties

Properties of the TOraChangeNotification class.
For a complete list of the TOraChangeNotification class members, see the
TOraChangeNotification Members topic.

PublicName
ActivePersistent

Description
Indicates whether there is anactive dataset connectedwith theTOraChangeNotification
component.
Used to store notifications ina database persistently.

Published
Name
EnabledOperations
TimeOut

Description
Used to enable or disableusing change notification.
Used to be notified of theparticular operations
execution.
Indicates the interval for a
notification to remain active.

See Also
TOraChangeNotification Class© 2019 DevartReference

654

TOraChangeNotification Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.4.2.1 Active Property

Indicates whether there is an active dataset connected with the TOraChangeNotification
component.

Class
TOraChangeNotification

Syntaxproperty Active: boolean;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.4.2.2 Enabled Property

Used to enable or disable using change notification.

Class
TOraChangeNotification

Syntaxproperty Enabled: boolean default True;

Remarks
Set the Enabled property to False to disable change notification for all datasets connected to
the TOraChangeNotification component. Setting this property to True allows datasets,connected to the TOraChangeNotification component, to use change notification.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.14.1.4.2.3 Operations Property

Used to be notified of the particular operations execution.

Class© 2019 Devart

Provide Feedback

655

Oracle Data Access Components

TOraChangeNotification

Syntaxproperty Operations: TChangeNotifyDMLOperations default[cnoInsert, cnoUpdate, cnoDelete];

Remarks
Set the Operations property to provide a notification when particular operations are being
executed.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.4.2.4 Persistent Property

Used to store notifications in a database persistently.

Class
TOraChangeNotification

Syntaxproperty Persistent: boolean;

Remarks
If True, notifications will be stored persistently in a database and would not be lost if server
instance crashes after generating notifications, and they would be sent after Oracle serverrestart.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.4.2.5 TimeOut Property

Indicates the interval for a notification to remain active.

Class
TOraChangeNotification

Syntaxproperty TimeOut: integer default 0;© 2019 DevartReference

656

Remarks
Set the TimeOut property to determine time interval in seconds, after which the notification
registration will expire.
The minimum value is 1 second, maximum is 2^31-1 seconds.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.4.3 Methods

Methods of the TOraChangeNotification class.
For a complete list of the TOraChangeNotification class members, see the
TOraChangeNotification Members topic.

PublicName

Description
Removes the change
notification registration for all
open datasets, connectedwith theTOraChangeNotification
component.

RemoveRegistration

See Also
TOraChangeNotification Class
TOraChangeNotification Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.4.3.1 RemoveRegistration Method

Removes the change notification registration for all open datasets, connected with the
TOraChangeNotification component.

Class
TOraChangeNotification

Syntax
procedure RemoveRegistration(Session: TOraSession);© 2019 Devart

657

Oracle Data Access Components

Parameters
SessionRemarks
Use the RemoveRegistration method to remove the change notification registration for all
open datasets, connected with the TOraChangeNotification component. To register thechange notification again, reopen all required datasets.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.4.4 Events

Events of the TOraChangeNotification class.
For a complete list of the TOraChangeNotification class members, see the
TOraChangeNotification Members topic.

Published
Name

Description
Occurs when data in one of
the associated datasets waschanged on the server.

OnChange

See Also
TOraChangeNotification Class
TOraChangeNotification Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.4.4.1 OnChange Event

Occurs when data in one of the associated datasets was changed on the server.

Class
TOraChangeNotification

Syntaxproperty OnChange: TOraChangeNotificationEvent;© 2019 DevartReference

658

Remarks
The OnChange event occurs when data in one of the associated datasets has been changedon the server. To receive change notifications the Enabled property must be set to True. The
NotifyType parameter contains the type of the event occurred. The TableChanges parametercontains information on all table changes.

See Also
EnabledTOraChangeNotification Component© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.5 TOraChangeNotificationOptions Class

Used to specify how query notifications will be generated.
For a list of all members of this type, see TOraChangeNotificationOptions members.

Unit
Ora

SyntaxTOraChangeNotificationOptions = class(TPersistent);© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.5.1 Members

TOraChangeNotificationOptions class overview.

Properties
Name

Description
If the property is set to True,
query level granularity isrequired. Notification should
be only generated if thequery result set changes.

QueryResultOnly© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

659

Oracle Data Access Components

Reserved.
5.14.1.5.2 Properties

Properties of the TOraChangeNotificationOptions class.
For a complete list of the TOraChangeNotificationOptions class members, see the
TOraChangeNotificationOptions Members topic.

Published
Name

Description
If the property is set to True,
query level granularity isrequired. Notification should
be only generated if thequery result set changes.

QueryResultOnly

See Also
TOraChangeNotificationOptions Class
TOraChangeNotificationOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.5.2.1 QueryResultOnly Property

If the property is set to True, query level granularity is required. Notification should be only
generated if the query result set changes.

Class
TOraChangeNotificationOptions

Syntaxproperty QueryResultOnly: boolean default false;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6 TOraDataSet ClassA class defining the Oracle functionality for a dataset.
For a list of all members of this type, see TOraDataSet members.

© 2019 DevartReference

660

Unit
Ora

SyntaxTOraDataSet = class(TCustomDADataSet);

Remarks
TOraDataSet is a component that defines the Oracle functionality for a dataset. TOraDataSet
can execute queries, fetch rows and control Oracle specific data types. Applications neveruse TOraDataSet objects directly. Instead they use descendants of TOraDataSet, such as
TOraQuery, TSmartQuery, TOraStoredProc, and TOraTable, which inherit its databaserelated properties and methods.

Inheritance Hierarchy
TMemDataSet
TCustomDADataSet
TOraDataSet

See Also
TOraQuery
TSmartQueryTOraStoredProc
TOraTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.1 Members

TOraDataSet class overview.

Properties
Name
BaseSQL (inherited from TCustomDADataSet)
CachedUpdates (inherited from TMemDataSet)© 2019 Devart

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable

661

Oracle Data Access Components

ChangeNotification

CheckMode

CommandTimeout

Conditions (inherited from TCustomDADataSet)
Connection (inherited from TCustomDADataSet)

Cursor
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)

DetailFields (inherited from TCustomDADataSet)

Disconnected (inherited from TCustomDADataSet)

DMLRefresh

Encryption

FetchAllthe use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.
Used to define the checkmode before editing arecord.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption
options in a dataset.
Used to request all recordsof the query from databaseserver when a dataset isbeing opened.
© 2019 DevartReference

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)

IsPLSQL

IsQuery
KeyExclusive (inherited from TMemDataSet)

KeyFields

KeySequence

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)© 2019 Devart

662

Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows ornot.
Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.
Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted orposted to a database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.

663

Oracle Data Access Components

LockMode
MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

NonBlocking

Options

OptionsDS

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)
Params
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly (inherited from TCustomDADataSet)

Used to define when to
perform the locking of an
editing record.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.
Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users from© 2019 DevartReference

RefreshMode
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed
SequenceMode

SessionSmartFetch

SQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)

SQLInsert (inherited from TCustomDADataSet)

SQLLock (inherited from TCustomDADataSet)

SQLRecCount (inherited from TCustomDADataSet)© 2019 Devart

664

updating, inserting, ordeleting data in the dataset.
Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert
or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.
Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be
executed.
The SmartFetch mode isused for fast navigation
through a huge amount ofrecords and to minimize
memory consumption.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when

665

Oracle Data Access Components

SQLRefresh (inherited from TCustomDADataSet)

SQLType

SQLUpdate (inherited from TCustomDADataSet)

StrictUpdate

UniDirectional (inherited from TCustomDADataSet)

UpdateObject

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of
the SQL statement being
processed by Oracle
database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used for TOraDataSet toraise the 'Update failed'exception when the numberof updated or deleted
records are not equal to 1.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which
provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
AddWhere (inherited from TCustomDADataSet)

Description
Adds condition to the
WHERE clause of SELECT
statement in the SQL
property.

© 2019 DevartReference

666

Applies a range to thedataset.
Overloaded. Writes
ApplyUpdates (inherited from TMemDataSet)
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
BreakExec (inherited from TCustomDADataSet)
statement on the server.
Removes any ranges
CancelRange (inherited from TMemDataSet)
currently in effect for adataset.
Clears all pending cachedupdates from cache andCancelUpdates (inherited from TMemDataSet)
restores dataset in its priorstate.
Clears the cached updates
CommitUpdates (inherited from TMemDataSet)buffer.
Used to obtain a stream forreading data from or writing
CreateBlobStream (inherited from TCustomDADataSet) data to a BLOB field,
specified by the Field
parameter.
Generates the stored
CreateProcCall
procedure call.
Makes permanent changes
DeferredPost (inherited from TMemDataSet)
to the database server.
Removes WHERE clausefrom the SQL property and
DeleteWhere (inherited from TCustomDADataSet)
assigns the BaseSQL
property.
Enables changing the
EditRangeEnd (inherited from TMemDataSet)
ending value for an existing
range.
Enables changing the
EditRangeStart (inherited from TMemDataSet)
starting value for an existing
range.
Returns the parse error
ErrorOffset
offset.
Overloaded. Executes a
Execute (inherited from TCustomDADataSet)
SQL statement on theserver.
Indicates whether SQL
Executing (inherited from TCustomDADataSet)
statement is still being
executed.
Fetching (inherited from TCustomDADataSet)
Used to learn whether
ApplyRange (inherited from TMemDataSet)© 2019 Devart

667

Oracle Data Access Components

TCustomDADataSet is still
fetching rows.
Used to learn whether
FetchingAll (inherited from TCustomDADataSet)
TCustomDADataSet isfetching all rows to the end.
Searches for a record which
FindKey (inherited from TCustomDADataSet)
contains specified fieldvalues.
Description is not available
FindMacro (inherited from TCustomDADataSet)at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset that
FindNearest (inherited from TCustomDADataSet)
matches or is greater thanthe values specified in the
KeyValues parameter.
Determines whether a
FindParam
parameter with the specified
name exists in a dataset.
Retrieves a TOraArray
GetArrayobject for a field when only
its name is known.
Overloaded. Retrieves
TBlob object for a field or
GetBlob (inherited from TMemDataSet)
current record when only its
name or the field itself isknown.
Returns internal field types
GetDataType (inherited from TCustomDADataSet)
defined in the MemData andaccompanying modules.
Returns a row and column of
GetErrorPos
parse error for a SQL
statement.
Returns a multireference
GetFieldObject (inherited from TCustomDADataSet)
shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) Retrieves the precision of anumber field.
Retrieves the scale of a
GetFieldScale (inherited from TCustomDADataSet)
number field.
Retrieves a TOraFile object
GetFilefor a field with known name.
Retrieves a TOraInterval
GetInterval
object for a field with knownname.
© 2019 DevartReference

GetKeyFieldNames (inherited fromTCustomDADataSet)
GetKeyList
GetLob
GetLobLocator
GetObject
GetOrderBy (inherited from TCustomDADataSet)
GetRef
GetTable

GetTimeStamp

GotoCurrent (inherited from TCustomDADataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock (inherited from TCustomDADataSet)
MacroByName (inherited from TCustomDADataSet)
OpenNext
ParamByName© 2019 Devart

668

Provides a list of available
key field names.
Returns the list of tableprimary key fields.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraObject
object for a field with known
name.
Retrieves an ORDER BY
clause from a SQL
statement.
Retrieves a TOraRef object
for a field with known name.
Retrieve a TOraNestTable
object for a field with known
name.
Retrieves a
TOraTimeStamp object for afield with known name.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Opens next cursor or rowset
in the statement.
Sets or uses parameter
information for a specificparameter based on its

669

Oracle Data Access Components

Prepare (inherited from TCustomDADataSet)
RefreshRecord (inherited from TCustomDADataSet)
RestoreSQL (inherited from TCustomDADataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveSQL (inherited from TCustomDADataSet)

SaveToXML (inherited from TMemDataSet)

SetOrderBy (inherited from TCustomDADataSet)
SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

SQLSaved (inherited from TCustomDADataSet)
UnLock (inherited from TCustomDADataSet)
UnPrepare (inherited from TMemDataSet)

name.
Allocates, opens, andparses cursor for a query.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously
prepared query on the© 2019 DevartReference

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

670

server and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

EventsName
AfterExecute (inherited from TCustomDADataSet)
AfterFetch (inherited from TCustomDADataSet)
AfterUpdateExecute (inherited fromTCustomDADataSet)
BeforeFetch (inherited from TCustomDADataSet)
BeforeUpdateExecute (inherited fromTCustomDADataSet)
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Description
Occurs after a component
has executed a query todatabase.
Occurs after dataset finishes
fetching data from server.
Occurs after executing
insert, delete, update, lockand refresh operations.
Occurs before dataset isgoing to fetch block ofrecords from the server.
Occurs before executing
insert, delete, update, lock,and refresh operations.
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Provide Feedback

5.14.1.6.2 Properties

Properties of the TOraDataSet class.
For a complete list of the TOraDataSet class members, see the TOraDataSet Members© 2019 Devart

671

Oracle Data Access Components

topic.

PublicName
BaseSQL (inherited from TCustomDADataSet)

CachedUpdates (inherited from TMemDataSet)

ChangeNotification

CheckMode

CommandTimeout

Conditions (inherited from TCustomDADataSet)
Connection (inherited from TCustomDADataSet)

Cursor
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)

DetailFields (inherited from TCustomDADataSet)

Disconnected (inherited from TCustomDADataSet)

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.
Used to define the checkmode before editing arecord.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.

© 2019 DevartReference

DMLRefresh

Encryption

FetchAll

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)

IsPLSQL

IsQuery
KeyExclusive (inherited from TMemDataSet)

KeyFields

KeySequence© 2019 Devart

672

Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption
options in a dataset.
Used to request all recordsof the query from databaseserver when a dataset isbeing opened.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows ornot.
Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.
Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted or673

Oracle Data Access Components

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

LockMode
MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

NonBlocking

Options

OptionsDS

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)

posted to a database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to define when to
perform the locking of an
editing record.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the© 2019 DevartReference

Params
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly (inherited from TCustomDADataSet)
RefreshMode
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed
SequenceMode

SessionSmartFetch

SQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)
SQLInsert (inherited from TCustomDADataSet)© 2019 Devart

674

Params property.
Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.
Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert
or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.
Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be
executed.
The SmartFetch mode isused for fast navigation
through a huge amount ofrecords and to minimize
memory consumption.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL

675

Oracle Data Access Components

SQLLock (inherited from TCustomDADataSet)

SQLRecCount (inherited from TCustomDADataSet)

SQLRefresh (inherited from TCustomDADataSet)

SQLType

SQLUpdate (inherited from TCustomDADataSet)

StrictUpdate

UniDirectional (inherited from TCustomDADataSet)

UpdateObject

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of
the SQL statement being
processed by Oracle
database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used for TOraDataSet toraise the 'Update failed'exception when the numberof updated or deleted
records are not equal to 1.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which
provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

© 2019 DevartReference

676

See Also
TOraDataSet Class
TOraDataSet Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.1 ChangeNotification Property

Used to receive database change notification messages to refresh dataset when required.

Class
TOraDataSet

Syntaxproperty ChangeNotification: TOraChangeNotification;

Remarks
Use the ChangeNotification property to associate the component with the
TOraChangeNotification component to receive database change notification messages torefresh dataset when required.

See Also
TOraChangeNotification
TOraChangeNotification Component
Options© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.14.1.6.2.2 CheckMode Property

Used to define the check mode before editing a record.

Class
TOraDataSet

Syntaxproperty CheckMode: TCheckMode default cmNone;© 2019 Devart

Provide Feedback

677

Oracle Data Access Components

Remarks
Use the CheckMode property to define the check mode before editing a record. Checking
records is useful in creating concurrent multi-user applications. Set CheckMode to specify
what action to take when another user makes modifications to a record. TOraDataSet firstrefetches record values and compares them with those of a client.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.3 CommandTimeout Property

Sets the wait time before a request is sent to the server to terminate the attempt to execute or
fetch the current SQL statement.

Class
TOraDataSet

Syntaxproperty CommandTimeout: integer default 0;

Remarks
The wait time is specified in seconds to wait for the command to execute. The default value is
0. The value of 0 indicates there are no time limits (an attempt to execute a command will
wait indefinitely).

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.4 Cursor Property

Used to fetch data from the cursor parameter and cursor field in Oracle 8.

Class
TOraDataSet

Syntaxproperty Cursor: TOraCursor;

Remarks© 2019 DevartReference678

Use the Cursor property to fetch data from the cursor parameter and cursor field in Oracle 8.
You can assign the value of TOraParam.AsCursor or TCursorField.AsCursor to the Cursor
property. After assigning you can open the dataset once.

ExampleOraQuery1.Cursor := OraSQL1.ParamByName('Cur').AsCursor;
OraQuery1.Open;

See Also
TOraCursor
TOraParam.AsCursor© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.5 DMLRefresh Property

Used to refresh record by RETURNING clause when insert or update is performed.

Class
TOraDataSet

Syntaxproperty DMLRefresh: boolean;

Remarks
Use the DMLRefresh property to refresh record by RETURNING clause when insert or update
is performed. This feature is only for Oracle 8.
The default value is False.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.14.1.6.2.6 Encryption Property

Used to specify encryption options in a dataset.

Class
TOraDataSet

Syntax© 2019 Devart

Provide Feedback

679

Oracle Data Access Components

property Encryption: TOraEncryption;

Remarks
Set the Encryption options for using encryption in a dataset.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.7 FetchAll Property

Used to request all records of the query from database server when a dataset is being
opened.

Class
TOraDataSet

Syntaxproperty FetchAll: boolean;

Remarks
When set to True, all records of the query are requested from database server when adataset is being opened. When set to False, records are retrieved when a data-aware
component or a program requests it. If a query can return a lot of records, set this property to
False if initial response time is important.
When the FetchAll property is False, the first call to the TMemDataSet.Locate and
TMemDataSet.LocateEx methods may take a lot of time to retrieve additional records to theclient side.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.8 IsPLSQL Property

Indicates whether a SQL statement is a PL/SQL block.

Class
TOraDataSet

Syntaxproperty IsPLSQL: boolean;© 2019 DevartReference

680

Remarks
Use the IsPLSQL property to check whether a SQL statement is a PL/SQL block.
TOraDataSet must be prepared beforehand.
IsPLSQL is a read-only property.

See Also
IsQuery© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.9 IsQuery Property

Indicates whether SQL statement returns rows or not.

Class
TOraDataSet

Syntaxproperty IsQuery: boolean;

Remarks
When the TOraDataSet component is prepared, it returns True. If SQL statement is SELECT
or PL/SQL block it returns the REF CURSOR parameter.
Use the IsQuery property to check whether SQL statement returns rows or not. TOraDataSet
returns rows when SQL statement is SELECT or PL/SQL block with the REF CURSOR
parameter. TOraDataSet must be prepared beforehand.
IsQuery is a read-only property.

See Also
IsPLSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.10 KeyFields Property

Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties ifthey were empty before updating a database.

© 2019 Devart

681

Oracle Data Access Components

Class
TOraDataSet

Syntaxproperty KeyFields: string;

Remarks
Assign the KeyFields property to build SQL statements for the SQLDelete, SQLInsert, andSQLUpdate properties if they were empty before updating a database. To exploit this feature
KeyFields may hold a list of semicolon-delimited field names. If KeyFields was not defined
before opening the dataset, ROWID pseudo fields are used.
Besides, the KeyFields property may hold the name of a field which will be later assigned with
Oracle sequenced values. Beforehand Oracle sequence must be created and its namepassed to the KeySequence property.
Sequences are generated when either TDataSet.Insert or TDataSet.Post method is called.
Which of these two methods is used to modify the database is determined by the
SequenceMode property.
Note: Although keys may be created across a number of table fields, sequence is generated
only for the first field found in the KeyFields property.

See Also
KeySequence
SequenceMode
TCustomDADataSet.SQLDelete
TCustomDADataSet.SQLInsert
TCustomDADataSet.SQLRefresh
TCustomDADataSet.SQLUpdate© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.11 KeySequence Property

Used to specify the name of a sequence that will be used to fill in a key field after a newrecord is inserted or posted to a database.

Class
TOraDataSet© 2019 DevartReference

682

Syntaxproperty KeySequence: string;

Remarks
Use the KeySequence property to specify the name of a sequence that will be used to fill in a
key field after a new record is inserted or posted to a database.
Note: KeySequence is used by TOraDataSet only if the KeyFields property is assigned.

ExampleHere is an example of PL/SQL block generated by TOraDataSet:
begin
SELECT DEPT_SEQ.NEXTVALINTO :DEPTNO
FROM Dual;
INSERT INTO DEPT
(DEPTNO, DNAME)VALUES(:DEPTNO, :DNAME);
end;

See Also
SequenceMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.12 LockMode Property

Used to define when to perform the locking of an editing record.

Class
TOraDataSet

Syntaxproperty LockMode: TLockMode;

Remarks
Use the LockMode property to define when to perform the locking of an editing record. Locking
a record is useful when creating multi-user applications. It prevents the possibility of several
users modifying a record at the same time. Locking is realized through the execution of© 2019 Devart

683

Oracle Data Access Components

SELECT FOR UPDATE NOWAIT statement.
Locking is performed by the RefreshRecord method.
To set pessimistic locking use LockMode = lmLockImmediate, CheckMode = cmException.
To set optimistic locking use LockMode = lmLockDelayed, CheckMode = cmException.
The default value is lmNone.

See Also
TCustomDADataSet.Lock
P:Devart.Odac.TCustomOraQuery.SQLLock
CheckMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.13 NonBlocking Property

Used to execute a SQL statement and fetch rows by a separate thread.

Class
TOraDataSet

Syntaxproperty NonBlocking: boolean;

Remarks
Set the NonBlocking property to True to execute SQL statement and fetch rows by a separate
thread.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.14 Options Property

Used to specify the behaviour of TOraDataSetObject.

Class
TOraDataSet

Syntaxproperty Options: TOraDataSetOptions;© 2019 DevartReference

684

Remarks
Set the properties of Options to specify the behaviour of a TOraDataSet object.
Descriptions of all options are in the table below.

Option Name
AutoClose
CacheLobs
DefaultValues
DeferredLobRead
EnableBCD
EnableFMTBCD

ExtendedFieldsInfo
FieldsAsString
FullRefresh
PrefetchLobSize
PrefetchRows
PrepareUpdateSQL
ProcNamedParams
RawAsString

ReflectChangeNotify

ScrollableCursor© 2019 Devart

Description
Used to close OCI cursor after fetching allrows.
Used to allocate local memory buffer tohold a copy of the Lob content.
Used for TOraDataSet to fill the
DefaultExpression property of TField
objects by appropriate value.
Used to fetch all Oracle 8 Lob values when
they are explicitly requested.
Used to enable currency type. Default valueof this option is False.
Used to enable using FMTBCD instead offloat for large integer numbers to keep
precision.
Used to perform an additional query to get
information about returned fields and thetables they belong to.
Used to treat all non-BLOB fields as beingof string datatype.
Used to refresh fields of all tables by the
RefreshRecord method.
Used to retrieve the LOB length and the
LOB data beginning during regular fetch.
Used to get or set the number of rows that
OCI prefetches when executing a query.
Used to automatically prepare update
queries before execution.
Used to specify a notation method of
passing parameter values to the stored PL/
SQL object.
Used to treat all RAW fields as being ofstring datatype.
Used for a dataset component to refresh its
data when it gets database change
notification messages in response to DML
or DDL changes on the objects associatedwith the dataset query.
Used for TOraDataSet to use scrollable

685

Oracle Data Access Components

StatementCache

TemporaryLobUpdate

server cursor (available since Oracle 9only) instead of caching data on the clientside.
Used to get a value indicating whether
Oracle resources assosiated with thecurrent statement will be cached inside asession.
Temporary LOBs are used to write input
and input/output LOB parameters into
database when executing dataset's SQL
statements.

See Also
TCustomDADataSet.Options© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.15 OptionsDS Property

Used to specify the behaviour of TOraDataSetObject.

Class
TOraDataSet

Syntaxproperty OptionsDS: TOraDataSetOptionsDS stored False;

Remarks
Set the properties of OptionsDS to specify the behaviour of a TOraDataSet object.
Descriptions of all options are in the table below.

Option Name
AutoClose
CacheLobs
DefaultValues
DeferredLobRead

Description
Used to close OCI cursor after fetching allrows.
Used to allocate local memory buffer tohold a copy of the Lob content.
Used for TOraDataSet to fill the
DefaultExpression property of TField
objects with the appropriate value.
Used fetch all Oracle 8 Lob values only
© 2019 DevartReference

686

when they are explicitly requested.
Used to treat all non-BLOB fields as beingof string datatype.
Used to display the ROWID column.
Used to keep TOraDataSet prepared after
closing.
Used to treat all RAW fields as being ofstring datatype.
Used for TOraDataSet to use scrollable
server cursor (available since Oracle 9only) instead of caching data on the client
side.

FieldsAsString
HideRowId
KeepPrepared
RawAsString

ScrollableCursor

See Also
TCustomDADataSet.Options© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.16 Params Property

Contains the parameters for a query's SQL statement.

Class
TOraDataSet

Syntaxproperty Params: TOraParams stored False;

Remarks
The Params parameter contains the parameters for a query's SQL statement.
Access Params at runtime to view and set parameter names, values, and data types
dynamically (at design time use the Parameters editor to set parameter information). Params
is a zero-based array of parameter records. Index specifies the array element to access.
An easier way to set and retrieve parameter values when the name of each parameter isknown is to call ParamByName.

See Also
TOraParam
ParamByName© 2019 Devart

687

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.17 RefreshMode Property

Used to specify when to refresh an editing record.

Class
TOraDataSet

Syntaxproperty RefreshMode: TRefreshMode stored False;

Remarks
Use the RefreshMode property to define when to perform a refresh of editing record.
Refreshing a record is useful when a table has triggers or fields of a table have default value.
Refresh is performed by the RefreshRecord method.
The default value is rmNone.
Note: RefreshMode is obsolete, and only included for backward compatibility. Use
TCustomDADataSet.RefreshOptions instead.

See Also
TCustomDADataSet.RefreshRecord
TCustomDADataSet.SQLRefresh© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.18 ReturnParams Property

Used to return a new fields value to dataset after insert or update.

Class
TOraDataSet

Syntaxproperty ReturnParams: boolean stored False;

Remarks© 2019 DevartReference688

Use the ReturnParams property to return the new fields value to dataset after insert or
update. The actual value of a field after insert or update may be different from the value stored
in local memory if a table has a trigger.
When ReturnParams is True, OUT parameters of SQLInsert and SQLUpdate statements are
assigned to the corresponding fields.
OUT parameters can have PL/SQL block or DML statements with the RETURNING clause(for Oracle 8 only).
The default value is False.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.19 Row sProcessed Property

Returns the number of rows processed by a query.

Class
TOraDataSet

Syntaxproperty RowsProcessed: integer;

Remarks
Use the RowsProcessed property to return the number of rows processed by a query. Usefulfor SELECT, UPDATE and DELETE statements. In case of SELECT statement,
RowsProcessed increments by FetchRows.

See Also
TCustomDADataSet.RowsAffected© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.20 SequenceMode Property

Used to specify the methods used internally to generate a sequenced field.

Class
TOraDataSet

Syntax© 2019 Devart

689

Oracle Data Access Components

property SequenceMode: TSequenceMode default smPost;

Remarks
Set the SequenceMode property to specify which method is used internally to generate asequenced field.

See Also
KeyFields
KeySequence© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.21 Session Property

Used to specify the session in which dataset will be executed.

Class
TOraDataSet

Syntaxproperty Session: TOraSession;

Remarks
Use the Session property to specify the session in which dataset will be executed. If Session
is not connected, the Open method calls Session.Connect.

See Also
TOraSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.22 SmartFetch Property

The SmartFetch mode is used for fast navigation through a huge amount of records and tominimize memory consumption.

Class
TOraDataSet© 2019 DevartReference

690

Syntaxproperty SmartFetch: TSmartFetchOptions;

See Also
TSmartFetchOptions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.23 SQLType Property

Used to get the typecode of the SQL statement being processed by Oracle database server.

Class
TOraDataSet

Syntaxproperty SQLType: integer;

Remarks
Read the SQLType property to get the typecode of the SQL statement being processed byOracle database server.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.24 StrictUpdate Property

Used for TOraDataSet to raise the 'Update failed' exception when the number of updated ordeleted records are not equal to 1.

Class
TOraDataSet

Syntaxproperty StrictUpdate: boolean stored False;

Remarks
When True, TOraDataSet raises the 'Update failed' exception when the number of updated or© 2019 Devart

691

Oracle Data Access Components

deleted records are not equal 1. The exception does not occur when you use a PL/SQL block.
The default value is True.
Note: StrictUpdate is obsolete, and included for backward compatibility only. Use
TCustomDADataSet.Options instead.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.2.25 UpdateObject Property

Used to point to an update object component which provides SQL statements that perform
updates of the read-only datasets.

Class
TOraDataSet

Syntaxproperty UpdateObject: TOraUpdateSQL;

Remarks
The UpdateObject property points to an update object component which provides SQL
statements that perform updates of the read-only datasets when cached updates areenabled.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3 Methods

Methods of the TOraDataSet class.
For a complete list of the TOraDataSet class members, see the TOraDataSet Members
topic.

PublicName
AddWhere (inherited from TCustomDADataSet)

ApplyRange (inherited from TMemDataSet)

Description
Adds condition to the
WHERE clause of SELECT
statement in the SQL
property.
Applies a range to thedataset.
© 2019 DevartReference

692

Overloaded. Writes
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
BreakExec (inherited from TCustomDADataSet)
statement on the server.
Removes any ranges
CancelRange (inherited from TMemDataSet)
currently in effect for adataset.
Clears all pending cachedupdates from cache andCancelUpdates (inherited from TMemDataSet)
restores dataset in its priorstate.
Clears the cached updates
CommitUpdates (inherited from TMemDataSet)buffer.
Used to obtain a stream forreading data from or writing
CreateBlobStream (inherited from TCustomDADataSet) data to a BLOB field,
specified by the Field
parameter.
Generates the stored
CreateProcCall
procedure call.
Makes permanent changes
DeferredPost (inherited from TMemDataSet)
to the database server.
Removes WHERE clausefrom the SQL property and
DeleteWhere (inherited from TCustomDADataSet)
assigns the BaseSQL
property.
Enables changing the
EditRangeEnd (inherited from TMemDataSet)
ending value for an existing
range.
Enables changing the
EditRangeStart (inherited from TMemDataSet)
starting value for an existing
range.
Returns the parse error
ErrorOffset
offset.
Overloaded. Executes a
Execute (inherited from TCustomDADataSet)
SQL statement on theserver.
Indicates whether SQL
Executing (inherited from TCustomDADataSet)
statement is still being
executed.
Used to learn whether
Fetched (inherited from TCustomDADataSet)
TCustomDADataSet has
already fetched all rows.
ApplyUpdates (inherited from TMemDataSet)© 2019 Devart

693

Oracle Data Access Components

Used to learn whether
TCustomDADataSet is still
fetching rows.
Used to learn whether
FetchingAll (inherited from TCustomDADataSet)
TCustomDADataSet isfetching all rows to the end.
Searches for a record which
FindKey (inherited from TCustomDADataSet)
contains specified fieldvalues.
Description is not available
FindMacro (inherited from TCustomDADataSet)at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset that
FindNearest (inherited from TCustomDADataSet)
matches or is greater thanthe values specified in the
KeyValues parameter.
Determines whether a
FindParam
parameter with the specified
name exists in a dataset.
Retrieves a TOraArray
GetArrayobject for a field when only
its name is known.
Overloaded. Retrieves
TBlob object for a field or
GetBlob (inherited from TMemDataSet)
current record when only its
name or the field itself isknown.
Returns internal field types
GetDataType (inherited from TCustomDADataSet)
defined in the MemData andaccompanying modules.
Returns a row and column of
GetErrorPos
parse error for a SQL
statement.
Returns a multireference
GetFieldObject (inherited from TCustomDADataSet)
shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) Retrieves the precision of anumber field.
Retrieves the scale of a
GetFieldScale (inherited from TCustomDADataSet)
number field.
Retrieves a TOraFile object
GetFilefor a field with known name.
Fetching (inherited from TCustomDADataSet)

GetInterval

Retrieves a TOraInterval
object for a field with known© 2019 DevartReference

694

name.
GetKeyFieldNames (inherited fromTCustomDADataSet)
GetKeyList
GetLob
GetLobLocator
GetObject
GetOrderBy (inherited from TCustomDADataSet)
GetRef
GetTable

GetTimeStamp

GotoCurrent (inherited from TCustomDADataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock (inherited from TCustomDADataSet)
MacroByName (inherited from TCustomDADataSet)
OpenNext
ParamByName© 2019 Devart

Provides a list of available
key field names.
Returns the list of tableprimary key fields.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraObject
object for a field with known
name.
Retrieves an ORDER BY
clause from a SQL
statement.
Retrieves a TOraRef object
for a field with known name.
Retrieve a TOraNestTable
object for a field with known
name.
Retrieves a
TOraTimeStamp object for afield with known name.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Opens next cursor or rowset
in the statement.
Sets or uses parameter
information for a specific695

Oracle Data Access Components

Prepare (inherited from TCustomDADataSet)
RefreshRecord (inherited from TCustomDADataSet)
RestoreSQL (inherited from TCustomDADataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveSQL (inherited from TCustomDADataSet)

SaveToXML (inherited from TMemDataSet)

SetOrderBy (inherited from TCustomDADataSet)
SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

SQLSaved (inherited from TCustomDADataSet)
UnLock (inherited from TCustomDADataSet)
UnPrepare (inherited from TMemDataSet)

parameter based on its
name.
Allocates, opens, andparses cursor for a query.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously© 2019 DevartReference

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)696

prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

See Also
TOraDataSet Class
TOraDataSet Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.1 CreateProcCall Method

Generates the stored procedure call.

Class
TOraDataSet

Syntax
procedure CreateProcCall(Name: string; Overload: integer = 0);
Parameters
Name
Holds the name of the stored procedure.
Overload
Holds the numder of the overloaded procedure.

Remarks
Call the CreateProcCall method to assign a PL/SQL block that calls stored procedure
specified by Name to the SQL property. Overload parameter must contain the number of theoverloaded procedure. Retrieves the information about the procedure parameters from
Oracle. After calling CreateProcCall you can execute stored procedure by the Execute
method.
© 2019 Devart

697

Oracle Data Access Components

See Also
TCustomDADataSet.Execute
TCustomDAConnection.ExecProc
TOraStoredProc© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.2 ErrorOffset Method

Returns the parse error offset.

Class
TOraDataSet

Syntaxfunction ErrorOffset: integer;
Return Value
the parse error offset.

Remarks
Call the ErrorOffset method to return the parse error offset for a SQL statement. Check
ErrorOffset after TOraDataSet raises an exception.

See Also
GetErrorPos© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.3 FindParam Method

Determines whether a parameter with the specified name exists in a dataset.

Class
TOraDataSet

Syntaxfunction FindParam(const Value: string): TOraParam;© 2019 DevartReference

698

Parameters
Value
Holds the name of the param to search for.
Return Valuea TOraParam object for the specified Name.

Remarks
Call the FindParam method to determine if parameter with the specified name exists in adataset. Name is the name of the param for which to search. If FindParam finds a param witha matching name, it returns a TOraParam object for the specified Name. Otherwise it returns
nil.

See Also
ParamsParamByName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.4 GetArray Method

Retrieves a TOraArray object for a field when only its name is known.

Class
TOraDataSet

Syntaxfunction GetArray(const FieldName: string): TOraArray;
Parameters
FieldName
Holds the name of an existing field.
Return Valuea TOraArray object for a field with known name.

Remarks
Call the GetArray method to retrieve a TOraArray object for a field when only its name is
known. FieldName is the name of an existing field. The field should have the ftArray type.

See Also© 2019 Devart

699

Oracle Data Access Components

TOraArray
TCustomDADataSet.GetDataType
TOraParam.AsArray© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.5 GetErrorPos Method

Returns a row and column of parse error for a SQL statement.

Class
TOraDataSet

Syntax
procedure GetErrorPos(var Row: integer; var Col: integer);
Parameters
Row
Holds the row number.
Col
Holds the column number.

Remarks
Call the GetErrorPos method to return a row and column of parse error for a SQL statement.
Use GetErrorPos after TOraDataSet raises an exception.

See Also
ErrorOffset© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.6 GetFile Method

Retrieves a TOraFile object for a field with known name.

Class
TOraDataSet

Syntax© 2019 DevartReference

700

function GetFile(const FieldName: string): TOraFile;
Parameters
FieldName
Holds the name of an existing field.
Return Valuea TOraFile object for a field with known name.

Remarks
Call the GetFile method to retrieve a TOraFile object for a field when only its name is known.
FieldName is the name of an existing field. The field should have ftBFile.

See Also
TOraFile
TCustomDADataSet.GetDataType
TBFileField
TOraParam.AsBFile© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.7 GetInterval Method

Retrieves a TOraInterval object for a field with known name.

Class
TOraDataSet

Syntaxfunction GetInterval(const FieldName: string): TOraInterval;
Parameters
FieldName
Holds the name of an existing field.
Return Valuea TOraInterval object for a field with known name.

Remarks
Call the GetInterval method to retrieve a TOraInterval object for a field when only its name is
known. FieldName is the name of an existing field. The field should have ftIntervalYM or© 2019 Devart

701

Oracle Data Access Components

ftIntervalDS.

See Also
TOraInterval
TOraParam.AsInterval© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.8 GetKeyList Method

Returns the list of table primary key fields.

Class
TOraDataSet

Syntaxfunction GetKeyList(TableName: string; List: TStrings): string;Parameters
TableName
Holds the table name.
List
Return Valuethe list of table primary key fields.

Remarks
Call the GetKeyList method to get the list of table primary key fields.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.9 GetLob Method

Retrieves a TOraLob object for a field with known name.

Class
TOraDataSet

Syntaxfunction GetLob(const FieldName: string): TOraLob;© 2019 DevartReference702

Parameters
FieldName
Holds the name of an existing field.
Return Valuea TOraLob object for a field with known name.

Remarks
Call the GetLob method to retrieve a TOraLob object for a field when only its name is known.
FieldName is the name of an existing field. The field should have the ftOraClob or ftOraBlob
type.

See Also
TOraLob
TCustomDADataSet.GetDataType
TOraParam.AsBLOBLocator© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.10 GetLobLocator Method

Retrieves a TOraLob object for a field with known name.

Class
TOraDataSet

Syntaxfunction GetLobLocator(const FieldName: string): TOraLob;
Parameters
FieldName
Holds the name of an existing field.
Return Valuea TOraLob object for a field with known name.

Remarks
Call the GetLobLocator method to retrieve a TOraLob object for a field when only its name is
known. FieldName is the name of an existing field. The field should have the ftOraClob or
ftOraBlob type.

© 2019 Devart

703

Oracle Data Access Components

Note: GetLobLocator is an obsolete method. In newer projects call GetLob instead.

See Also
GetLobTOraLob
TCustomDADataSet.GetDataType
TOraParam.AsBLOBLocator© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.11 GetObject Method

Retrieves a TOraObject object for a field with known name.

Class
TOraDataSet

Syntaxfunction GetObject(const FieldName: string): TOraObject;Parameters
FieldName
Holds the name of an existing field.
Return Valuea TOraObject object for a field with known name.

Remarks
Call the GetObject method to retrieve a TOraObject object for a field when only its name is
known. FieldName is the name of an existing field. The field should have the ftObject,
ftReference, ftArray or ftTable type.

See Also
TOraObject
TCustomDADataSet.GetDataType
TOraParam.AsObject© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference704

5.14.1.6.3.12 GetRef Method

Retrieves a TOraRef object for a field with known name.

Class
TOraDataSet

Syntaxfunction GetRef(const FieldName: string): TOraRef;
Parameters
FieldName
Holds the name of an existing field.
Return Valuea TOraRef object for a field with known name.

Remarks
Call the GetRef method to retrieve a TOraRef object for a field when only its name is known.
FieldName is the name of an existing field. The field should have the ftReference type.

See Also
TOraRef
TCustomDADataSet.GetDataType
TOraNestedTable.Ref
TOraParam.AsRef© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.13 GetTable Method

Retrieve a TOraNestTable object for a field with known name.

Class
TOraDataSet

Syntaxfunction GetTable(const FieldName: string): TOraNestTable;
Parameters
FieldName© 2019 Devart

705

Oracle Data Access Components

Holds the name of an existing field.
Return Valuea TOraNestTable object for a field with known name.

Remarks
Call the GetTable to retrieve a TOraNestTable object for a field when only its name is known.
FieldName is the name of an existing field. The field should have the ftTable type.

See Also
TOraNestTable
TCustomDADataSet.GetDataType
TOraNestedTable.Table
TOraParam.AsTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.14 GetTimeStamp Method

Retrieves a TOraTimeStamp object for a field with known name.

Class
TOraDataSet

Syntaxfunction GetTimeStamp(const FieldName: string): TOraTimeStamp;
Parameters
FieldName
Holds the name of an existing field.
Return Valuea TOraTimeStamp object for a field with known name.

Remarks
Call the GetTimeStamp method to retrieve a TOraTimeStamp object for a field when only its
name is known. FieldName is the name of an existing field. The field should haveftTimeStamp.

See Also
TOraTimeStamp© 2019 DevartReference

706

TOraParam.AsTimeStamp© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.15 OpenNext Method

Opens next cursor or rowset in the statement.

Class
TOraDataSet

Syntaxfunction OpenNext: boolean;
Return Value
True, if DataSet opens.

Remarks
Call the OpenNext method to get the second and other Cursors or ResultSets while executing
a query. If DataSet opens, it returns True. If there are no cursors or record sets to be
represented, it will return False, and the current record set will be closed.
Example for working with cursors:
OraQuery1.SQL.Text := 'BEGIN ' +' OPEN :Cur1 FOR SELECT * FROM Dept; ' +' OPEN :Cur2 FOR SELECT * FROM Emp; ' +'END;';
OraQuery1.Params[0].DataType := ftCursor;
OraQuery1.Params[0].ParamType := ptOutput;
OraQuery1.Params[1].DataType := ftCursor;
OraQuery1.Params[1].ParamType := ptOutput;
OraQuery1.Open;// open first cursor
OraQuery1.OpenNext; // open next cursor
Example for working with Implicit Result Sets in Oracle 12c and higher:
OraQuery1.SQL.Text := 'DECLARE ' +' dept_cur SYS_REFCURSOR; ' +' emp_cur SYS_REFCURSOR; ' +'BEGIN ' +' OPEN dept_cur FOR SELECT * FROM Dept; ' +' DBMS_SQL.RETURN_RESULT(dept_cur); ' +' OPEN emp_cur FOR SELECT * FROM Emp; ' +' DBMS_SQL.RETURN_RESULT(emp_cur); ' +'END;';
OraQuery1.Open;// open first result set© 2019 Devart

707

Oracle Data Access Components

OraQuery1.OpenNext; // open next result set© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.6.3.16 ParamByName Method

Sets or uses parameter information for a specific parameter based on its name.

Class
TOraDataSet

Syntaxfunction ParamByName(const Value: string): TOraParam;
Parameters
Valueholds the name of the parameter to retrieve information for.
Return Valuea object.

Remarks
Call the ParamByName method to set or use parameter information for a specific parameterbased on its name. Name is the name of the parameter for which to retrieve information.
ParamByName is used to set a parameter's value at runtime and returns a TOraParamobject.

ExampleThe following statement retrieves the current value of a parameter called "Contact" into anedit box:
Edit1.Text := Query1.ParamsByName('Contact').AsString;See Also
TOraParam
ParamsTCustomDADataSet.FindParam© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference708

5.14.1.7 TOraDataSetField ClassA class providing access to Oracle nested datasets.
For a list of all members of this type, see TOraDataSetField members.

Unit
Ora

SyntaxTOraDataSetField = class(TDataSetField);

Remarks
TOraDataSetField provides access to Oracle nested datasets.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.7.1 Members

TOraDataSetField class overview.

Properties
Name

Description
Indicates whether tafield was
modified.

Modified© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.7.2 Properties

Properties of the TOraDataSetField class.
For a complete list of the TOraDataSetField class members, see the TOraDataSetField
Members topic.

PublicName
Modified

See Also© 2019 Devart

Description
Indicates whether tafield was
modified.

709

Oracle Data Access Components

TOraDataSetField Class
TOraDataSetField Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.7.2.1 Modified Property

Indicates whether tafield was modified.

Class
TOraDataSetField

Syntaxproperty Modified: boolean;

Remarks
The Modified proprty indicates whether a field was modified. The property is writable.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8 TOraDataSetOptions ClassThis class allows setting up the behaviour of the TOraDataSet class.
For a list of all members of this type, see TOraDataSetOptions members.

Unit
Ora

SyntaxTOraDataSetOptions = class(TOraDataSetOptionsDS);

Remarks
Cached Gets a value indicating whether Oracle resources assosiated with the current
statement will be cached inside a session. If you execute many different SELECT statements
this option may significantly increase the performance of your application. But using thisproperty you may easily step over maximum open cursors on Oracle server. And thus you
must be attentive when using the Cached option. This option is only available with Oracle 9.2i
and higher. It will work only if TOraSession.Options is set to True.

© 2019 DevartReference

710

Inheritance Hierarchy
TDADataSetOptions
TOraDataSetOptionsDS
TOraDataSetOptions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.1 Members

TOraDataSetOptions class overview.

Properties
Name

Description
Used to close OCI cursor
AutoClose
after fetching all rows.
Used to execute automatic
AutoPrepare (inherited from TDADataSetOptions)TCustomDADataSet.Prepar
e on the query execution.
Used to enable caching of
CacheCalcFields (inherited from TDADataSetOptions) the TField.Calculated and
TField.Lookup fields.
Used to allocate local
CacheLobs
memory buffer to hold acopy of the Lob content.
Used to store values of theCompressBlobMode (inherited from
BLOB fields in compressed
TDADataSetOptions)
form.
Used for TOraDataSet to fill
the DefaultExpression
DefaultValues
property of TField objects byappropriate value.
Used to fetch all Oracle 8
DeferredLobRead
Lob values when they are
explicitly requested.
Used to get or set a delay inmilliseconds before
DetailDelay (inherited from TDADataSetOptions)refreshing detail dataset
while navigating masterdataset.
EnableBCD© 2019 Devart

Used to enable currency
type. Default value of this711

Oracle Data Access Components

option is False.
Used to enable using
FMTBCD instead of float for
EnableFMTBCD
large integer numbers tokeep precision.
Used to perform an
additional query to get
ExtendedFieldsInfo
information about returned
fields and the tables they
belong to.
Used to treat all non-BLOB
FieldsAsString
fields as being of string
datatype.
Used forTCustomDADataSet to fill
the Origin property of theFieldsOrigin (inherited from TDADataSetOptions)
TField objects byappropriate value when
opening a dataset.
Used to control how adataset treats data of the
FlatBuffers (inherited from TDADataSetOptions)
ftString and ftVarBytes
fields.
Used to refresh fields of all
FullRefreshtables by the RefreshRecord
method.
Used to display the ROWID
HideRowId (inherited from TOraDataSetOptionsDS)
column.
Used to include all set
InsertAllSetFields (inherited from TDADataSetOptions) dataset fields in thegenerated INSERT
statement
KeepPrepared (inherited from TOraDataSetOptionsDS) Used to keep TOraDataSet
prepared after closing.
Used forTCustomDADataSet to use
LocalMasterDetail (inherited from TDADataSetOptions) local filtering to establish
master/detail relationship for
detail dataset and does notrefer to the server.
Used to represent string
fields with the length that is
LongStrings (inherited from TDADataSetOptions)
greater than 255 as
TStringField.

© 2019 DevartReference

MasterFieldsNullable (inherited from
TDADataSetOptions)

NumberRange (inherited from TDADataSetOptions)

PrefetchLobSize

PrefetchRows

PrepareUpdateSQL

ProcNamedParams

QueryRecCount (inherited from TDADataSetOptions)

QuoteNames (inherited from TDADataSetOptions)

RawAsString
ReflectChangeNotify© 2019 Devart

712

Allows to use NULL values
in the fields by which therelation is built, whengenerating the query for the
Detail tables (when thisoption is enabled, theperformance can get worse).
Used to set the MaxValueand MinValue properties of
TIntegerField and
TFloatField to appropriate
values.
Used to retrieve the LOB
length and the LOB data
beginning during regularfetch.
Used to get or set the
number of rows that OCI
prefetches when executing aquery.
Used to automatically
prepare update queries
before execution.
Used to specify a notation
method of passing
parameter values to thestored PL/SQL object.
Used forTCustomDADataSet toperform additional query to
get the record count for thisSELECT, so the
RecordCount property
reflects the actual number ofrecords.
Used forTCustomDADataSet toquote all database object
names in autogenerated
SQL statements such as
update SQL.
Used to treat all RAW fields
as being of string datatype.
Used for a dataset
component to refresh its

713

Oracle Data Access Components

data when it gets databasechange notification
messages in response to
DML or DDL changes on theobjects associated with thedataset query.
Used for a dataset to locally
RemoveOnRefresh (inherited from TDADataSetOptions) remove a record that can not
be found on the server.
Used forTCustomDADataSet to set
RequiredFields (inherited from TDADataSetOptions)
the Required property of the
TField objects for the NOTNULL fields.
Used to return the new value
ReturnParams (inherited from TDADataSetOptions)of fields to dataset after
insert or update.
Used for TOraDataSet touse scrollable server cursor
ScrollableCursor(available since Oracle 9only) instead of caching dataon the client side.
Used for a dataset to set the
ReadOnly property to True
SetFieldsReadOnly (inherited fromfor all fields that do not
TDADataSetOptions)belong to UpdatingTable or
can not be updated.
Used to get a value
indicating whether Oracle
StatementCache
resources assosiated withthe current statement will becached inside a session.
Used forTCustomDADataSet toraise an exception when the
StrictUpdate (inherited from TDADataSetOptions)
number of updated ordeleted records is not equal1.
Temporary LOBs are used
to write input and input/
TemporaryLobUpdate
output LOB parameters into
database when executing
dataset's SQL statements.
Specifies whether to discard
TrimFixedChar (inherited from TDADataSetOptions)
all trailing spaces in the© 2019 DevartReference

714

string fields of a dataset.
Used to include all dataset
fields in the generated
UpdateAllFields (inherited from TDADataSetOptions)
UPDATE and INSERT
statements.
Used to get or set a valuethat enables or disables
UpdateBatchSize (inherited from TDADataSetOptions) batch processing support,
and specifies the number ofcommands that can be
executed in a batch.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
5.14.1.8.2 Properties

Properties of the TOraDataSetOptions class.
For a complete list of the TOraDataSetOptions class members, see the
TOraDataSetOptions Members topic.

PublicName

Description
Used to execute automatic
AutoPrepare (inherited from TDADataSetOptions)TCustomDADataSet.Prepar
e on the query execution.
Used to enable caching of
CacheCalcFields (inherited from TDADataSetOptions) the TField.Calculated and
TField.Lookup fields.
Used to store values of theCompressBlobMode (inherited from
BLOB fields in compressed
TDADataSetOptions)
form.
Used to get or set a delay inmilliseconds before
DetailDelay (inherited from TDADataSetOptions)refreshing detail dataset
while navigating masterdataset.
Used forTCustomDADataSet to fill
the Origin property of theFieldsOrigin (inherited from TDADataSetOptions)
TField objects byappropriate value when
opening a dataset.
© 2019 Devart

715

Oracle Data Access Components

Used to control how adataset treats data of the
FlatBuffers (inherited from TDADataSetOptions)
ftString and ftVarBytes
fields.
Used to include all set
InsertAllSetFields (inherited from TDADataSetOptions) dataset fields in thegenerated INSERT
statement
Used forTCustomDADataSet to use
LocalMasterDetail (inherited from TDADataSetOptions) local filtering to establish
master/detail relationship for
detail dataset and does notrefer to the server.
Used to represent string
fields with the length that is
LongStrings (inherited from TDADataSetOptions)
greater than 255 as
TStringField.
Allows to use NULL values
in the fields by which therelation is built, when
MasterFieldsNullable (inherited fromgenerating the query for the
TDADataSetOptions)
Detail tables (when thisoption is enabled, theperformance can get worse).
Used to set the MaxValueand MinValue properties of
NumberRange (inherited from TDADataSetOptions)
TIntegerField and
TFloatField to appropriate
values.
Used forTCustomDADataSet toperform additional query to
get the record count for thisQueryRecCount (inherited from TDADataSetOptions)
SELECT, so the
RecordCount property
reflects the actual number ofrecords.
Used forTCustomDADataSet toquote all database object
QuoteNames (inherited from TDADataSetOptions)names in autogenerated
SQL statements such as
update SQL.

© 2019 DevartReference

716

Used for a dataset to locally
RemoveOnRefresh (inherited from TDADataSetOptions) remove a record that can not
be found on the server.
Used forTCustomDADataSet to set
RequiredFields (inherited from TDADataSetOptions)
the Required property of the
TField objects for the NOTNULL fields.
Used to return the new value
ReturnParams (inherited from TDADataSetOptions)of fields to dataset after
insert or update.
Used for a dataset to set the
ReadOnly property to True
SetFieldsReadOnly (inherited fromfor all fields that do not
TDADataSetOptions)belong to UpdatingTable or
can not be updated.
Used forTCustomDADataSet toraise an exception when the
StrictUpdate (inherited from TDADataSetOptions)
number of updated ordeleted records is not equal
1.
Specifies whether to discard
TrimFixedChar (inherited from TDADataSetOptions)
all trailing spaces in thestring fields of a dataset.
Used to include all dataset
fields in the generated
UpdateAllFields (inherited from TDADataSetOptions)
UPDATE and INSERT
statements.
Used to get or set a valuethat enables or disables
UpdateBatchSize (inherited from TDADataSetOptions) batch processing support,
and specifies the number ofcommands that can be
executed in a batch.

Published
Name
AutoClose
CacheLobs© 2019 Devart

Description
Used to close OCI cursor
after fetching all rows.
Used to allocate local
memory buffer to hold acopy of the Lob content.

717

Oracle Data Access Components

Used for TOraDataSet to fill
the DefaultExpression
DefaultValues
property of TField objects byappropriate value.
Used to fetch all Oracle 8
DeferredLobRead
Lob values when they are
explicitly requested.
Used to enable currency
EnableBCD
type. Default value of thisoption is False.
Used to enable using
FMTBCD instead of float for
EnableFMTBCD
large integer numbers tokeep precision.
Used to perform an
additional query to get
ExtendedFieldsInfo
information about returned
fields and the tables they
belong to.
Used to treat all non-BLOB
FieldsAsString
fields as being of string
datatype.
Used to refresh fields of all
FullRefreshtables by the RefreshRecord
method.
Used to display the ROWID
HideRowId (inherited from TOraDataSetOptionsDS)
column.
KeepPrepared (inherited from TOraDataSetOptionsDS) Used to keep TOraDataSet
prepared after closing.
Used to retrieve the LOB
length and the LOB data
PrefetchLobSize
beginning during regularfetch.
Used to get or set the
number of rows that OCI
PrefetchRows
prefetches when executing aquery.
Used to automaticallyPrepareUpdateSQL
prepare update queries
before execution.
Used to specify a notation
method of passing
ProcNamedParams
parameter values to thestored PL/SQL object.

© 2019 DevartReference

718

Used to treat all RAW fields
as being of string datatype.
Used for a dataset
component to refresh its
data when it gets databasechange notification
messages in response to
DML or DDL changes on theobjects associated with thedataset query.
Used for TOraDataSet touse scrollable server cursor(available since Oracle 9only) instead of caching dataon the client side.
Used to get a value
indicating whether Oracle
resources assosiated withthe current statement will becached inside a session.
Temporary LOBs are used
to write input and input/
output LOB parameters into
database when executing
dataset's SQL statements.

RawAsString

ReflectChangeNotify

ScrollableCursor

StatementCache

TemporaryLobUpdate

See Also
TOraDataSetOptions Class
TOraDataSetOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.14.1.8.2.1 AutoClose Property

Used to close OCI cursor after fetching all rows.

Class
TOraDataSetOptions

Syntaxproperty AutoClose: boolean stored True;© 2019 Devart

Provide Feedback

719

Oracle Data Access Components

Remarks
Use the AutoClose property for TOraDataSet to close OCI cursor after fetching all rows.
Allows reducing the number of opened cursors on the server.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.2 CacheLobs Property

Used to allocate local memory buffer to hold a copy of the Lob content.

Class
TOraDataSetOptions

Syntaxproperty CacheLobs: boolean stored True;

Remarks
If True, (the default value) then local memory buffer is allocated to hold a copy of the Lobcontent. If this option is set to False, it is highly recommended to set the DeferredLobRead
option to True. Otherwise, LOB values are fetched to the dataset, and it can result in
performance loss.
Note: The CacheLobs option controls the way Lob objects are handled while an application
fetches records from the database. Setting CacheLobs to False may bring up the following
benefits for time-critical applications: reduced traffic over the network since Lob objects are
only transferred on demand; less memory is needed on the client side because returned
record sets do not hold contents of the Lob fields. Actual value for the Lob field is passed tothe client only when a data-aware control requests it.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.3 DefaultValues Property

Used for TOraDataSet to fill the DefaultExpression property of TField objects by appropriate
value.

Class
TOraDataSetOptions© 2019 DevartReference

720

Syntaxproperty DefaultValues: boolean stored True;

Remarks
If True, TOraDataSet fills the DefaultExpression property of TField objects by appropriate
value.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.4 DeferredLobRead Property

Used to fetch all Oracle 8 Lob values when they are explicitly requested.

Class
TOraDataSetOptions

Syntaxproperty DeferredLobRead: boolean stored True;

Remarks
If True, all Oracle 8 Lob values are only fetched when they are explicitly requested. Otherwise
entire record set with any Lob values is returned when dataset is opened. Whether Lob
values are cached locally to be reused later or not is controlled by CacheLobs option.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.5 EnableBCD Property

Used to enable currency type. Default value of this option is False.

Class
TOraDataSetOptions

Syntaxproperty EnableBCD: boolean;© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

721

Oracle Data Access Components

Reserved.
5.14.1.8.2.6 EnableFMTBCD Property

Used to enable using FMTBCD instead of float for large integer numbers to keep precision.

Class
TOraDataSetOptions

Syntaxproperty EnableFMTBCD: boolean;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.7 ExtendedFieldsInfo Property

Used to perform an additional query to get information about returned fields and the tables
they belong to.

Class
TOraDataSetOptions

Syntaxproperty ExtendedFieldsInfo: boolean;

Remarks
If True, an additional query is performed to get information about returned fields and the tables
they belong to. True by default for TSmartQuery, and False by default for other TOraDataSet
descendants.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.8 FieldsAsString Property

Used to treat all non-BLOB fields as being of string datatype.

Class
TOraDataSetOptions

Syntax© 2019 DevartReference722

property FieldsAsString: boolean stored True;

Remarks
If True, all non-BLOB fields are treated as being of string datatype.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.9 FullRefresh Property

Used to refresh fields of all tables by the RefreshRecord method.

Class
TOraDataSetOptions

Syntaxproperty FullRefresh: boolean;

Remarks
Set the FullRefresh property to True to refresh fields of all tables by the RefreshRecord
method. To perform full refreshing TCustomSmartQuery executes modified SELECT
statement defined by the SQL property. When FullRefresh is False TCustomSmartQuery
performs refreshing fields of the updating table only. The default value is False.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.10 PrefetchLobSize Property

Used to retrieve the LOB length and the LOB data beginning during regular fetch.

Class
TOraDataSetOptions

Syntaxproperty PrefetchLobSize: Integer default 0;

Remarks
Use the PrefetchLobSize option to retrieve the LOB length and the chunk size as well as the
beginning of the LOB data along with the locator during regular fetch. The PrefetchLobSize© 2019 Devart

723

Oracle Data Access Components

property specifies the size of LOB data that will be prefetched. If the total LOB size is less orequals to PrefetchLobSize, then all LOB data will be fetched during regular fetch without
additional round trips that can improve performance greatly.
Note: Prefetching LOB data is available in Oracle 11 and higher.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.11 PrefetchRow s Property

Used to get or set the number of rows that OCI prefetches when executing a query.

Class
TOraDataSetOptions

Syntaxproperty PrefetchRows: integer default 1;

Remarks
Use the PrefetchRows property to get or set the number of rows that OCI prefetches when
executing a query. Setting a value greater than 0 for this option minimizes server round trip
count, what increases performance of the application. By default the value of this options is 1
- OCI always prefetches one extra row.
Note: Some queries (for example, query SELECT * FROM DUAL CONNECT BY LEVEL <=5 returns 1 row when prefetch is enabled, and 5 rows when it is disabled) can return invalid
rows count when prefetch is enabled.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.12 PrepareUpdateSQL Property

Used to automatically prepare update queries before execution.

Class
TOraDataSetOptions

Syntaxproperty PrepareUpdateSQL: boolean;© 2019 DevartReference

724

Remarks
If True, update queries are automatically prepared before executing.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.13 ProcNamedParams Property

Used to specify a notation method of passing parameter values to the stored PL/SQL object.

Class
TOraDataSetOptions

Syntaxproperty ProcNamedParams: boolean default False;

Remarks
Positional Notation is used if OraStoredProc.Options.ProcNamedParams = False (default
value). If True, Named Notation is used.
Named Notation allows passing parameter values in any order regardless of the position.

ExampleSample of stored proc call with Named Notation:
credit_acct(amount => amt, acct_no => acct);© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.14.1.8.2.14 Raw AsString Property

Used to treat all RAW fields as being of string datatype.

Class
TOraDataSetOptions

Syntaxproperty RawAsString: boolean stored True;

Remarks© 2019 Devart

Provide Feedback

725

Oracle Data Access Components

If True, all RAW fields are treated as being of string datatype, i.e. represented as hexadecimalstring.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.15 ReflectChangeNotify Property

Used for a dataset component to refresh its data when it gets database change notification
messages in response to DML or DDL changes on the objects associated with the dataset
query.

Class
TOraDataSetOptions

Syntaxproperty ReflectChangeNotify: boolean default False;

Remarks
If True and the TOraDataSet.ChangeNotification property is set, dataset component refreshes
its data when it gets database change notification messages in response to DML or DDLchanges on the objects associated with the dataset query.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.16 ScrollableCursor Property

Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) insteadof caching data on the client side.

Class
TOraDataSetOptions

Syntaxproperty ScrollableCursor: boolean stored True;

Remarks
If True, TOraDataSet does not cache data on the client side but uses scrollable server cursor(available since Oracle 9 only). This option can be used to reduce memory usage, because© 2019 DevartReference726

dataset stores only current fetched block. Unlike the TCustomDADataSet.UniDirectional
option ScrollableCursor allows bidirectional dataset navigation. Note that scrollable cursor isread-only by its nature.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.17 StatementCache Property

Used to get a value indicating whether Oracle resources assosiated with the current
statement will be cached inside a session.

Class
TOraDataSetOptions

Syntaxproperty StatementCache: boolean default False;

Remarks
OCI statement cache is enabled when you set TOraSessionOptions.StatementCacheSize in
TOraSession.Options to a positive value. Set TOraSessionOptions.StatementCacheSize to 0
(default) or TOraSession.Options.StatemantCache to false if you don't want the statements
to be cached.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.8.2.18 TemporaryLobUpdate Property

Temporary LOBs are used to write input and input/output LOB parameters into databasewhen executing dataset's SQL statements.

Class
TOraDataSetOptions

Syntaxproperty TemporaryLobUpdate: boolean default False;

Remarks
Set the TemporaryLobUpdate property to True to use temporary LOBs to write input and© 2019 Devart

727

Oracle Data Access Components

input/output LOB parameters into database when executing dataset's SQL statements.
Note: CacheLobs option controls the way Lob objects are handled while the application
fetches records from the database. Setting CacheLobs to False may bring up the following
benefits for time-critical applications: reduced traffic over the network since Lob objects are
only transferred on demand; less memory is needed on the client side because returned
record sets do not hold contents of Lob fields. Actual value for the Lob field is passed to theclient only when a data-aware control requests it.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.9 TOraDataSetOptionsDS ClassThis class allows setting up the behaviour of the TOraDaatSet class (this property isobsolete).
For a list of all members of this type, see TOraDataSetOptionsDS members.

Unit
Ora

SyntaxTOraDataSetOptionsDS = class(TDADataSetOptions);

Remarks
Note: The OptionsDS property is obsolete. It is provided for backward compatibility only.

Inheritance Hierarchy
TDADataSetOptions
TOraDataSetOptionsDS© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.9.1 Members

TOraDataSetOptionsDS class overview.

Properties
Name

Description© 2019 DevartReference

728

Used to close OCI cursor
after fetching all rows.
Used to execute automatic
AutoPrepare (inherited from TDADataSetOptions)TCustomDADataSet.Prepar
e on the query execution.
Used to enable caching of
CacheCalcFields (inherited from TDADataSetOptions) the TField.Calculated and
TField.Lookup fields.
Used to allocate local
CacheLobs
memory buffer to hold acopy of the Lob content.
Used to store values of theCompressBlobMode (inherited from
BLOB fields in compressed
TDADataSetOptions)
form.
Used for TOraDataSet to fill
the DefaultExpression
DefaultValues
property of TField objects
with the appropriate value.
Used fetch all Oracle 8 Lob
DeferredLobRead
values only when they are
explicitly requested.
Used to get or set a delay inmilliseconds before
DetailDelay (inherited from TDADataSetOptions)refreshing detail dataset
while navigating masterdataset.
Used to treat all non-BLOB
FieldsAsString
fields as being of string
datatype.
Used forTCustomDADataSet to fill
the Origin property of theFieldsOrigin (inherited from TDADataSetOptions)
TField objects byappropriate value when
opening a dataset.
Used to control how adataset treats data of the
FlatBuffers (inherited from TDADataSetOptions)
ftString and ftVarBytes
fields.
Used to display the ROWID
HideRowId
column.
AutoClose

Used to include all set
InsertAllSetFields (inherited from TDADataSetOptions) dataset fields in thegenerated INSERT© 2019 Devart

729

Oracle Data Access Components

statement
Used to keep TOraDataSet
KeepPreparedprepared after closing.
Used forTCustomDADataSet to use
LocalMasterDetail (inherited from TDADataSetOptions) local filtering to establish
master/detail relationship for
detail dataset and does notrefer to the server.
Used to represent string
fields with the length that is
LongStrings (inherited from TDADataSetOptions)
greater than 255 as
TStringField.
Allows to use NULL values
in the fields by which therelation is built, when
MasterFieldsNullable (inherited fromgenerating the query for the
TDADataSetOptions)
Detail tables (when thisoption is enabled, theperformance can get worse).
Used to set the MaxValueand MinValue properties of
NumberRange (inherited from TDADataSetOptions)
TIntegerField and
TFloatField to appropriate
values.
Used forTCustomDADataSet toperform additional query to
get the record count for thisQueryRecCount (inherited from TDADataSetOptions)
SELECT, so the
RecordCount property
reflects the actual number ofrecords.
Used forTCustomDADataSet toquote all database object
QuoteNames (inherited from TDADataSetOptions)names in autogenerated
SQL statements such as
update SQL.
Used to treat all RAW fields
RawAsString
as being of string datatype.
Used for a dataset to locally
RemoveOnRefresh (inherited from TDADataSetOptions) remove a record that can not
be found on the server.

© 2019 DevartReference

730

Used forTCustomDADataSet to set
RequiredFields (inherited from TDADataSetOptions)
the Required property of the
TField objects for the NOTNULL fields.
Used to return the new value
ReturnParams (inherited from TDADataSetOptions)of fields to dataset after
insert or update.
Used for TOraDataSet touse scrollable server cursor
ScrollableCursor(available since Oracle 9only) instead of caching dataon the client side.
Used for a dataset to set the
ReadOnly property to True
SetFieldsReadOnly (inherited fromfor all fields that do not
TDADataSetOptions)belong to UpdatingTable or
can not be updated.
Used forTCustomDADataSet toraise an exception when the
StrictUpdate (inherited from TDADataSetOptions)
number of updated ordeleted records is not equal
1.
Specifies whether to discard
TrimFixedChar (inherited from TDADataSetOptions)
all trailing spaces in thestring fields of a dataset.
Used to include all dataset
fields in the generated
UpdateAllFields (inherited from TDADataSetOptions)
UPDATE and INSERT
statements.
Used to get or set a valuethat enables or disables
UpdateBatchSize (inherited from TDADataSetOptions) batch processing support,
and specifies the number ofcommands that can be
executed in a batch.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
5.14.1.9.2 Properties

Properties of the TOraDataSetOptionsDS class.
For a complete list of the TOraDataSetOptionsDS class members, see the© 2019 Devart

731

Oracle Data Access Components

TOraDataSetOptionsDS Members topic.

PublicName

Description
Used to execute automatic
AutoPrepare (inherited from TDADataSetOptions)TCustomDADataSet.Prepar
e on the query execution.
Used to enable caching of
CacheCalcFields (inherited from TDADataSetOptions) the TField.Calculated and
TField.Lookup fields.
Used to store values of theCompressBlobMode (inherited from
BLOB fields in compressed
TDADataSetOptions)
form.
Used to get or set a delay inmilliseconds before
DetailDelay (inherited from TDADataSetOptions)refreshing detail dataset
while navigating masterdataset.
Used forTCustomDADataSet to fill
the Origin property of theFieldsOrigin (inherited from TDADataSetOptions)
TField objects byappropriate value when
opening a dataset.
Used to control how adataset treats data of the
FlatBuffers (inherited from TDADataSetOptions)
ftString and ftVarBytes
fields.
Used to include all set
InsertAllSetFields (inherited from TDADataSetOptions) dataset fields in thegenerated INSERT
statement
Used forTCustomDADataSet to use
LocalMasterDetail (inherited from TDADataSetOptions) local filtering to establish
master/detail relationship for
detail dataset and does notrefer to the server.
Used to represent string
fields with the length that is
LongStrings (inherited from TDADataSetOptions)
greater than 255 as
TStringField.
MasterFieldsNullable (inherited from

Allows to use NULL values
in the fields by which the© 2019 DevartReference

732

relation is built, whengenerating the query for the
TDADataSetOptions)
Detail tables (when thisoption is enabled, theperformance can get worse).
Used to set the MaxValueand MinValue properties of
NumberRange (inherited from TDADataSetOptions)
TIntegerField and
TFloatField to appropriate
values.
Used forTCustomDADataSet toperform additional query to
get the record count for thisQueryRecCount (inherited from TDADataSetOptions)
SELECT, so the
RecordCount property
reflects the actual number ofrecords.
Used forTCustomDADataSet toquote all database object
QuoteNames (inherited from TDADataSetOptions)names in autogenerated
SQL statements such as
update SQL.
Used for a dataset to locally
RemoveOnRefresh (inherited from TDADataSetOptions) remove a record that can not
be found on the server.
Used forTCustomDADataSet to set
RequiredFields (inherited from TDADataSetOptions)
the Required property of the
TField objects for the NOTNULL fields.
Used to return the new value
ReturnParams (inherited from TDADataSetOptions)of fields to dataset after
insert or update.
Used for a dataset to set the
ReadOnly property to True
SetFieldsReadOnly (inherited fromfor all fields that do not
TDADataSetOptions)belong to UpdatingTable or
can not be updated.
Used forTCustomDADataSet to
StrictUpdate (inherited from TDADataSetOptions)raise an exception when thenumber of updated ordeleted records is not equal© 2019 Devart

733

Oracle Data Access Components

1.
Specifies whether to discard
TrimFixedChar (inherited from TDADataSetOptions)
all trailing spaces in thestring fields of a dataset.
Used to include all dataset
fields in the generated
UpdateAllFields (inherited from TDADataSetOptions)
UPDATE and INSERT
statements.
Used to get or set a valuethat enables or disables
UpdateBatchSize (inherited from TDADataSetOptions) batch processing support,
and specifies the number ofcommands that can be
executed in a batch.

Published
Name
AutoClose
CacheLobs

DefaultValues

DeferredLobRead

FieldsAsString
HideRowId
KeepPrepared
RawAsString

ScrollableCursor

Description
Used to close OCI cursor
after fetching all rows.
Used to allocate local
memory buffer to hold acopy of the Lob content.
Used for TOraDataSet to fill
the DefaultExpression
property of TField objects
with the appropriate value.
Used fetch all Oracle 8 Lob
values only when they are
explicitly requested.
Used to treat all non-BLOB
fields as being of string
datatype.
Used to display the ROWID
column.
Used to keep TOraDataSet
prepared after closing.
Used to treat all RAW fields
as being of string datatype.
Used for TOraDataSet touse scrollable server cursor(available since Oracle 9only) instead of caching dataon the client side.
© 2019 DevartReference734

See Also
TOraDataSetOptionsDS Class
TOraDataSetOptionsDS Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.9.2.1 AutoClose Property

Used to close OCI cursor after fetching all rows.

Class
TOraDataSetOptionsDS

Syntaxproperty AutoClose: boolean stored False default False;

Remarks
Use the AutoClose property for TOraDataSet to close OCI cursor after fetching all rows.
Allows to reduce the number of opened cursors on the server.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.9.2.2 CacheLobs Property

Used to allocate local memory buffer to hold a copy of the Lob content.

Class
TOraDataSetOptionsDS

Syntaxproperty CacheLobs: boolean stored False default True;

Remarks
If True, (the default value) then local memory buffer is allocated to hold a copy of the Lobcontent. See the notes below for further details.
Note: CacheLobs option controls the way Lob objects are handled while the application
fetches records from the database. Setting CacheLobs to False may bring up the following© 2019 Devart

735

Oracle Data Access Components

benefits for time-critical applications: reduced traffic over the network since Lob objects are
only transferred on demand; less memory is needed on the client side because returned
record sets do not hold contents of Lob fields. Actual value for the Lob field is passed to theclient only when a data-aware control requests it.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.9.2.3 DefaultValues Property

Used for TOraDataSet to fill the DefaultExpression property of TField objects with theappropriate value.

Class
TOraDataSetOptionsDS

Syntaxproperty DefaultValues: boolean stored False;

Remarks
If True, TOraDataSet fills the DefaultExpression property of TField objects with theappropriate value.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.9.2.4 DeferredLobRead Property

Used fetch all Oracle 8 Lob values only when they are explicitly requested.

Class
TOraDataSetOptionsDS

Syntaxproperty DeferredLobRead: boolean stored False default False;

Remarks
If True, all Oracle 8 Lob values are only fetched when they are explicitly requested. Otherwise
entire record set with any Lob values is returned when dataset is opened. Whether Lob
values are cached locally to be reused later or not is controlled by CacheLobs option.

© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

736

Provide Feedback

5.14.1.9.2.5 FieldsAsString Property

Used to treat all non-BLOB fields as being of string datatype.

Class
TOraDataSetOptionsDS

Syntaxproperty FieldsAsString: boolean stored False default False;

Remarks
If True, all non-BLOB fields are treated as being of string datatype.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.9.2.6 HideRow Id Property

Used to display the ROWID column.

Class
TOraDataSetOptionsDS

Syntaxproperty HideRowId: boolean default True;

Remarks
Used to display the RowId service field. By default, the Visible property for this field is set to
False.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.14.1.9.2.7 KeepPrepared Property

Used to keep TOraDataSet prepared after closing.

Class© 2019 Devart

Provide Feedback

737

Oracle Data Access Components

TOraDataSetOptionsDS

Syntaxproperty KeepPrepared: boolean stored False;

Remarks
If True, TOraDataSet remains prepared after closing. It allows to avoid needless reopening
cursor on the server.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.9.2.8 Raw AsString Property

Used to treat all RAW fields as being of string datatype.

Class
TOraDataSetOptionsDS

Syntaxproperty RawAsString: boolean stored False default False;

Remarks
If True, all RAW fields are treated as being of string datatype, i.e. represented as hexadecimalstring.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.9.2.9 ScrollableCursor Property

Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) insteadof caching data on the client side.

Class
TOraDataSetOptionsDS

Syntaxproperty ScrollableCursor: boolean stored False default False;© 2019 DevartReference

738

Remarks
If True, TOraDataSet does not cache data on the client side but uses scrollable server cursor(available since Oracle 9 only). This option can be used to reduce memory usage, because
dataset stores only current fetched block. Unlike the TCustomDADataSet.UniDirectional
option ScrollableCursor allows bidirectional dataset navigation. Note that scrollable cursor isread-only by its nature.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.10 TOraDataSource Class

TOraDataSource provides an interface between an ODAC dataset components and dataaware controls on a form.
For a list of all members of this type, see TOraDataSource members.

Unit
Ora

SyntaxTOraDataSource = class(TCRDataSource);

Remarks
TOraDataSource provides an interface between an ODAC dataset components and dataaware controls on a form.
TOraDataSource inherits its functionality directly from the TDataSource component.
At design-time assign individual data-aware components' DataSource properties from theirdrop-down listboxes.

Inheritance Hierarchy
TCRDataSource
TOraDataSource© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

739

Oracle Data Access Components

5.14.1.10.1 Members

TOraDataSource class overview.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.11 TOraEncryptor Class

The class that performs encrypting and decrypting of data.
For a list of all members of this type, see TOraEncryptor members.

Unit
Ora

SyntaxTOraEncryptor = class(TCREncryptor);

Inheritance Hierarchy
TCREncryptor
TOraEncryptor© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.11.1 Members

TOraEncryptor class overview.

Properties
Name
DataHeader (inherited from TCREncryptor)

EncryptionAlgorithm (inherited from TCREncryptor)
HashAlgorithm (inherited from TCREncryptor)
InvalidHashAction (inherited from TCREncryptor)

Description
Specifies whether the
additional information isstored with the encrypteddata.
Specifies the algorithm ofdata encryption.
Specifies the algorithm ofgenerating hash data.
Specifies the action to
perform on data fetchingwhen hash data is invalid.

© 2019 DevartReference

740

Used to set a password thatis used to generate a key forencryption.

Password (inherited from TCREncryptor)

Methods
Name

Description
Sets a key, using which datais encrypted.

SetKey (inherited from TCREncryptor)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.12 TOraIntervalField ClassA class providing access to the Oracle interval fields.
For a list of all members of this type, see TOraIntervalField members.

Unit
Ora

SyntaxTOraIntervalField = class(TField);

Remarks
TOraIntervalField provides access to the Oracle interval fields. Unlike other TField
descendants the TOraIntervalField.DataType property has two valid values ftIntervalYM and
ftIntervalDS depending on the type of the interval.
You can access actual interval value using properties AsString and AsOraInterval properties.

See Also
TOraInterval© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.14.1.12.1 Members

TOraIntervalField class overview.

Properties© 2019 Devart

DAC Forum

Provide Feedback

741

Oracle Data Access Components

Name

Description
Used to provide access to a
TOraInterval object.
Used to get or set the
number of digits used torepresent fractional seconds
when getting interval value
as string.
Used to get or set the
number of digits that areused to represent theleading interval part when
getting the interval value as
string.

AsInterval

FracPrecision

LeadPrecision© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.12.2 Properties

Properties of the TOraIntervalField class.
For a complete list of the TOraIntervalField class members, see the TOraIntervalField
Members topic.

PublicName
AsInterval

Description
Used to provide access to a
TOraInterval object.

Published
Name
FracPrecision

Description
Used to get or set the
number of digits used torepresent fractional seconds
when getting interval value
as string.

LeadPrecision

Used to get or set the
number of digits that areused to represent theleading interval part when
getting the interval value as© 2019 DevartReference742

string.

See Also
TOraIntervalField ClassTOraIntervalField Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.12.2.1 AsInterval Property

Used to provide access to a TOraInterval object.

Class
TOraIntervalField

Syntaxproperty AsInterval: TOraInterval;

Remarks
Use the AsInterval property to provide access to a TOraInterval object you can use formanipulations with the interval value.

See Also
TOraInterval© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.12.2.2 FracPrecision Property

Used to get or set the number of digits used to represent fractional seconds when gettinginterval value as string.

Class
TOraIntervalField

Syntaxproperty FracPrecision: integer default 6;© 2019 Devart

743

Oracle Data Access Components

Remarks
Use the FracPrecision property to get or set the number of digits used to represent fractional
seconds when getting interval value as string. This property affects only INTERVAL DAY TO
SECOND (ftIntervalDS). The default value of the property is 6.

See Also
TOraInterval.FracPrecision
TOraInterval.AsString© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.12.2.3 LeadPrecision Property

Used to get or set the number of digits that are used to represent the leading interval partwhen getting the interval value as string.

Class
TOraIntervalField

Syntaxproperty LeadPrecision: integer default 2;

Remarks
Use the LeadPrecision property to get or set the number of digits that are used to represent
the leading interval part when getting the interval value as string. The default value of theproperty is 2.

See Also
TOraInterval.LeadPrecision
TOraInterval.AsString© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.13 TOraMetaData Class

A component for obtaining metainformation about database objects from the server.
For a list of all members of this type, see TOraMetaData members.

© 2019 DevartReference

744

Unit
Ora

SyntaxTOraMetaData = class(TDAMetaData);

Remarks
The TOraMetaData component is used to obtain metainformation from the server about
objects in the database, such as tables, table columns, stored procedures, etc.

Inheritance Hierarchy
TMemDataSet
TDAMetaData
TOraMetaData

See Also
TCustomDADataSet.Debug
TCustomDASQL.Debug
DBMonitor© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.13.1 Members

TOraMetaData class overview.

Properties
Name
CachedUpdates (inherited from TMemDataSet)

Connection (inherited from TDAMetaData)

IndexFieldNames (inherited from TMemDataSet)© 2019 Devart

Description
Used to enable or disable
the use of cached updates
for a dataset.
Used to specify aconnection object to use toconnect to a data store.
Used to get or set the list offields on which the recordset
is sorted.

745

Oracle Data Access Components

KeyExclusive (inherited from TMemDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)
MetaDataKind (inherited from TDAMetaData)
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
Restrictions (inherited from TDAMetaData)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

Specifies the upper andlower boundaries for arange.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to specify which kindof metainformation to show.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to provide one or moreconditions restricting the listof objects to be described.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)

CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)

Description
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.

© 2019 DevartReference

CommitUpdates (inherited from TMemDataSet)
DeferredPost (inherited from TMemDataSet)
EditRangeEnd (inherited from TMemDataSet)

EditRangeStart (inherited from TMemDataSet)

GetBlob (inherited from TMemDataSet)

GetMetaDataKinds (inherited from TDAMetaData)

GetRestrictions (inherited from TDAMetaData)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Prepare (inherited from TMemDataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveToXML (inherited from TMemDataSet)© 2019 Devart

746

Clears the cached updates
buffer.
Makes permanent changes
to the database server.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Used to get values
acceptable in the
MetaDataKind property.
Used to find out which
restrictions are applicable toa certain MetaDataKind.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Allocates resources andcreates field components fora dataset.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO

747

Oracle Data Access Components

SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

format.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

EventsName
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Description
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Provide Feedback© 2019 DevartReference748

5.14.1.14 TOraNestedTable Class

A component for controlling nested table data.
For a list of all members of this type, see TOraNestedTable members.

Unit
Ora

SyntaxTOraNestedTable = class(TMemDataSet);

Remarks
Nested table is a dataset component that encapsulates a database table that is nested as afield within another table. Use TOraNestedTable to access data contained in a nested
dataset. A nested table provides much of the functionality of a table component, with thedifference that the data it accesses is stored in a nested table.
TOraNestedTable is derived from the TMemDataSet component.

Inheritance Hierarchy
TMemDataSet
TOraNestedTable

See Also
TOraNestTable
TOraRef© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.14.1 Members

TOraNestedTable class overview.

Properties
Name
CachedUpdates (inherited from TMemDataSet)
IndexFieldNames (inherited from TMemDataSet)© 2019 Devart

Description
Used to enable or disable
the use of cached updates
for a dataset.
Used to get or set the list offields on which the recordset

749

Oracle Data Access Components

KeyExclusive (inherited from TMemDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
Ref
Table
UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

is sorted.
Specifies the upper andlower boundaries for arange.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to assign reference
data to TOraNestedTable.
Used to assign nested tabledata to TOraNestedTable.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)

CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)

Description
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.

© 2019 DevartReference

CommitUpdates (inherited from TMemDataSet)
DeferredPost (inherited from TMemDataSet)
EditRangeEnd (inherited from TMemDataSet)

EditRangeStart (inherited from TMemDataSet)

GetBlob (inherited from TMemDataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Prepare (inherited from TMemDataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveToXML (inherited from TMemDataSet)

SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)© 2019 Devart

750

Clears the cached updates
buffer.
Makes permanent changes
to the database server.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Allocates resources andcreates field components fora dataset.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values

751

Oracle Data Access Components

SetRangeStart (inherited from TMemDataSet)

UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

EventsName
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Description
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Provide Feedback

5.14.1.14.2 Properties

Properties of the TOraNestedTable class.
For a complete list of the TOraNestedTable class members, see the TOraNestedTable
Members topic.

Public© 2019 DevartReference

Name
CachedUpdates (inherited from TMemDataSet)

IndexFieldNames (inherited from TMemDataSet)

KeyExclusive (inherited from TMemDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
Ref
Table
UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

752

Description
Used to enable or disable
the use of cached updates
for a dataset.
Used to get or set the list offields on which the recordset
is sorted.
Specifies the upper andlower boundaries for arange.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to assign reference
data to TOraNestedTable.
Used to assign nested tabledata to TOraNestedTable.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

See Also
TOraNestedTable Class
TOraNestedTable Class Members© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

753

Oracle Data Access Components

5.14.1.14.2.1 Ref Property

Used to assign reference data to TOraNestedTable.

Class
TOraNestedTable

Syntaxproperty Ref: TOraRef;

Remarks
Use the Ref property to assign reference data to TOraNestedTable. After assigning you cancall the Open method to browse the reference data.

See Also
TOraRef
TOraParam.AsRef
TOraDataSet.GetRef© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.14.2.2 Table Property

Used to assign nested table data to TOraNestedTable.

Class
TOraNestedTable

Syntaxproperty Table: TOraNestTable;

Remarks
Use the Table property to assign nested table data to TOraNestedTable. After assigning you
can call the Open method to browse the nested table data.

ExampleOraNestedTable1.Table := OraSQL1.ParamByName('Content').AsTable;
OraNestedTable1.Open;© 2019 DevartReference754

See Also
TOraNestTable
TOraParam.AsTable
TOraDataSet.GetTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.15 TOraNumberField ClassA class providing access to the Oracle number fields.
For a list of all members of this type, see TOraNumberField members.

Unit
Ora

SyntaxTOraNumberField = class(TNumericField);

Remarks
TOraNumberField provides access to Oracle number fields. The TOraNumberField.DataType
property values equals to ftNumber.
You can access actual number value using AsString, AsInteger and AsFloat properties.

See Also
TOraNumber© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.15.1 Members

TOraNumberField class overview.

Properties
Name

Description
Used to provide access to a
TOraNumber object.

AsNumber© 1997-2019© 2019 Devart

Request Support

DAC Forum

Provide Feedback

755

Oracle Data Access Components

Devart. All Rights
Reserved.
5.14.1.15.2 Properties

Properties of the TOraNumberField class.
For a complete list of the TOraNumberField class members, see the TOraNumberField
Members topic.

PublicName

Description
Used to provide access to a
TOraNumber object.

AsNumberSee Also
TOraNumberField Class
TOraNumberField Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.15.2.1 AsNumber Property

Used to provide access to a TOraNumber object.

Class
TOraNumberField

Syntaxproperty AsNumber: TOraNumber;

Remarks
Use the AsNumber property to provide access to a TOraNumber object that you can use formanipulations with the number value.

See Also
TOraNumber© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference756

5.14.1.16 TOraParam ClassA class that is used to set the values of individual parameters passed with queries or stored
procedures.
For a list of all members of this type, see TOraParam members.

Unit
Ora

Syntax
TOraParam = class(TDAParam);

Remarks
Use the properties of TOraParam to set the value of a parameter. Objects that use
parameters create TOraParam objects to represent these parameters. For example,
TOraParam objects are used by TOraSQL, TCustomOraDataSet.
TOraParam shares many properties with TField, as both describe the value of a field in adataset. However, a TField object has several properties to describe the field binding, andhow the field is displayed, edited, or calculated that are not needed in a TOraParam object.
Conversely, TOraParam includes properties that indicate how the field value is passed as aparameter.

Inheritance Hierarchy
TDAParam
TOraParam

See Also
TOraDataSet
TOraSQL
TOraParams© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.14.1.16.1 Members

TOraParam class overview.

Properties© 2019 Devart

DAC Forum

Provide Feedback

757

Oracle Data Access Components

Name
AsArray

AsBFileAsBlob (inherited from TDAParam)

AsBLOBLocator

AsBlobRef (inherited from TDAParam)

AsCLOBLocator

AsCursor

AsFloat (inherited from TDAParam)
AsInteger (inherited from TDAParam)

AsInterval

AsLargeInt (inherited from TDAParam)

AsMemo (inherited from TDAParam)

Description
Used to specify the value ofthe parameter when it
represents the value of the
Oracle array type.
Used to specify the value ofthe parameter when it
represents the value of the
Oracle BFile type.
Used to set and read thevalue of the BLOB
parameter as string.
Used to specify the value ofa parameter when it
represents the value of the
BLOB type.
Used to set and read thevalue of the BLOB
parameter as a TBlob
object.
Used to specify the value ofthe parameter when it
represents the value of
CLOB type.
Used to specify the value ofthe parameter when it
represents the value of the
PL/SQL REF CURSOR
type.
Used to assign the value fora float field to a parameter.
Used to assign the value for
an integer field to theparameter.
Used to specify theparameter value when it
represents Oracle 9 interval
type.
Used to assign the value fora LargeInteger field to theparameter.
Used to assign the value fora memo field to theparameter.
© 2019 DevartReference

AsMemoRef (inherited from TDAParam)

AsNumber

AsObject

AsOraBlob

AsOraClobAsRef

AsSQLTimeStamp (inherited from TDAParam)

AsString (inherited from TDAParam)

AsTableAsTimeStamp
AsWideString (inherited from TDAParam)

AsXML© 2019 Devart

758

Used to set and read thevalue of the memo
parameter as a TBlob
object.
Used to specify the value ofthe parameter when it
represents the value of the
Oracle internal number type.
Used to specify the value ofthe parameter when it
represents the value of the
Oracle object type.
Used to specify the value ofa parameter when it
represents the value of the
BLOB type.
Used to specify the value ofthe parameter when it
represents the value of
CLOB type.
UIsed to specify the value ofthe parameter when it
represents the value of the
Oracle reference type.
Used to specify the value ofthe parameter when it
represents a SQL
timestamp field.
Used to assign the stringvalue to the parameter.
Used to specify the value ofthe parameter when it
represents the value of the
Oracle nested table type.
Used to sspecify parametervalue when it represents
Oracle 9 timestamp type.
Used to assign the Unicode
string value to theparameter.
Used to specify the value ofthe parameter when it
represents the value ofOracle SYS.XMLTYPE.

759

Oracle Data Access Components

DataType (inherited from TDAParam)
IsNull (inherited from TDAParam)

ItemAsDateTime

ItemAsFloat

ItemAsInteger

ItemAsInterval
ItemAsString
ItemAsTimeStamp
ItemIsNull
ItemText
ItemValue
LengthNational
ParamType (inherited from TDAParam)
Size (inherited from TDAParam)
Table
Value (inherited from TDAParam)

Indicates the data type of theparameter.
Used to indicate whether thevalue assigned to aparameter is NULL.
Used to access a PL/SQL
table item as TDateTime byIndex.
Used to access a PL/SQL
table item as Double byIndex.
Used to access a PL/SQL
table item as Integer byIndex.
Used to access a PL/SQL
table item as TOraInterval byIndex.
Used to access a PL/SQL
table item as String by Index.
Used to access a PL/SQL
table item as
TOraTimeStamp by Index.
Used to indicate if an item
value is Null.
Allows to modify data
without changing its type.
Used to access the item
value as variant.
Used to determine themaximum length of a PL/
SQL table parameter.
Used to determine whether
the parameter is in National
charset.
Used to indicate the type ofuse for a parameter.
Specifies the size of a string
type parameter.
Used to determine if theparameter is a PL/SQL
table.
Used to represent the valueof the parameter as Variant.

© 2019 DevartReference

760

Methods
Name
AssignField (inherited from TDAParam)
AssignFieldValue (inherited from TDAParam)
ItemClear
LoadFromFile (inherited from TDAParam)

LoadFromStream (inherited from TDAParam)
SetBlobData© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Description
Assigns field name and fieldvalue to a param.
Assigns the specified field
properties and value to aparameter.
Assigns a NULL value to atable parameter item.
Places the content of a
specified file into a
TDAParam object.
Places the content from astream into a TDAParamobject.
Sets the parameter value
from the memory buffer.
Provide Feedback

5.14.1.16.2 Properties

Properties of the TOraParam class.
For a complete list of the TOraParam class members, see the TOraParam Members topic.

PublicName
AsArray

AsBFileAsBlob (inherited from TDAParam)
AsBLOBLocator© 2019 Devart

Description
Used to specify the value ofthe parameter when it
represents the value of the
Oracle array type.
Used to specify the value ofthe parameter when it
represents the value of the
Oracle BFile type.
Used to set and read thevalue of the BLOB
parameter as string.
Used to specify the value ofa parameter when it

761

Oracle Data Access Components

AsBlobRef (inherited from TDAParam)

AsCLOBLocator

AsCursor

AsFloat (inherited from TDAParam)
AsInteger (inherited from TDAParam)

AsInterval

AsLargeInt (inherited from TDAParam)

AsMemo (inherited from TDAParam)

AsMemoRef (inherited from TDAParam)

AsNumber

AsObject

AsOraBlob

represents the value of the
BLOB type.
Used to set and read thevalue of the BLOB
parameter as a TBlob
object.
Used to specify the value ofthe parameter when it
represents the value of
CLOB type.
Used to specify the value ofthe parameter when it
represents the value of the
PL/SQL REF CURSOR
type.
Used to assign the value fora float field to a parameter.
Used to assign the value for
an integer field to theparameter.
Used to specify theparameter value when it
represents Oracle 9 interval
type.
Used to assign the value fora LargeInteger field to theparameter.
Used to assign the value fora memo field to theparameter.
Used to set and read thevalue of the memo
parameter as a TBlob
object.
Used to specify the value ofthe parameter when it
represents the value of the
Oracle internal number type.
Used to specify the value ofthe parameter when it
represents the value of the
Oracle object type.
Used to specify the value ofa parameter when it© 2019 DevartReference

AsOraClobAsRef

AsSQLTimeStamp (inherited from TDAParam)

AsString (inherited from TDAParam)

AsTableAsTimeStamp
AsWideString (inherited from TDAParam)

AsXML

IsNull (inherited from TDAParam)

ItemAsDateTime

ItemAsFloat

ItemAsInteger
ItemAsInterval© 2019 Devart

762

represents the value of the
BLOB type.
Used to specify the value ofthe parameter when it
represents the value of
CLOB type.
UIsed to specify the value ofthe parameter when it
represents the value of the
Oracle reference type.
Used to specify the value ofthe parameter when it
represents a SQL
timestamp field.
Used to assign the stringvalue to the parameter.
Used to specify the value ofthe parameter when it
represents the value of the
Oracle nested table type.
Used to sspecify parametervalue when it represents
Oracle 9 timestamp type.
Used to assign the Unicode
string value to theparameter.
Used to specify the value ofthe parameter when it
represents the value ofOracle SYS.XMLTYPE.
Used to indicate whether thevalue assigned to aparameter is NULL.
Used to access a PL/SQL
table item as TDateTime byIndex.
Used to access a PL/SQL
table item as Double byIndex.
Used to access a PL/SQL
table item as Integer byIndex.
Used to access a PL/SQL
table item as TOraInterval by763

Oracle Data Access Components

Index.
Used to access a PL/SQL
table item as String by Index.
Used to access a PL/SQL
table item as
TOraTimeStamp by Index.
Used to indicate if an item
value is Null.
Allows to modify data
without changing its type.
Used to access the item
value as variant.

ItemAsString
ItemAsTimeStamp
ItemIsNull
ItemText
ItemValue

Published
Name

Description
Indicates the data type of theparameter.
Used to determine themaximum length of a PL/
SQL table parameter.
Used to determine whether
the parameter is in National
charset.
Used to indicate the type ofuse for a parameter.
Specifies the size of a string
type parameter.
Used to determine if theparameter is a PL/SQL
table.
Used to represent the valueof the parameter as Variant.

DataType (inherited from TDAParam)
LengthNational
ParamType (inherited from TDAParam)
Size (inherited from TDAParam)
Table
Value (inherited from TDAParam)

See Also
TOraParam Class
TOraParam Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference764

5.14.1.16.2.1 AsArray Property

Used to specify the value of the parameter when it represents the value of the Oracle array
type.

Class
TOraParam

Syntaxproperty AsArray: TOraArray;

Remarks
Use the AsArray property to specify the value of the parameter when it represents the value of
the Oracle array type.
Setting AsArray will set the DataType property to ftArray.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.2 AsBFile Property

Used to specify the value of the parameter when it represents the value of the Oracle BFile
type.

Class
TOraParam

Syntaxproperty AsBFile: TOraFile;

Remarks
Use the AsBFile propery to specify the value of the parameter when it represents the value of
the Oracle BFile type.
Setting AsBFile will set the DataType property to ftBFile.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

765

Oracle Data Access Components

5.14.1.16.2.3 AsBLOBLocator Property

Used to specify the value of a parameter when it represents the value of the BLOB type.

Class
TOraParam

Syntaxproperty AsBLOBLocator: TOraLob;

Remarks
Use the AsBLOBLocator property to specify the value of a parameter when it represents thevalue of the BLOB type.
Setting AsBlobLocator will set the DataType property to ftOraBlob.
Note: This property is obsolete, use AsOraBlob instead.

See Also
AsOraBlob© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.4 AsCLOBLocator Property

Used to specify the value of the parameter when it represents the value of CLOB type.

Class
TOraParam

Syntaxproperty AsCLOBLocator: TOraLob;

Remarks
Use the AsCLOBLocator property to specify the value of the parameter when it represents thevalue of CLOB type.
Setting AsClobLocator will set the DataType property to ftOraClob.
Note: This property is obsolete, use AsOraClob instead.

See Also
AsOraClob© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

766

Provide Feedback

5.14.1.16.2.5 AsCursor Property

Used to specify the value of the parameter when it represents the value of the PL/SQL REF
CURSOR type.

Class
TOraParam

Syntaxproperty AsCursor: TOraCursor;

Remarks
Use the AsCursor property to specify the value of the parameter when it represents the valueof the PL/SQL REF CURSOR type.
Setting AsCursor will set the DataType property to ftCursor.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.6 AsInterval Property

Used to specify the parameter value when it represents Oracle 9 interval type.

Class
TOraParam

Syntaxproperty AsInterval: TOraInterval;

Remarks
Use the AsInterval property to specify the parameter value when it represents Oracle 9
interval type.
Setting AsInterval will set the DataType property to ftIntervalYM or ftIntervalDS depending on
the TOraInterval.DescriptorType property value.

See Also© 2019 Devart

767

Oracle Data Access Components

TOraInterval.DescriptorType© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.7 AsNumber Property

Used to specify the value of the parameter when it represents the value of the Oracle internal
number type.

Class
TOraParam

Syntaxproperty AsNumber: TOraNumber;

Remarks
Use the AsNumber property to specify the value of the parameter when it represents the valueof the Oracle internal number type.
Setting AsNumber will set the DataType property to ftNumber.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.8 AsObject Property

Used to specify the value of the parameter when it represents the value of the Oracle object
type.

Class
TOraParam

Syntaxproperty AsObject: TOraObject;

Remarks
Use the AsObject propery to specify the value of the parameter when it represents the valueof the Oracle object type.
Setting AsObject will set the DataType property to ftObject.

© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

768

Devart. All Rights
Reserved.
5.14.1.16.2.9 AsOraBlob Property

Used to specify the value of a parameter when it represents the value of the BLOB type.

Class
TOraParam

Syntaxproperty AsOraBlob: TOraLob;

Remarks
Use the AsOraBlob property to specify the value of the parameter when it represents thevalue of BLOB type.
Setting AsOraBlob will set the DataType property to ftOraBlob.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.10 AsOraClob Property

Used to specify the value of the parameter when it represents the value of CLOB type.

Class
TOraParam

Syntaxproperty AsOraClob: TOraLob;

Remarks
Use the AsOraClob property to specify the value of the parameter when it represents thevalue of the CLOB type.
Setting AsOraClob will set the DataType property to ftOraClob.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

769

Oracle Data Access Components

5.14.1.16.2.11 AsRef Property

UIsed to specify the value of the parameter when it represents the value of the Oracle
reference type.

Class
TOraParam

Syntaxproperty AsRef: TOraRef;

Remarks
Use the AsRef property to specify the value of the parameter when it represents the value of
the Oracle reference type.
Setting AsRef will set the DataType property to ftReference.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.12 AsTable Property

Used to specify the value of the parameter when it represents the value of the Oracle nested
table type.

Class
TOraParam

Syntaxproperty AsTable: TOraNestTable;

Remarks
Use the AsTable property to specify the value of the parameter when it represents the value of
the Oracle nested table type.
Setting AsTable will set the DataType property to ftTable.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

770

5.14.1.16.2.13 AsTimeStamp Property

Used to sspecify parameter value when it represents Oracle 9 timestamp type.

Class
TOraParam

Syntaxproperty AsTimeStamp: TOraTimeStamp;

Remarks
Specifies parameter value when it represents Oracle 9 timestamp type.
Setting AsTimeStamp will set DataType property to ftTimestamp, ftTimestampTZ or
ftTimestampLTZ depending on the TOraTimeStamp.DescriptorType property value.

See Also
TOraTimeStamp.DescriptorType© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.14 AsXML Property

Used to specify the value of the parameter when it represents the value of Oracle
SYS.XMLTYPE.

Class
TOraParam

Syntaxproperty AsXML: TOraXML;

Remarks
Use the AsXML property to specify the value of the parameter when it represents the value ofOracle SYS.XMLTYPE.
Setting AsXML will set the DataType property to ftXML.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

771

Oracle Data Access Components

5.14.1.16.2.15 ItemAsDateTime Property(Indexer)

Used to access a PL/SQL table item as TDateTime by Index.

Class
TOraParam

Syntaxproperty ItemAsDateTime[Index: integer]: TDateTime;Parameters
Index
Holds the index of a PL/SQL table item.

Remarks
Use the ItemAsDateTime property to access a PL/SQL table item by Index. Returns the table
item as a TDateTime value.
Index starts with 1. The index value cannot be greater than the Length value.

See Also
Table© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.16 ItemAsFloat Property(Indexer)

Used to access a PL/SQL table item as Double by Index.

Class
TOraParam

Syntaxproperty ItemAsFloat[Index: integer]: double;
Parameters
Index
Holds the index of a PL/SQL table item.

Remarks
Use the ItemAsFloat property to access a PL/SQL table item by Index. Returns the table item

© 2019 DevartReference772

as a Double value.
Index starts with 1. The index value cannot be greater than the Length value.

See Also
Table© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.17 ItemAsInteger Property(Indexer)

Used to access a PL/SQL table item as Integer by Index.

Class
TOraParam

Syntaxproperty ItemAsInteger[Index: integer]: integer;
Parameters
Index
Holds the index of a PL/SQL table item.

Remarks
Use the ItemAsInteger property to access a PL/SQL table item by Index. Returns the table
item as a Integer value.
Index starts with 1. The index value cannot be greater than the Length value.

See Also
Table© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.14.1.16.2.18 ItemAsInterval Property(Indexer)

Used to access a PL/SQL table item as TOraInterval by Index.

Class
TOraParam© 2019 Devart

Provide Feedback

773

Oracle Data Access Components

Syntaxproperty ItemAsInterval[Index: integer]: TOraInterval;
Parameters
Index
Holds the index of a PL/SQL table item.

Remarks
Use the ItemAsInterval property to access a PL/SQL table item by Index. Returns the table
item as a TOraInterval value.
Index starts with 1. The index value cannot be greater than the Length value.

See Also
Table© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.19 ItemAsString Property(Indexer)

Used to access a PL/SQL table item as String by Index.

Class
TOraParam

Syntaxproperty ItemAsString[Index: integer]: string;Parameters
Index
Holds the index of a PL/SQL table item.

Remarks
Use the ItemAsString property to access a PL/SQL table item by Index. Returns the table item
as a String value.
Index starts with 1. The index value cannot be greater than the Length value.

See Also
Table© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

774

Provide Feedback

5.14.1.16.2.20 ItemAsTimeStamp Property(Indexer)

Used to access a PL/SQL table item as TOraTimeStamp by Index.

Class
TOraParam

Syntaxproperty ItemAsTimeStamp[Index: integer]: TOraTimeStamp;
Parameters
Index
Holds the index of a PL/SQL table item.

Remarks
Use the ItemAsTimeStamp property to access a PL/SQL table item by Index. Returns thetable item as a TOraTimeStamp value.
Index starts with 1. The index value cannot be greater than the Length value.

See Also
Table© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.14.1.16.2.21 ItemIsNull Property(Indexer)

Used to indicate if an item value is Null.

Class
TOraParam

Syntaxproperty ItemIsNull[Index: integer]: boolean;
Parameters
Index
Holds the index of a PL/SQL table item.
© 2019 Devart

Provide Feedback

775

Oracle Data Access Components

Remarks
Use the ItemIsNull property to access PL/SQL table item by Index. Returns True, if the item
value is Null.
Index starts with 1. The index value cannot be greater than Length value.

See Also
Table© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.22 ItemText Property(Indexer)

Allows to modify data without changing its type.

Class
TOraParam

Syntaxproperty ItemText[Index: integer]: string;Parameters
Index
Holds the index of a PL/SQL table item.

Remarks
Use the ItemText property to access PL/SQL table item by Index.
Index starts with 1 and lasts till Length.
Modifying Items using ItemText doesn't affect DataType property.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.23 ItemValue Property(Indexer)

Used to access the item value as variant.

Class
TOraParam

Syntax© 2019 DevartReference776

property ItemValue[Index: integer]: variant;Parameters
Index
Holds the index of a PL/SQL table item.

Remarks
Use the ItemValue property to access PL/SQL table item by Index. Returns the item value.
Index starts with 1. The index value cannot be greater than Length value.

See Also
Table© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.24 Length Property

Used to determine the maximum length of a PL/SQL table parameter.

Class
TOraParam

Syntaxproperty Length: integer default 1;

Remarks
Use the Length property to determine the maximum length of a PL/SQL table parameter. Fora scalar parameter Length is always 1.
Remember that you can use ItemAsInteger, ItemAsString and other similar properties for PL/
SQL tables only.

See Also
Table© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback777

Oracle Data Access Components

5.14.1.16.2.25 National Property

Used to determine whether the parameter is in National charset.

Class
TOraParam

Syntaxproperty National: Boolean default False;

Remarks
Use the National property to determine or set whether a parameter is in National characterset. When National is True, the parameter is in National character set, otherwise theparameter is in default characterset.
The parameter datatype must be one of the following: ftString, ftFixedChar, ftWideString,ftMemo or ftFixedWideChar.
Supported with Oracle 8 and higher, not supported in Direct mode.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.2.26 Table Property

Used to determine if the parameter is a PL/SQL table.

Class
TOraParam

Syntaxproperty Table: boolean default False;

Remarks
Set the Table property to True when parameter is a PL/SQL table. The maximum length of
the table can be set by the Length property. Table may be ftString, ftInteger, ftFloat or ftDate
type only. To access an item of a table use the ItemAsString, ItemAsInteger, ItemAsFloat,
ItemAsDateTime and ItemIsNull properties.

See Also
Length© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

778

Devart. All Rights
Reserved.
5.14.1.16.3 Methods

Methods of the TOraParam class.
For a complete list of the TOraParam class members, see the TOraParam Members topic.

PublicName
AssignField (inherited from TDAParam)
AssignFieldValue (inherited from TDAParam)
ItemClear
LoadFromFile (inherited from TDAParam)

LoadFromStream (inherited from TDAParam)
SetBlobData

Description
Assigns field name and fieldvalue to a param.
Assigns the specified field
properties and value to aparameter.
Assigns a NULL value to atable parameter item.
Places the content of a
specified file into a
TDAParam object.
Places the content from astream into a TDAParamobject.
Sets the parameter value
from the memory buffer.

See Also
TOraParam Class
TOraParam Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.14.1.16.3.1 ItemClear Method

Assigns a NULL value to a table parameter item.

Class
TOraParam

Syntax
procedure ItemClear(Index: integer);© 2019 Devart

Provide Feedback

779

Oracle Data Access Components

Parameters
Index
Holds the item index.

Remarks
Call the ItemClear method to assign a NULL value to a table parameter item.
Index starts with 1 and lasts till Length.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.16.3.2 SetBlobData Method

Sets the parameter value from the memory buffer.

Class
TOraParam

Syntax
procedure SetBlobData(Buffer: IntPtr; Size: integer);
Parameters
BufferHolds the pointer to the data.
Size
Holds the buffer size.

Remarks
Use the SetBlobData method to set the parameter value from the memory buffer. After thisprocedure call DataType property is assigned to ftBlob.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.17 TOraParams Class

Used to control TOraParam objects.
For a list of all members of this type, see TOraParams members.

Unit
Ora
© 2019 DevartReference

780

Syntax
TOraParams = class(TDAParams);

Remarks
Use TOraParams to manage a list of TOraParam objects for an object that uses fieldparameters. For example, TOraStoredProc objects and TOraQuery objects use
TOraParams objects to create and access their parameters.

Inheritance Hierarchy
TDAParams
TOraParams

See Also
TOraParam
TCustomDASQL.Params
TCustomDADataSet.Params
TOraDataSet.Params
TOraSQL.Params© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.17.1 Members

TOraParams class overview.

Properties
Name
Items

Description
Used to iterate through all
field parameters.

Methods
Name
FindParam (inherited from TDAParams)
ParamByName (inherited from TDAParams)© 2019 Devart

Description
Searches for a parameterwith the specified name.
Searches for a parameterwith the specified name.

781

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.17.2 Properties

Properties of the TOraParams class.
For a complete list of the TOraParams class members, see the TOraParams Members
topic.

PublicName

Description
Used to iterate through all
field parameters.

Items

See Also
TOraParams Class
TOraParams Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.17.2.1 Items Property(Indexer)

Used to iterate through all field parameters.

Class
TOraParams

Syntaxproperty Items[Index: integer]: TOraParam; default;
Parameters
Index
Holds the index in the range 0..Count - 1.

Remarks
Use the Items property to iterate through all field parameters. Index identifies the index in therange 0..Count - 1. Items can refer to a particular parameter by its index, but the
TDAParams.ParamByName method is preferred to avoid depending on the order of theparameters.
© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

782

Provide Feedback

5.14.1.18 TOraPoolingOptions ClassThis class allows setting up the behaviour of the connecton pool.
For a list of all members of this type, see TOraPoolingOptions members.

Unit
Ora

Syntax
TOraPoolingOptions = class(TPoolingOptions);

Inheritance Hierarchy
TPoolingOptions
TOraPoolingOptions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.18.1 Members

TOraPoolingOptions class overview.

Properties
Name
ConnectionLifetime (inherited from TPoolingOptions)

MaxPoolSize (inherited from TPoolingOptions)

MinPoolSize (inherited from TPoolingOptions)

PoolType© 2019 Devart

Description
Used to specify the
maximum time during which
an opened connection canbe used by connection pool.
Used to specify the
maximum number ofconnections that can be
opened in connection pool.
Used to specify theminimum number ofconnections that can be
opened in the connection
pool.
Used to specify the pool

783

Oracle Data Access Components

type.
Used to specify a password
for proxy pooling.
Ussed to specify a username for proxy pooling.
Used for a connection to bevalidated when it is returned
from the pool.

ProxyPassword
ProxyUsername
Validate (inherited from TPoolingOptions)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.18.2 Properties

Properties of the TOraPoolingOptions class.
For a complete list of the TOraPoolingOptions class members, see the
TOraPoolingOptions Members topic.

Published
Name
ConnectionLifetime (inherited from TPoolingOptions)

MaxPoolSize (inherited from TPoolingOptions)

MinPoolSize (inherited from TPoolingOptions)

PoolType
ProxyPassword
ProxyUsername
Validate (inherited from TPoolingOptions)

Description
Used to specify the
maximum time during which
an opened connection canbe used by connection pool.
Used to specify the
maximum number ofconnections that can be
opened in connection pool.
Used to specify theminimum number ofconnections that can be
opened in the connection
pool.
Used to specify the pool
type.
Used to specify a password
for proxy pooling.
Ussed to specify a username for proxy pooling.
Used for a connection to bevalidated when it is returned
from the pool.

© 2019 DevartReference

784

See Also
TOraPoolingOptions Class
TOraPoolingOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.18.2.1 PoolType Property

Used to specify the pool type.

Class
TOraPoolingOptions

Syntaxproperty PoolType: TOraPoolingType default optLocal;

Remarks
Use the PoolType property to specify the pool type. Note that you should explicitly include
T:Devart.Odac.Units.OraConnectionPool unit to "uses" list to use the PoolType option at runtime.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.18.2.2 ProxyPassw ord Property

Used to specify a password for proxy pooling.

Class
TOraPoolingOptions

Syntaxproperty ProxyPassword: string;

Remarks
Use the Proxypassword property to specify a password for proxy pooling.

© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

785

Oracle Data Access Components

5.14.1.18.2.3 ProxyUsername Property

Ussed to specify a user name for proxy pooling.

Class
TOraPoolingOptions

Syntaxproperty ProxyUsername: string;

Remarks
Use the ProxyUsername to specify a user name for the proxy pooling. Pool connections are
stored with the same Username/Password properties. When giving connection from the pool,a connection under another user is created, based on one of these connections. Thus,
connections under various users can be get from the pool.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.19 TOraQuery Class

A component for executing queries and operating record sets. It also provides flexible way to
update data.
For a list of all members of this type, see TOraQuery members.

Unit
Ora

SyntaxTOraQuery = class(TCustomOraQuery);Remarks
TOraQuery is a direct descendant of the TOraDataSet component. It publishes most of its
inherited properties and events so that they can be manipulated at design-time.
Use TOraQuery to perform fetching, insertion, deletion and update of record by dynamicallygenerated SQL statements. TOraQuery provides automatic blocking of records, their
checking before edit and refreshing after post. Set SQL, SQLInsert, SQLDelete, SQLRefresh,and SQLUpdate properties to define SQL statements for subsequent accesses to the
database server. There is no restriction to their syntax, so any SQL statement is allowed.
Usually you need to use INSERT, DELETE, and UPDATE statements but you also may use© 2019 DevartReference

786

stored procedures in more diverse cases.
To modify records of TOraQuery SELECT statement in SQL, property should retrieve
ROWID of updating table. To modify records, you can specify KeyFields. If they are notspecified, TOraQuery will retrieve primary keys for UpdatingTable from metadata. TOraQuerycan automatically update only one table. Updating table is defined by the UpdatingTable
property if this property is set. Otherwise, the table a field of which is the first field in the field
list in the SELECT clause is used as an updating table.
The SQLInsert, SQLDelete, SQLUpdate, SQLRefresh properties support automatic binding ofparameters which have identical names to fields captions. To retrieve the value of a field as it
was before the operation use the field name with the 'OLD_' prefix. This is especially usefulwhen doing field comparisons in the WHERE clause of the statement. Use theTCustomDADataSet.BeforeUpdateExecute event to assign the value to additional parameters
and the TCustomDADataSet.AfterUpdateExecute event to read them.
TOraQuery performs read-only access if none of SQLInsert, SQLDelete, SQLUpdate
properties is defined.

Inheritance Hierarchy
TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQuery
TOraQuery

See Also
Updating Data with ODAC Dataset Components
Master/Detail Relationships
TOraStoredProc
TOraTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.19.1 Members

TOraQuery class overview.

Properties
Name© 2019 Devart

Description

787

Oracle Data Access Components

BaseSQL (inherited from TCustomDADataSet)

CachedUpdates (inherited from TMemDataSet)

ChangeNotification (inherited from TOraDataSet)

CheckMode (inherited from TOraDataSet)

CommandTimeout (inherited from TOraDataSet)

Conditions (inherited from TCustomDADataSet)
Connection (inherited from TCustomDADataSet)

Cursor (inherited from TOraDataSet)
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)

DetailFields (inherited from TCustomDADataSet)

Disconnected (inherited from TCustomDADataSet)

DMLRefresh (inherited from TOraDataSet)
Encryption (inherited from TOraDataSet)

Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.
Used to define the checkmode before editing arecord.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption© 2019 DevartReference

FetchAll

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)

IsPLSQL (inherited from TOraDataSet)

IsQuery (inherited from TOraDataSet)

KeyExclusive (inherited from TMemDataSet)

KeyFields (inherited from TOraDataSet)

KeySequence (inherited from TOraDataSet)

LocalConstraints (inherited from TMemDataSet)© 2019 Devart

788

options in a dataset.
Defines whether to request
all records of the query fromdatabase server when thedataset is being opened.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows ornot.
Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.
Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted orposted to a database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of

789

Oracle Data Access Components

LocalUpdate (inherited from TMemDataSet)

LockMode
MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

NonBlocking (inherited from TOraDataSet)

Options (inherited from TOraDataSet)

OptionsDS (inherited from TOraDataSet)

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)
Params (inherited from TOraDataSet)
Prepared (inherited from TMemDataSet)

opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to specify what kind oflock will be performed when
editing a record.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.
Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution or© 2019 DevartReference

Ranged (inherited from TMemDataSet)
ReadOnly (inherited from TCustomDADataSet)
RefreshMode (inherited from TOraDataSet)
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams (inherited from TOraDataSet)

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed (inherited from TOraDataSet)
SequenceMode (inherited from TOraDataSet)

Session (inherited from TOraDataSet)

SmartFetch (inherited from TOraDataSet)

SQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)

SQLInsert (inherited from TCustomDADataSet)

SQLLock (inherited from TCustomDADataSet)© 2019 Devart

790

not.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.
Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert
or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.
Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be
executed.
The SmartFetch mode isused for fast navigation
through a huge amount ofrecords and to minimize
memory consumption.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used

791

Oracle Data Access Components

SQLRecCount (inherited from TCustomDADataSet)

SQLRefresh (inherited from TCustomDADataSet)

SQLType (inherited from TOraDataSet)

SQLUpdate (inherited from TCustomDADataSet)

StrictUpdate (inherited from TOraDataSet)

UniDirectional (inherited from TCustomDADataSet)

UpdateObject (inherited from TOraDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

UpdatingTable

to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of
the SQL statement being
processed by Oracle
database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used for TOraDataSet toraise the 'Update failed'exception when the numberof updated or deleted
records are not equal to 1.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which
provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.
Used to specify which table
in a query is assumed to be
the target for subsequentdata-modification queries asa result of user incentive toinsert, update or delete© 2019 DevartReference

792

records.

Methods
Name

Description
Adds condition to the
WHERE clause of SELECT
AddWhere (inherited from TCustomDADataSet)
statement in the SQL
property.
Applies a range to the
ApplyRange (inherited from TMemDataSet)
dataset.
Overloaded. Writes
ApplyUpdates (inherited from TMemDataSet)
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
BreakExec (inherited from TCustomDADataSet)
statement on the server.
Removes any ranges
CancelRange (inherited from TMemDataSet)
currently in effect for adataset.
Clears all pending cachedupdates from cache andCancelUpdates (inherited from TMemDataSet)
restores dataset in its priorstate.
Clears the cached updates
CommitUpdates (inherited from TMemDataSet)buffer.
Used to obtain a stream forreading data from or writing
CreateBlobStream (inherited from TCustomDADataSet) data to a BLOB field,
specified by the Field
parameter.
Generates the stored
CreateProcCall (inherited from TOraDataSet)
procedure call.
Makes permanent changes
DeferredPost (inherited from TMemDataSet)
to the database server.
Removes WHERE clausefrom the SQL property and
DeleteWhere (inherited from TCustomDADataSet)
assigns the BaseSQL
property.
Enables changing the
EditRangeEnd (inherited from TMemDataSet)
ending value for an existing
range.
Enables changing the
EditRangeStart (inherited from TMemDataSet)
starting value for an existing
range.
© 2019 Devart

793

Oracle Data Access Components

ErrorOffset (inherited from TOraDataSet)
Execute (inherited from TCustomDADataSet)

Executing (inherited from TCustomDADataSet)

Fetching (inherited from TCustomDADataSet)

FetchingAll (inherited from TCustomDADataSet)

FindKey (inherited from TCustomDADataSet)
FindMacro (inherited from TCustomDADataSet)

FindNearest (inherited from TCustomDADataSet)

FindParam (inherited from TOraDataSet)

GetArray (inherited from TOraDataSet)

GetBlob (inherited from TMemDataSet)

GetDataType (inherited from TCustomDADataSet)

GetErrorPos (inherited from TOraDataSet)
GetFieldObject (inherited from TCustomDADataSet)

Returns the parse error
offset.
Overloaded. Executes a
SQL statement on theserver.
Indicates whether SQL
statement is still being
executed.
Used to learn whether
TCustomDADataSet is still
fetching rows.
Used to learn whether
TCustomDADataSet isfetching all rows to the end.
Searches for a record whichcontains specified fieldvalues.
Description is not available
at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset thatmatches or is greater thanthe values specified in the
KeyValues parameter.
Determines whether aparameter with the specified
name exists in a dataset.
Retrieves a TOraArrayobject for a field when only
its name is known.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Returns internal field types
defined in the MemData andaccompanying modules.
Returns a row and column ofparse error for a SQL
statement.
Returns a multireference
shared object from field.
© 2019 DevartReference

794

GetFieldPrecision (inherited from TCustomDADataSet) Retrieves the precision of anumber field.
Retrieves the scale of a
GetFieldScale (inherited from TCustomDADataSet)
number field.
Retrieves a TOraFile object
GetFile (inherited from TOraDataSet)
for a field with known name.
Retrieves a TOraInterval
GetInterval (inherited from TOraDataSet)
object for a field with known
name.
GetKeyFieldNames (inherited from
Provides a list of available
TCustomDADataSet)

key field names.

GetKeyList (inherited from TOraDataSet)

Returns the list of tableprimary key fields.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraObject
object for a field with known
name.
Retrieves an ORDER BY
clause from a SQL
statement.
Retrieves a TOraRef object
for a field with known name.
Retrieve a TOraNestTable
object for a field with known
name.
Retrieves a
TOraTimeStamp object for afield with known name.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.

GetLob (inherited from TOraDataSet)
GetLobLocator (inherited from TOraDataSet)
GetObject (inherited from TOraDataSet)

GetOrderBy (inherited from TCustomDADataSet)
GetRef (inherited from TOraDataSet)
GetTable (inherited from TOraDataSet)

GetTimeStamp (inherited from TOraDataSet)

GotoCurrent (inherited from TCustomDADataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)© 2019 Devart

Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate

795

Oracle Data Access Components

Lock (inherited from TCustomDADataSet)
MacroByName (inherited from TCustomDADataSet)
OpenNext (inherited from TOraDataSet)

ParamByName (inherited from TOraDataSet)

Prepare (inherited from TCustomDADataSet)
RefreshRecord (inherited from TCustomDADataSet)
RestoreSQL (inherited from TCustomDADataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveSQL (inherited from TCustomDADataSet)

SaveToXML (inherited from TMemDataSet)

SetOrderBy (inherited from TCustomDADataSet)
SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Opens next cursor or rowset
in the statement.
Sets or uses parameter
information for a specificparameter based on its
name.
Allocates, opens, andparses cursor for a query.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the range© 2019 DevartReference

SQLSaved (inherited from TCustomDADataSet)
UnLock (inherited from TCustomDADataSet)
UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)796

of rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

EventsName
AfterExecute (inherited from TCustomDADataSet)
AfterFetch (inherited from TCustomDADataSet)
AfterUpdateExecute (inherited fromTCustomDADataSet)
BeforeFetch (inherited from TCustomDADataSet)
BeforeUpdateExecute (inherited fromTCustomDADataSet)
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)© 2019 Devart

Description
Occurs after a component
has executed a query todatabase.
Occurs after dataset finishes
fetching data from server.
Occurs after executing
insert, delete, update, lockand refresh operations.
Occurs before dataset isgoing to fetch block ofrecords from the server.
Occurs before executing
insert, delete, update, lock,and refresh operations.
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can not797

Oracle Data Access Components

handle the updates.
© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.19.2 Properties

Properties of the TOraQuery class.
For a complete list of the TOraQuery class members, see the TOraQuery Members topic.

PublicName
BaseSQL (inherited from TCustomDADataSet)

CachedUpdates (inherited from TMemDataSet)

ChangeNotification (inherited from TOraDataSet)

CheckMode (inherited from TOraDataSet)

CommandTimeout (inherited from TOraDataSet)

Conditions (inherited from TCustomDADataSet)
Connection (inherited from TCustomDADataSet)

Cursor (inherited from TOraDataSet)
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.
Used to define the checkmode before editing arecord.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
© 2019 DevartReference

DetailFields (inherited from TCustomDADataSet)

Disconnected (inherited from TCustomDADataSet)

DMLRefresh (inherited from TOraDataSet)

Encryption (inherited from TOraDataSet)

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)

IsPLSQL (inherited from TOraDataSet)

IsQuery (inherited from TOraDataSet)

KeyExclusive (inherited from TMemDataSet)

KeyFields (inherited from TOraDataSet)© 2019 Devart

798

Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption
options in a dataset.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows ornot.
Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.

799

Oracle Data Access Components

KeySequence (inherited from TOraDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

NonBlocking (inherited from TOraDataSet)

Options (inherited from TOraDataSet)

OptionsDS (inherited from TOraDataSet)

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)

Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted orposted to a database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the© 2019 DevartReference

Params (inherited from TOraDataSet)
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly (inherited from TCustomDADataSet)
RefreshMode (inherited from TOraDataSet)
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams (inherited from TOraDataSet)

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed (inherited from TOraDataSet)
SequenceMode (inherited from TOraDataSet)

Session (inherited from TOraDataSet)

SmartFetch (inherited from TOraDataSet)

SQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)
SQLInsert (inherited from TCustomDADataSet)© 2019 Devart

800

Params property.
Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.
Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert
or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.
Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be
executed.
The SmartFetch mode isused for fast navigation
through a huge amount ofrecords and to minimize
memory consumption.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL

801

Oracle Data Access Components

SQLLock (inherited from TCustomDADataSet)

SQLRecCount (inherited from TCustomDADataSet)

SQLRefresh (inherited from TCustomDADataSet)

SQLType (inherited from TOraDataSet)

SQLUpdate (inherited from TCustomDADataSet)

StrictUpdate (inherited from TOraDataSet)

UniDirectional (inherited from TCustomDADataSet)

UpdateObject (inherited from TOraDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of
the SQL statement being
processed by Oracle
database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used for TOraDataSet toraise the 'Update failed'exception when the numberof updated or deleted
records are not equal to 1.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which
provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

© 2019 DevartReference

802

Published
Name

Description
Defines whether to request
all records of the query fromdatabase server when thedataset is being opened.
Used to specify what kind oflock will be performed when
editing a record.
Used to specify which table
in a query is assumed to be
the target for subsequentdata-modification queries asa result of user incentive toinsert, update or delete
records.

FetchAll

LockModeUpdatingTable

See Also
TOraQuery Class
TOraQuery Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.19.2.1 FetchAll Property

Defines whether to request all records of the query from database server when the dataset isbeing opened.

Class
TOraQuery

Syntaxproperty FetchAll: boolean;

Remarks
When set to True, all records of the query are requested from database server when thedataset is being opened. When set to False, records are retrieved when a data-aware
component or a program requests it. If a query can return a lot of records, set this property to
False if initial response time is important.
© 2019 Devart

803

Oracle Data Access Components

When the FetchAll property is False, the first call to TMemDataSet.Locate and
TMemDataSet.LocateEx methods may take a lot of time to retrieve additional records to theclient side.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.19.2.2 LockMode Property

Used to specify what kind of lock will be performed when editing a record.

Class
TOraQuery

Syntaxproperty LockMode: TLockMode default lmNone;

Remarks
Use the LockMode property to define what kind of lock will be performed when editing arecord. Locking a record is useful in creating multi-user applications. It prevents modificationof a record by several users at the same time.
Locking is performed by the RefreshRecord method.
The default value is lmNone.
To set pessimistic locking use LockMode = lmLockImmediate, TOraDataSet.CheckMode =cmException. To set optimistic locking use LockMode = lmLockDelayed, CheckMode =cmException.

See Also
TOraStoredProc.LockMode
TOraTable.LockMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.19.2.3 UpdatingTable Property

Used to specify which table in a query is assumed to be the target for subsequent datamodification queries as a result of user incentive to insert, update or delete records.

Class
TOraQuery© 2019 DevartReference

804

Syntaxproperty UpdatingTable: string;

Remarks
Use the UpdatingTable property to specify which table in a query is assumed to be the target
for the subsequent data-modification queries as a result of user incentive to insert, update ordelete records.
This property is used on Insert, Update, Delete or RefreshRecord (see also
TOraDataSet.Options) if appropriate SQL (SQLInsert, SQLUpdate or SQLDelete) is notprovided.
If UpdatingTable is not set then the first table used in a query is assumed to be the target.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.20 TOraReferenceField ClassA class representing an Oracle REF field in a dataset.
For a list of all members of this type, see TOraReferenceField members.

Unit
Ora

SyntaxTOraReferenceField = class(TReferenceField);

Remarks
TOraReferenceField represents an Oracle REF field in a dataset.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.20.1 Members

TOraReferenceField class overview.

Properties
Name© 2019 Devart

Description

805

Oracle Data Access Components

Used to indicate whether afield was modified.

Modified© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.20.2 Properties

Properties of the TOraReferenceField class.
For a complete list of the TOraReferenceField class members, see the
TOraReferenceField Members topic.

PublicName

Description
Used to indicate whether afield was modified.

Modified

See Also
TOraReferenceField Class
TOraReferenceField Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.20.2.1 Modified Property

Used to indicate whether a field was modified.

Class
TOraReferenceField

Syntaxproperty Modified: boolean;

Remarks
Use the Modify property to indicate whether a field was modified. The property is writable.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

806

5.14.1.21 TOraSession Class

A component for maintaining connection to an Oracle database.
For a list of all members of this type, see TOraSession members.

Unit
Ora

SyntaxTOraSession = class(TCustomDAConnection);

Remarks
The TOraSession component is used to maintain connection to an Oracle database. Aftersetting the Username, Password and Server properties, you can establish a connection to the
database by calling the Connect method or setting the Connected property to True. There arealso many properties at the session level that affect the default behavior of the queries
executed within this session. Furthermore, you can control transactions using methods fromthis class.
All components that are dedicated to perform data access, such as TOraQuery, TOraSQL,TOraScript, must have their Session property assigned with one of the TOraSession
instances.

Inheritance Hierarchy
TCustomDAConnection
TOraSession

See Also
TOraDataSet.Session
TOraSQL.Session© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.1 Members

TOraSession class overview.

Properties
Name© 2019 Devart

Description

807

Oracle Data Access Components

Used to permit or prevent
permanent updates,
insertions, and deletions of
AutoCommit
data associated with thecurrent transaction against
the database server.
Allows to link a
ConnectDialog (inherited from TCustomDAConnection) TCustomConnectDialog
component.
Used to indicate if theConnected
database connection is
active.
Used to specify the system
ConnectModeprivileges to use when auser connects to the server.
Used to supply a prompt forConnectPrompt
a name and password.
Used to specify theConnectString (inherited from TCustomDAConnection) connection information, suchas: UserName, Password,
Server, etc.
Allows customizing line
ConvertEOL (inherited from TCustomDAConnection) breaks in string fields andparameters.
Used to display SQL
statements being executed
Debugwith their parameter values
and data types.
Used to specify the OracleHomeclient to be used in theapplication.
Used to select the Oracle
HomeNameclient to use with theapplication.
Used to get or set the client
database name that will beInternalName
recorded when performing
global transactions.
InTransaction (inherited from TCustomDAConnection) Indicates whether thetransaction is active.
Used to get an error code
which resulted from previous
LastError
call to the OCI interfacefunction.

© 2019 DevartReference

LDA

LoginPrompt (inherited from TCustomDAConnection)

OCICallStyle
OCISvcCtx

Options
OracleVersion
Password
Pooling (inherited from TCustomDAConnection)
PoolingOptions

ProxySession

SchemaServerSQL

ThreadSafety
Username

Provides a pointer to Oracle
7 login data area of thecurrent connection.
Specifies whether a login
dialog appears immediately
before opening a newconnection.
Indicates the set of OCI
routines used.
Used to return Oracle 8
service context handle of thecurrent connection.
Used to specify the
behaviour of a TOraSession
object.
Used to get Oracle server
version number as string.
Used to specify a password
for a connection.
Enables or disables using
connection pool.
Used to specify the
behaviour of connection
pool.
Used to enable multiple user
sessions within a single
database session.
Used to change the current
schema of the session to thespecified schema.
Contains the server name.
Uses embedded TOraSQL
object to execute any SQL
statement.
Used to allow the usage of
the OCI in multi-threaded
environment.
Contains username.

Methods
Name© 2019 Devart

808

Description

809

Oracle Data Access Components

ApplyUpdates (inherited from TCustomDAConnection) Overloaded. Applies
changes in datasets.
Shares database
AssignConnect
connection between the
TOraSession components.
The method is used toAssignLDA
assign LDA handle.
Overloaded. The method is
AssignSvcCtx
used to assign service
context handle.
Changes the password of an
ChangePassword
account to the new
password.
Commit (inherited from TCustomDAConnection)
Commits current transaction.
Connect (inherited from TCustomDAConnection)
CreateSQL (inherited from TCustomDAConnection)
Disconnect (inherited from TCustomDAConnection)
ExecProc (inherited from TCustomDAConnection)

ExecProcEx (inherited from TCustomDAConnection)
ExecSQL (inherited from TCustomDAConnection)

ExecSQLEx (inherited from TCustomDAConnection)
GetDatabaseNames (inherited fromTCustomDAConnection)
GetKeyFieldNames (inherited fromTCustomDAConnection)

Establishes a connection to
the server.
Creates a component for
queries execution.
Performs disconnect.
Allows to execute stored
procedure or function
providing its name andparameters.
Allows to execute a stored
procedure or function.
Executes a SQL statementwith parameters.
Executes any SQL
statement outside the
TQuery or TSQL
components.
Returns a database list fromthe server.
Provides a list of available
key field names.

GetSequenceNames

Provides the names ofavailable sequences.

GetStoredProcNames (inherited fromTCustomDAConnection)

Returns a list of stored
procedures from the server.

GetTableNames (inherited from

Provides a list of available© 2019 DevartReference

TCustomDAConnection)
MonitorMessage (inherited fromTCustomDAConnection)

ParamByName

Ping (inherited from TCustomDAConnection)
RemoveFromPool (inherited fromTCustomDAConnection)
Rollback (inherited from TCustomDAConnection)
RollbackToSavepoint
Savepoint

StartTransaction

810

tables names.
Sends a specified message
through theTCustomDASQLMonitor
component.
Provides access to OUT
parameters and their values
after processing SQL
statement with ExecSQL or
stored procedure with
ExecProc.
Used to check state ofconnection to the server.
Marks the connection thatshould not be returned to thepool after disconnect.
Discards all current datachanges and ends
transaction.
Cancels all updates for thecurrent transaction.
Defines a point in thetransaction to which you canroll back later.
Overloaded. Begins a newuser transaction against the
database server.

EventsName
OnConnectChange
OnConnectionLost (inherited fromTCustomDAConnection)

Description
Occurs after Connected
property was changed.
This event occurs whenconnection was lost.

OnError (inherited from TCustomDAConnection)

This event occurs when anerror has arisen in theconnection.

OnFailover

Occurs when Transparent
Application Failover (TAF)
seamlessly attempts to
failover to another Oracle© 2019 Devart

811

Oracle Data Access Components

instance.
The event occurs if theserver returned the
OCI_SUCCESS_WITH_INF
O error.

OnInfoMessage© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2 Properties

Properties of the TOraSession class.
For a complete list of the TOraSession class members, see the TOraSession Members
topic.

PublicName

Description
Allows to link a
ConnectDialog (inherited from TCustomDAConnection) TCustomConnectDialog
component.
Used to specify theConnectString (inherited from TCustomDAConnection) connection information, suchas: UserName, Password,
Server, etc.
Allows customizing line
ConvertEOL (inherited from TCustomDAConnection) breaks in string fields andparameters.
Used to get or set the client
database name that will beInternalName
recorded when performing
global transactions.
InTransaction (inherited from TCustomDAConnection) Indicates whether thetransaction is active.
Used to get an error code
which resulted from previous
LastError
call to the OCI interfacefunction.
Provides a pointer to Oracle
LDA
7 login data area of thecurrent connection.
Specifies whether a login
LoginPrompt (inherited from TCustomDAConnection) dialog appears immediately
before opening a new© 2019 DevartReference

OCICallStyle
OCISvcCtx
OracleVersion
Pooling (inherited from TCustomDAConnection)
ProxySession

SQL

812

connection.
Indicates the set of OCI
routines used.
Used to return Oracle 8
service context handle of thecurrent connection.
Used to get Oracle server
version number as string.
Enables or disables using
connection pool.
Used to enable multiple user
sessions within a single
database session.
Uses embedded TOraSQL
object to execute any SQL
statement.

Published
Name

AutoCommit

Connected

ConnectMode
ConnectPrompt

Debug

Home

HomeName© 2019 Devart

Description
Used to permit or prevent
permanent updates,
insertions, and deletions ofdata associated with thecurrent transaction against
the database server.
Used to indicate if thedatabase connection is
active.
Used to specify the system
privileges to use when auser connects to the server.
Used to supply a prompt fora name and password.
Used to display SQL
statements being executedwith their parameter values
and data types.
Used to specify the Oracle
client to be used in theapplication.
Used to select the Oracle
client to use with theapplication.

813

Oracle Data Access Components

Used to specify the
behaviour of a TOraSession
object.
Used to specify a password
for a connection.
Used to specify the
behaviour of connection
pool.
Used to change the current
schema of the session to thespecified schema.
Contains the server name.
Used to allow the usage of
the OCI in multi-threaded
environment.
Contains username.

Options
Password
PoolingOptions

SchemaServerThreadSafety
Username

See Also
TOraSession ClassTOraSession Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.1 AutoCommit Property

Used to permit or prevent permanent updates, insertions, and deletions of data associatedwith the current transaction against the database server.

Class
TOraSession

Syntaxproperty AutoCommit: boolean;

Remarks
Use the AutoCommit property to permit or prevent permanent updates, insertions, anddeletions of data associated with the current transaction against the database server without
explicit calls to the Commit or Rollback methods.
Set AutoCommit to True to permit implicit call to Commit method after every database© 2019 DevartReference

814

access.
AutoCommit property in TOraSession has higher precedence over the same properties indataset components. Its default value is True.
Note: The AutoCommit property in TOraSesion globally specifies whether all queries tomodify a database are implicitly committed or not. Components which descend from theTCustomDADataSet and TCustomDASQL classes inherit their AutoCommit properties. This
allows them to specify their implicit transaction selectively committing the behavior after eachdata modifying access.
This is an example of procedure that removes all records from Dept table and makes thischange permanent.

Exampleprocedure TForm1.DeleteClick(Sender: TObject);
begin
OraSQL.Session := OraSession;
OraSession.AutoCommit := True;
OraSQL.AutoCommit := False;
OraSQL.SQL := 'DELETE FROM Dept';
OraSQL.Execute;// delete all records, commit is not performed
OraSession.Rollback;// restore deleted records
OraSession.AutoCommit := False;
OraSQL.AutoCommit := True;
OraSQL.SQL := 'DELETE FROM Dept';
OraSQL.Execute;// delete all records, commit is not performed
OraSession.Rollback; // restore deleted records
OraSession.AutoCommit := True;
OraSQL.AutoCommit := True;
OraSQL.SQL := 'DELETE FROM Dept';
OraSQL.Execute;// delete all records, commit is performed
OraSession.Rollback; // couldn't restore deleted records
end;

See Also
TCustomDAConnection.Commit© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.14.1.21.2.2 Connected Property

Used to indicate if the database connection is active.

Class
TOraSession

Syntax© 2019 Devart

Provide Feedback

815

Oracle Data Access Components

property Connected stored IsConnectedStored;

Remarks
Use the Connected property to indicate whether the database connection is active. Setting
this property is equivalent to calling the TCustomDAConnection.Connect orTCustomDAConnection.Disconnect methods at runtime.
OnConnectChange event occurs after the Connected property has been changed.

See Also
TCustomDAConnection.Connect
TCustomDAConnection.Disconnect
OnConnectChange© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.3 ConnectMode Property

Used to specify the system privileges to use when a user connects to the server.

Class
TOraSession

Syntaxproperty ConnectMode: TConnectMode default DefValConnectMode;

Remarks
Use the ConnectMode property to specify which system privileges to use when a user
connects to the server.
Note: User must have SYSOPER, SYSDBA or both these roles granted before he connects
to the server and wishes to use either of these roles. ConnectMode is not supported for OCI
7.

See Also
Password
ServerUsername© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

816

Reserved.
5.14.1.21.2.4 ConnectPrompt Property

Used to supply a prompt for a name and password.

Class
TOraSession

Syntaxproperty ConnectPrompt: boolean stored False default True;

Remarks
Set the ConnectPrompt property to True to provide login support when establishing aconnection. When ConnectPrompt is True, a dialog appears to prompt a user for a name anda password.
When ConnectPrompt is False, an application must supply user name and password values
programmatically.
Warning: Storing a hard-coded user name and password entries as property values or incode for an OnLogin event handler can compromise server security.

See Also
Password
ServerUsername
P:Devart.Odac.TOraSession.ConnectString© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.5 Debug Property

Used to display SQL statements being executed with their parameter values and data types.

Class
TOraSession

Syntaxproperty Debug: boolean;© 2019 Devart

817

Oracle Data Access Components

Remarks
Set the Debug property to True to display SQL statements being executed with theirparameter values and data types.
Note: To use this property you should explicitly include OdacVcl (OdacClx under Linux) unit
to your project.
If TOraSQLMonitor is used in the project and the TOraSQLMonitor.Active property is set to
False, the debug window is not displayed.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.6 Home Property

Used to specify the Oracle client to be used in the application.

Class
TOraSession

Syntaxproperty Home: TOracleHome stored False;

Remarks
Set the Home property to select which Oracle client will be used in your application. Use thisproperty in cases when there is a number of Oracle clients on the machine. ODAC searches
all available homes in the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ALL_HOMES
registry folder.

See Also
TCustomDAConnection.Connect
T:Devart.Odac.Units.OraCall
TOracleHome© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.7 HomeName Property

Used to select the Oracle client to use with the application.

Class© 2019 DevartReference

818

TOraSession

Syntaxproperty HomeName: string;

Remarks
Use the HomeName property to select which Oracle client will be used in your application.
Use this property in cases when there is a number of Oracle clients on the machine. ODAC
searches all available homes in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE registry
folder. If HomeName property is set to '', ODAC uses first directory from the list of homes
encountered in environment PATH variable as default Oracle home.

See Also
TCustomDAConnection.Connect
T:Devart.Odac.Units.OraCall© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.8 InternalName Property

Used to get or set the client database name that will be recorded when performing global
transactions.

Class
TOraSession

Syntaxproperty InternalName: string;

Remarks
Use the InternalName property to get or set the client database name that will be recorded
when performing global transactions. While there is no actual global transaction support,setting this property to a non-empty string can give performance gains on SQL statement
execution. But there is one undesirable effect: you cannot commit or rollback transaction from
PL/SQL block. You should call TCustomDAConnection.Commit orTCustomDAConnection.Rollback explicitly.

See Also© 2019 Devart

819

Oracle Data Access Components

TCustomDAConnection.Commit
TCustomDAConnection.Rollback© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.9 LastError Property

Used to get an error code which resulted from previous call to the OCI interface function.

Class
TOraSession

Syntaxproperty LastError: integer;

Remarks
Use the LastError property to get an error code which resulted from previous call to the OCI
interface function.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.10 LDA Property

Provides a pointer to Oracle 7 login data area of the current connection.

Class
TOraSession

Syntaxproperty LDA: PLDA;

Remarks
Call the LDA method to get a pointer to Oracle 7 login data area of the current connection.
LDA structure is relevant mainly to OCI 7 call interface.

See Also
OCISvcCtx
AssignConnect© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

820

Provide Feedback

5.14.1.21.2.11 OCICallStyle Property

Indicates the set of OCI routines used.

Class
TOraSession

Syntaxproperty OCICallStyle: TOCICallStyle;Remarks
Use the OCICallStyle property to check what set of OCI routines is used. Write OCICallStyle
before connection to specify that either OCI 7.3 or OCI 8.0 routines will be used.
TOraSession initializes this property on behalf of the default OCI client found in the system atthe time when OCI library is being loaded.

See Also
Options© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.12 OCISvcCtx Property

Used to return Oracle 8 service context handle of the current connection.

Class
TOraSession

Syntaxproperty OCISvcCtx: TOCISvcCtx;

Remarks
Use the OCISvcCtx property to return Oracle 8 service context handle of the current
connection.

See Also© 2019 Devart

821

Oracle Data Access Components

LDA
AssignConnect© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.13 Options Property

Used to specify the behaviour of a TOraSession object.

Class
TOraSession

Syntaxproperty Options: TOraSessionOptions;Remarks
Set the properties of Options to specify the behaviour of a TOraSession object.
Descriptions of all options are in the table below.

Option Name
CharLength
CharsetClientIdentifier
ConnectionTimeout
ConvertEOL

DateFormat

DateLanguage

DirectDescription
Used to specify the size of a single
character in bytes.
Used to set the character set that ODAC
uses to read and write character data.
Used to determine the client identifier in thesession.
Used to specify the time to wait for aconnection to open before raising an
exception.
Affects the line break behavior in string
fields and parameters.
Used to specify the default date format
used when Oracle makes conversions frominternal date format into string values andvice versa.
Used to specify the default language used
when Oracle parses internal date format
into string values and vice versa.
Used for ODAC to connect directly over
TCP/IP (in Direct mode) and without
requiring Oracle software on the client side.

© 2019 DevartReference

EnableBCD
EnableFMTBCD
EnableIntegers
EnableLargeint
EnableNumbers
EnableOraTimestamp
IPVersion
OptimizerMode
StatementCache
StatementCacheSize
SubscriptionPort
UnicodeEnvironment
UseOCI7
UseUnicode822

Used to enable currency type. Default valueof this option is False.
Used to enable using FMTBCD instead offloat for large integer numbers to keep
precision.
Used for ODAC to map Oracle numberswith precision less than 10 to TIntegerField.
Used for ODAC to map Oracle numberswith precision less than 10 to TIntegerField.
Used for ODAC to map Oracle numberswith precision larger than 15 to
TOraNumberField.
Used to create TOraTimeStampField forcolumns of TIMESTAMP data type.
Used to specify Internet Protocol Version.
Used to get or set the default optimizer
mode for connection.
Used for ODAC to cache statement
handles.
Used to specify the statement handle
cache size.
Sets the client port used to receive
notifications.
Enables or disables using OCI Unicode
Environment.
Used to force TOraSession use OCI 7 callstyle only.
Used to enable or disable Unicode
support.

See Also
Connecting in Direct Mode
Unicode Character Data
TOraNumberField
TOraDataSet.Options
TOraSQL.StatementCache© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

823

Oracle Data Access Components

5.14.1.21.2.14 OracleVersion Property

Used to get Oracle server version number as string.

Class
TOraSession

Syntaxproperty OracleVersion: string;

Remarks
Use the OracleVersion property to get Oracle server version number as string, for a example'7.3.2.3'
Works only when TOraSession instance is connected.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.15 Passw ord Property

Used to specify a password for a connection.

Class
TOraSession

Syntaxproperty Password: string;

Remarks
Use the Password property to specify a password for a connection. TOraSession uses
Password to build connect string in the form Username/Password@Server .
When property is being changed TOraSession calls Disconnect method

See Also
Username
ServerTCustomDAConnection.Connect© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference824

5.14.1.21.2.16 PoolingOptions Property

Used to specify the behaviour of connection pool.

Class
TOraSession

Syntaxproperty PoolingOptions: TOraPoolingOptions;Remarks
Set the properties of PoolingOptions to specify the behaviour of the connection pool.
Descriptions of all options are in the table below.

Option Name
PoolType

Description
Used to specify the pool type.
Used to specify a password for proxy
pooling.
Ussed to specify a user name for proxy
pooling.

ProxyPassword
ProxyUsername

See Also
TCustomDAConnection.Pooling© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.17 ProxySession Property

Used to enable multiple user sessions within a single database session.

Class
TOraSession

Syntaxproperty ProxySession: TOraSession;

Remarks
Applications can have multiple user sessions within a single database session. These"lightweight sessions" allow each user to be authenticated, preserving the identity of the real

© 2019 Devart

825

Oracle Data Access Components

user through the middle tier.
The application server creates a proxy session for itself once it connects to a server. It
authenticates itself to the database in a normal way creating the application server trust zone.
The application server identity is now well known and trusted to the data server. Application
server verifies the identity of a client. After that it can create TOraSession component andestablish session for each client without authentication on Oracle server. That will reducetime for connection.
For each client session you must refer the TOraSession.ProxySession property to proxy
TOraSession object. TOraSession.Password may by empty for client session. To use thisfeature Oracle users must have CONNECT THROUGH privilege.
Note: ProxySession property in TOraSession is supported with OCI connection only when
Options.Direct=False© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.18 Schema Property

Used to change the current schema of the session to the specified schema.

Class
TOraSession

Syntaxproperty Schema: string stored IsSchemaStored;

Remarks
Use the Schema property to change the current schema of the session to the specified
schema. This setting offers a convenient way to perform operations on objects in a schema
other than that of the current user without having to qualify the objects with the schema name.
This setting changes the current schema, but it neither changes the session user or thecurrent user, nor gives you any additional system or object privileges for the session.
If Connected = True read this property to receive the name of the current schema.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

826

5.14.1.21.2.19 Server Property

Contains the server name.

Class
TOraSession

Syntaxproperty Server: string;

Remarks
Use the Server property to supply server name to handle server's request for a login.
Formatting of this property is different and depends on the value of Options.Direct property:
If Options. Direct is set to False, Server assumes TNS alias name for the requested
database or an EZCONNECT connection string.
If Options.Direct is True, Server accepts a string holding three fields separated by a colon. If
Oracle servers has SID is equal to Service Name then string is the following: "Host:Port:SID".
If Oracle Server has SID differ from Service Name then string is the following:"Host:Port:sid=SID" for connection using SID and "Host:Port:sn=Service Name" forconnection using Service Name. Here Host is an IP address of the server that hosts the
database, Port is a port number that server listens, SID is a system identifier that specifies an
Oracle database instance name, and Service Name is a system alias to an Oracle databaseinstance (or many instances).
Note: EZCONNECT connection string format is supported in Direct Mode as well.
Note: If prefixes sid= or sn= aren't set, then connection will be established using SID.

See Also
Username
Password
TCustomDAConnection.Connect
HomeName
Connecting in Direct Mode

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

827

Oracle Data Access Components

5.14.1.21.2.20 SQL Property

Uses embedded TOraSQL object to execute any SQL statement.

Class
TOraSession

Syntaxproperty SQL: TOraSQL;

Remarks
You can use embedded TOraSQL object to execute any SQL statement.

See Also
TOraSQL
TCustomDAConnection.ExecSQLExParamByName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.2.21 ThreadSafety Property

Used to allow the usage of the OCI in multi-threaded environment.

Class
TOraSession

Syntaxproperty ThreadSafety: boolean default True;

Remarks
Use the ThreadSafety property to enable the usage of the OCI in multi-threaded environment.
The ThreadSafety property must be True before any non-blocking fetch of rows or SQL
statement execution takes place.

See Also
TOraDataSet.NonBlocking
TOraSQL.NonBlocking© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

828

Provide Feedback

5.14.1.21.2.22 Username Property

Contains username.

Class
TOraSession

Syntaxproperty Username: string;

Remarks
Use the Username property to supply user name to handle server's request for a login.
TOraSession uses the Username, Password and Server properties to build connect string in
the format Username/Password@Server .
When property is being changed TOraSession calls Disconnect method

See Also
Password
ServerTCustomDAConnection.Connect© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.3 Methods

Methods of the TOraSession class.
For a complete list of the TOraSession class members, see the TOraSession Members
topic.

PublicName

Description
ApplyUpdates (inherited from TCustomDAConnection) Overloaded. Applies
changes in datasets.
Shares database
AssignConnect
connection between the
TOraSession components.
© 2019 Devart

829

Oracle Data Access Components

AssignLDA
AssignSvcCtx

ChangePassword
Commit (inherited from TCustomDAConnection)
Connect (inherited from TCustomDAConnection)
CreateSQL (inherited from TCustomDAConnection)
Disconnect (inherited from TCustomDAConnection)
ExecProc (inherited from TCustomDAConnection)

ExecProcEx (inherited from TCustomDAConnection)
ExecSQL (inherited from TCustomDAConnection)

ExecSQLEx (inherited from TCustomDAConnection)
GetDatabaseNames (inherited fromTCustomDAConnection)
GetKeyFieldNames (inherited fromTCustomDAConnection)

The method is used toassign LDA handle.
Overloaded. The method isused to assign service
context handle.
Changes the password of an
account to the new
password.
Commits current transaction.
Establishes a connection to
the server.
Creates a component for
queries execution.
Performs disconnect.
Allows to execute stored
procedure or function
providing its name andparameters.
Allows to execute a stored
procedure or function.
Executes a SQL statementwith parameters.
Executes any SQL
statement outside the
TQuery or TSQL
components.
Returns a database list fromthe server.
Provides a list of available
key field names.

GetSequenceNames

Provides the names ofavailable sequences.

GetStoredProcNames (inherited fromReturns a list of stored
procedures from the server.

TCustomDAConnection)
GetTableNames (inherited fromTCustomDAConnection)
MonitorMessage (inherited fromTCustomDAConnection)

Provides a list of available
tables names.
Sends a specified message
through theTCustomDASQLMonitor
component.
© 2019 DevartReference

ParamByName

Ping (inherited from TCustomDAConnection)
RemoveFromPool (inherited fromTCustomDAConnection)
Rollback (inherited from TCustomDAConnection)
RollbackToSavepoint
Savepoint

StartTransaction

830

Provides access to OUT
parameters and their values
after processing SQL
statement with ExecSQL or
stored procedure with
ExecProc.
Used to check state ofconnection to the server.
Marks the connection thatshould not be returned to thepool after disconnect.
Discards all current datachanges and ends
transaction.
Cancels all updates for thecurrent transaction.
Defines a point in thetransaction to which you canroll back later.
Overloaded. Begins a newuser transaction against the
database server.

See Also
TOraSession ClassTOraSession Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.3.1 AssignConnect Method

Shares database connection between the TOraSession components.

Class
TOraSession

Syntax
procedure AssignConnect(Source: TOraSession); overload;
Parameters
SourcePoints to a preconnected session and sets Connected property to True for this instance of© 2019 Devart

831

Oracle Data Access Components

TOraSession.

Remarks
Use the AssignConnect method to share database connection between the TOraSession
components.
AssignConnect assumes that the Source parameter points to a preconnected session andsets Connected property to True for this instance of TOraSession. Note that AssignConnect
doesn't make any references to the Source session. So before disconnecting parent session
call AssignConnect(Nil) or Disconnect method for all assigned sessions.

ExampleOraSession1.Connect;
OraSession2.AssignConnect(OraSession1);// OraSession2.Connected is True
OraSQL.Session := OraSession2;
OraSQL.Execute;
OraSession2.AssignConnect(nil);// OraSession2.Connected is False
OraSession1.Disconnect;

See Also
LDA
OCISvcCtx
TCustomDAConnection.Connect© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.14.1.21.3.2 AssignLDA Method

The method is used to assign LDA handle.

Class
TOraSession

Syntax
procedure AssignLDA(LDA: pLDA);
Parameters
LDA
Specifies the LDA handle.

© 1997-2019

Request Support© 2019 DevartReference

832

Devart. All Rights
Reserved.
5.14.1.21.3.3 AssignSvcCtx Method

The method is used to assign service context handle.

Class
TOraSession

Overload List
Name
AssignSvcCtx(hOCISvcCtx: pOCISvcCtx)
AssignSvcCtx(hOCISvcCtx: pOCISvcCtx;
hOCIEnv: pOCIEnv)© 1997-2019
Request Support
Devart. All Rights
Reserved.

Description
The method is used to assign service
context handle.
The method is used to assign service
context handle.
DAC Forum

Provide Feedback

The method is used to assign service context handle.

Class
TOraSession

Syntax
procedure AssignSvcCtx(hOCISvcCtx: pOCISvcCtx); overload;
deprecated;
Parameters
hOCISvcCtx
Specifies the service context handle.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

The method is used to assign service context handle.

Class
TOraSession© 2019 Devart

Provide Feedback

833

Oracle Data Access Components

Syntax
procedure AssignSvcCtx(hOCISvcCtx: pOCISvcCtx; hOCIEnv: pOCIEnv);
overload;
Parameters
hOCISvcCtx
Specifies the service context handle.
hOCIEnv
Specifies the environment handle.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.3.4 ChangePassw ord Method

Changes the password of an account to the new password.

Class
TOraSession

Syntax
procedure ChangePassword(NewPassword: string);
Parameters
NewPassword
Takes the new password.

Remarks
Call the ChangePassword method to replace the current password of an account with thenew password.
The previous values must be provided for the Password and UserName properties before
calling ChangePassword.
The ChangePassword method is used mainly when logging in to the user account fails due toan expired password or any other reason accompanied by an exception with ORA-2800
Oracle error code family (see Oracle Error Messages).

See Also
Username
Password© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

834

Devart. All Rights
Reserved.
5.14.1.21.3.5 GetSequenceNames Method

Provides the names of available sequences.

Class
TOraSession

Syntax
procedure GetSequenceNames(List: TStrings; AllSequences: boolean =False);
Parameters
List
Holds the list of available sequences names.
AllSequences
If True, method returns sequences from all schemas.

Remarks
Call the GetSequenceNames method to get the names of available sequences.

See Also
TCustomDAConnection.GetTableNames
TCustomDAConnection.GetStoredProcNames© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.3.6 ParamByName Method

Provides access to OUT parameters and their values after processing SQL statement with
ExecSQL or stored procedure with ExecProc.

Class
TOraSession

Syntaxfunction ParamByName(Name: string): TOraParam;
Parameters© 2019 Devart

835

Oracle Data Access Components

Name
Holds the parameter name.
Return Valuea TOraParam object.

Remarks
Use the ParamByName method to get access to OUT parameters and their values after
processing SQL statement with ExecSQL or stored procedure with ExecProc. Name shouldbe equal to the parameter name as it occurred in SQL statement.
Implicitely calls ParamByName function of TOraSQL.

See Also
SQL
TCustomDAConnection.ExecSQL
TCustomDAConnection.ExecSQLEx© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.3.7 RollbackToSavepoint Method

Cancels all updates for the current transaction.

Class
TOraSession

Syntax
procedure RollbackToSavepoint(const Name: string);
Parameters
Name

Remarks
Call the RollbackToSavepoint method to cancel all updates for the current transaction andrestore its state up to the moment of the last defined savepoint.

See Also
Savepoint
TCustomDAConnection.Rollback© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

836

Devart. All Rights
Reserved.
5.14.1.21.3.8 Savepoint Method

Defines a point in the transaction to which you can roll back later.

Class
TOraSession

Syntax
procedure Savepoint(const Name: string);
Parameters
Name

Remarks
Call the Savepoint method to define a point in the transaction to which you can roll back later.
As the parameter, you can pass any valid name to identify the savepoint.
To roll back to the last savepoint call RollbackToSavepoint.

See Also
RollbackToSavepoint© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.3.9 StartTransaction Method

Begins a new user transaction against the database server.

Class
TOraSession

Overload List
Name
StartTransaction
StartTransaction(IsolationLevel:
TOraIsolationLevel; const
RollbackSegment: string; const Name:© 2019 Devart

Description
Begins a new user transaction against the
database server.
Begins a new user transaction against the
database server.

837

Oracle Data Access Components

string)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Begins a new user transaction against the database server.

Class
TOraSession

Syntax
procedure StartTransaction; overload; override;

Remarks
StartTransaction is an overload method for TCustomDAConnection.StartTransaction. Call theStartTransaction method to begin a new user transaction against the database server. Before
calling StartTransaction, an application should check the status of the InTransaction property.
If InTransaction is True, it indicates that a transaction is already in progress, a subsequent
call to StartTransaction without first calling TCustomDAConnection.Commit orTCustomDAConnection.Rollback to end the current transaction raises EDatabaseError.
Calling StartTransaction when connection is closed also raises EDatabaseError.
Updates, insertions, and deletions that take place after a call to StartTransaction are held by
the server until an application calls Commit to save the changes or Rollback to cancel them.

See Also
TCustomDAConnection.Commit
TCustomDAConnection.Rollback
TCustomDAConnection.InTransaction
TCustomDAConnection.StartTransaction© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Begins a new user transaction against the database server.

Class
TOraSession© 2019 DevartReference

838

Syntax
procedure StartTransaction(IsolationLevel: TOraIsolationLevel;
const RollbackSegment: string = ''; const Name: string = '');
reintroduce; overload;
Parameters
IsolationLevel
Specifies how the transactions containing database modifications are handled.
RollbackSegment
Holds the rollback segment to assign the current transaction to.
Name
Holds the current transaction name.

Remarks
Specify the RollbackSegment parameter to assign the current transaction to the specified
rollback segment. This clause also implicitly establishes the transaction as a read/write
transaction.
The Name parameter is useful in distributed database environments when you must identify
and resolve in-doubt transactions. The text string is limited to 255 bytes.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.4 Events

Events of the TOraSession class.
For a complete list of the TOraSession class members, see the TOraSession Members
topic.

PublicName
OnConnectionLost (inherited fromTCustomDAConnection)
OnError (inherited from TCustomDAConnection)

Published© 2019 Devart

Description
This event occurs whenconnection was lost.
This event occurs when anerror has arisen in theconnection.

839

Oracle Data Access Components

Name

Description
Occurs after Connected
property was changed.
Occurs when Transparent
Application Failover (TAF)
seamlessly attempts to
failover to another Oracle
instance.
The event occurs if theserver returned the
OCI_SUCCESS_WITH_INF
O error.

OnConnectChange

OnFailover

OnInfoMessage

See Also
TOraSession ClassTOraSession Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.4.1 OnConnectChange Event

Occurs after Connected property was changed.

Class
TOraSession

Syntaxproperty OnConnectChange: TConnectChangeEvent;Remarks
Occurs after the Connected property was changed. Connected parameter indicates whether
the connection is active or not.
Note: This event is obsolete. Use AfterConnect and AfterDisconnect event handlers instead.

See Also
TCustomDAConnection.Connect
TCustomDAConnection.Disconnect© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

840

Reserved.
5.14.1.21.4.2 OnFailover Event

Occurs when Transparent Application Failover (TAF) seamlessly attempts to failover toanother Oracle instance.

Class
TOraSession

Syntaxproperty OnFailover: TFailoverEvent;Remarks
Occurs when Transparent Application Failover (TAF) seamlessly attempts to failover toanother Oracle instance.
FailoverType parameter specifies the type of failover. This allows the event to know what typeof failover the client has requested.

See Also
Transparent Application Failover Support© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.21.4.3 OnInfoMessage Event

The event occurs if the server returned the OCI_SUCCESS_WITH_INFO error.

Class
TOraSession

Syntaxproperty OnInfoMessage: TInfoMessageEvent;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22 TOraSessionOptions ClassThis class allows setting up the behaviour of the TOraSession class.
For a list of all members of this type, see TOraSessionOptions members.
© 2019 Devart

841

Oracle Data Access Components

Unit
Ora

SyntaxTOraSessionOptions = class(TDAConnectionOptions);

Inheritance Hierarchy
TDAConnectionOptions
TOraSessionOptions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.1 Members

TOraSessionOptions class overview.

Properties
Name
AllowImplicitConnect (inherited from
TDAConnectionOptions)
CharLength
CharsetClientIdentifier
ConnectionTimeout

ConvertEOL

DateFormat

Description
Specifies whether to allow or
not implicit connection
opening.
Used to specify the size of asingle character in bytes.
Used to set the character set
that ODAC uses to read andwrite character data.
Used to determine the client
identifier in the session.
Used to specify the time towait for a connection to open
before raising an exception.
Affects the line break
behavior in string fields andparameters.
Used to specify the default
date format used when
Oracle makes conversions
from internal date format into
string values and vice versa.

© 2019 DevartReference

DateLanguage

DefaultSortType (inherited from
TDAConnectionOptions)

DirectDisconnectedMode (inherited from
TDAConnectionOptions)

EnableBCD

EnableFMTBCD

EnableIntegers

EnableLargeint

EnableNumbers

EnableOraTimestamp© 2019 Devart

842

Used to specify the default
language used when Oracleparses internal date format
into string values and viceversa.
Used to determine thedefault type of local sortingfor string fields. It is used
when a sort type is not
specified explicitly after thefield name in the
TMemDataSet.IndexFieldNa
mes property of a dataset.
Used for ODAC to connect
directly over TCP/IP (inDirect mode) and without
requiring Oracle software on
the client side.
Used to open a connection
only when needed for
performing a server call andcloses after performing theoperation.
Used to enable currency
type. Default value of thisoption is False.
Used to enable using
FMTBCD instead of float forlarge integer numbers tokeep precision.
Used for ODAC to map
Oracle numbers with
precision less than 10 to
TIntegerField.
Used for ODAC to map
Oracle numbers with
precision less than 10 to
TIntegerField.
Used for ODAC to map
Oracle numbers with
precision larger than 15 to
TOraNumberField.
Used to create
TOraTimeStampField forcolumns of TIMESTAMP

843

Oracle Data Access Components

data type.
Used to specify Internet
IPVersion
Protocol Version.
Used to prevent an
KeepDesignConnected (inherited fromapplication from establishing
TDAConnectionOptions)a connection at the time ofstartup.
If True, theTCustomDAConnection.On
LocalFailover (inherited from TDAConnectionOptions) ConnectionLost event
occurs and a failover
operation can be performed
after connection breaks.
Used to get or set the default
OptimizerMode
optimizer mode forconnection.
Used for ODAC to cacheStatementCache
statement handles.
Used to specify theStatementCacheSize
statement handle cache
size.
Sets the client port used to
SubscriptionPort
receive notifications.
Enables or disables using
UnicodeEnvironment
OCI Unicode Environment.
Used to force TOraSession
UseOCI7
use OCI 7 call style only.
Used to enable or disable
UseUnicode
Unicode support.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
5.14.1.22.2 Properties

Properties of the TOraSessionOptions class.
For a complete list of the TOraSessionOptions class members, see the
TOraSessionOptions Members topic.

PublicName
DefaultSortType (inherited from

Description
Used to determine thedefault type of local sorting© 2019 DevartReference844

for string fields. It is used
when a sort type is not
specified explicitly after the
TDAConnectionOptions)field name in the
TMemDataSet.IndexFieldNa
mes property of a dataset.
Used to open a connection
only when needed for
DisconnectedMode (inherited fromperforming a server call and
TDAConnectionOptions)closes after performing theoperation.
Used to prevent an
KeepDesignConnected (inherited fromapplication from establishing
TDAConnectionOptions)a connection at the time ofstartup.
If True, theTCustomDAConnection.On
LocalFailover (inherited from TDAConnectionOptions) ConnectionLost event
occurs and a failover
operation can be performed
after connection breaks.

Published
Name
AllowImplicitConnect (inherited from
TDAConnectionOptions)
CharLength
CharsetClientIdentifier
ConnectionTimeout

ConvertEOL

DateFormat© 2019 Devart

Description
Specifies whether to allow or
not implicit connection
opening.
Used to specify the size of asingle character in bytes.
Used to set the character set
that ODAC uses to read andwrite character data.
Used to determine the client
identifier in the session.
Used to specify the time towait for a connection to open
before raising an exception.
Affects the line break
behavior in string fields andparameters.
Used to specify the default
date format used when
Oracle makes conversions

845

Oracle Data Access Components

DateLanguage

DirectEnableBCD

EnableFMTBCD

EnableIntegers

EnableLargeint

EnableNumbers

EnableOraTimestamp

IPVersion
OptimizerMode
StatementCache
StatementCacheSize

from internal date format into
string values and vice versa.
Used to specify the default
language used when Oracleparses internal date format
into string values and viceversa.
Used for ODAC to connect
directly over TCP/IP (inDirect mode) and without
requiring Oracle software on
the client side.
Used to enable currency
type. Default value of thisoption is False.
Used to enable using
FMTBCD instead of float forlarge integer numbers tokeep precision.
Used for ODAC to map
Oracle numbers with
precision less than 10 to
TIntegerField.
Used for ODAC to map
Oracle numbers with
precision less than 10 to
TIntegerField.
Used for ODAC to map
Oracle numbers with
precision larger than 15 to
TOraNumberField.
Used to create
TOraTimeStampField forcolumns of TIMESTAMP
data type.
Used to specify Internet
Protocol Version.
Used to get or set the default
optimizer mode forconnection.
Used for ODAC to cachestatement handles.
Used to specify thestatement handle cache© 2019 DevartReference

846

size.
Sets the client port used toreceive notifications.
Enables or disables using
OCI Unicode Environment.
Used to force TOraSession
use OCI 7 call style only.
Used to enable or disable
Unicode support.

SubscriptionPort
UnicodeEnvironment
UseOCI7
UseUnicode

See Also
TOraSessionOptions ClassTOraSessionOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.1 CharLength Property

Used to specify the size of a single character in bytes.

Class
TOraSessionOptions

Syntaxproperty CharLength: TCharLength default 0;

Remarks
Use the CharLength property to specify the size of a single character in bytes. Set this option
with the number in range [0..6] to reflect Oracle support for the national languages. Setting
CharLength to zero will instruct TOraSession to interrogate Oracle server for the actual
character length. The default value is 1.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.2 Charset Property

Used to set the character set that ODAC uses to read and write character data.

Class© 2019 Devart

847

Oracle Data Access Components

TOraSessionOptions

Syntaxproperty Charset: string;

Remarks
Use the Charset property to set the character set that ODAC uses to read and write
character data. Supported with Oracle 8 client only.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.3 ClientIdentifier Property

Used to determine the client identifier in the session.

Class
TOraSessionOptions

Syntaxproperty ClientIdentifier: string;

Remarks
Use the ClientIdentifier property to determine the client identifier in the session. The client
identifier can be set in the session handle at any time during the session. Then, on the next
request to the server, the information is propagated and stored in the server session. The firstcharacter of the ClientIdentifier should not be ':', because an exception will be raised. This
property has no effect if you use the version server lower than Oracle 9.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.4 ConnectionTimeout Property

Used to specify the time to wait for a connection to open before raising an exception.

Class
TOraSessionOptions

Syntax© 2019 DevartReference848

property ConnectionTimeout: integer default
DefValOraConnectionTimeout;

Remarks
Use the ConnectionTimeout property to specify the time to wait for a connection to open
before raising an exception. Works only when Direct mode is set to True.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.5 ConvertEOL Property

Affects the line break behavior in string fields and parameters.

Class
TOraSessionOptions

Syntaxproperty ConvertEOL: boolean default False;

Remarks
Affects the line break behavior in string fields and parameters. When fetching strings(including CLOBs and LONGs) with ConvertEOL = True dataset converts their line breaks
from LF to CRLF form. And when posting strings to server with ConvertEOL turned on theirline breaks converted from CRLF to LF form. By default, strings are not converted.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.6 DateFormat Property

Used to specify the default date format used when Oracle makes conversions from internal
date format into string values and vice versa.

Class
TOraSessionOptions

Syntaxproperty DateFormat: string stored FIsDateFormatStored;© 2019 Devart

849

Oracle Data Access Components

Remarks
Use the DateFormat property to specify the default date format used when Oracle makes
conversions from internal date format into string values and vice versa. An example of valid
expression for this property could be "MM/DD/YYYY".

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.7 DateLanguage Property

Used to specify the default language used when Oracle parses internal date format into stringvalues and vice versa.

Class
TOraSessionOptions

Syntaxproperty DateLanguage: string stored FIsDateLanguageStored;

Remarks
Use the DateLanguage property to specify the default language used when Oracle parses
internal date format into string values and vice versa. Examples of valid expressions for thisproperty could be "French", "German" etc.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.8 Direct Property

Used for ODAC to connect directly over TCP/IP (in Direct mode) and without requiring Oracle
software on the client side.

Class
TOraSessionOptions

Syntaxproperty Direct: boolean default DefValDirect;

Remarks© 2019 DevartReference

850

If the Direct property is set to True, ODAC connects directly over TCP/IP (in Direct mode) anddoes not require Oracle software on the client side. Otherwise, ODAC connects in Client
mode. Supported by ODAC Professional and Professional with source code editions.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.9 EnableBCD Property

Used to enable currency type. Default value of this option is False.

Class
TOraSessionOptions

Syntaxproperty EnableBCD: boolean;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.10 EnableFMTBCD Property

Used to enable using FMTBCD instead of float for large integer numbers to keep precision.

Class
TOraSessionOptions

Syntaxproperty EnableFMTBCD: boolean;

Remarks
Use the EnableFMTBCD property to enable using FMTBCD instead of float for large integer
numbers to keep precision.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.11 EnableIntegers Property

Used for ODAC to map Oracle numbers with precision less than 10 to TIntegerField.

Class© 2019 Devart

851

Oracle Data Access Components

TOraSessionOptions

Syntaxproperty EnableIntegers: boolean default True;

Remarks
When the EnableIntegers property is set to True ODAC maps Oracle numbers with precisionless than 10 to TIntegerField. If EnableIntegers is set to False numbers are mapped to
TFloatField or TOraNumberField.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.12 EnableLargeint Property

Used for ODAC to map Oracle numbers with precision less than 10 to TIntegerField.

Class
TOraSessionOptions

Syntaxproperty EnableLargeint: boolean default False;

Remarks
When the EnableIntegers property is set to True, ODAC maps Oracle numbers with precisionless than 10 to TIntegerField. If EnableIntegers is set to False, numbers are mapped to
TFloatField or TOraNumberField.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.13 EnableNumbers Property

Used for ODAC to map Oracle numbers with precision larger than 15 to TOraNumberField.

Class
TOraSessionOptions

Syntaxproperty EnableNumbers: boolean default False;© 2019 DevartReference

852

Remarks
When the EnableNumbers property is set to True ODAC maps Oracle numbers with
precision larger than 15 to TOraNumberField. Otherwise they are mapped to TFloatFiled.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.14 EnableOraTimestamp Property

Used to create TOraTimeStampField for columns of TIMESTAMP data type.

Class
TOraSessionOptions

Syntaxproperty EnableOraTimestamp: boolean default True;

Remarks
When the EnableOraTimestamp property is set to True, TOraTimeStampField is created forcolumns of TIMESTAMP data type.
When False, standard TSQLTimeStampField is created for columns of TIMESTAMP data
type.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.15 IPVersion Property

Used to specify Internet Protocol Version.

Class
TOraSessionOptions

Syntaxproperty IPVersion: TIPVersion default DefValIPVersion;

Remarks
Use the IPVersion property to specify Internet Protocol Version.
Supported values:© 2019 Devart

853

Oracle Data Access Components

ivIPBoth - specifies that either Internet Protocol Version 6 (IPv6) or Version 4 (IPv4) will be
used;
ivIPv4 (default) - specifies that Internet Protocol Version 4 (IPv4) will be used;ivIPv6 - specifies that Internet Protocol Version 6 (IPv6) will be used.
Note : When the TIPVersion property is set to ivIPBoth, a connection attempt will be made via
IPv6 if it is enabled on the operating system. If the connection attempt fails, a new connection
attempt will be made via IPv4.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.16 OptimizerMode Property

Used to get or set the default optimizer mode for connection.

Class
TOraSessionOptions

Syntaxproperty OptimizerMode: TOptimizerMode default omDefault;

Remarks
Use the OptimizerMode property to get or set the default optimizer mode for connection.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.17 StatementCache Property

Used for ODAC to cache statement handles.

Class
TOraSessionOptions

Syntaxproperty StatementCache: boolean default False;

Remarks
When the StatementCache property is set to True, ODAC caches statement handles.

© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

854

Provide Feedback

5.14.1.22.2.18 StatementCacheSize Property

Used to specify the statement handle cache size.

Class
TOraSessionOptions

Syntaxproperty StatementCacheSize: integer default 20;

Remarks
Use the StatementCacheSize property to specify the statement handle cache size.
Note: If StatementCache property is set, you can use TOraDataSet.Options and
TOraSQL.StatementCache to adjust performance of dataset and SQL components using thissession.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.19 SubscriptionPort Property

Sets the client port used to receive notifications.

Class
TOraSessionOptions

Syntaxproperty SubscriptionPort: Integer default 0;

Remarks
Use the SubscriptionPort property to set the port number for receiving notifications (forexample, for clients on a computer behind a firewall). This option applies only to OCI clients
when there is an exact correspondence between the client and the server versions.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

855

Oracle Data Access Components

5.14.1.22.2.20 UnicodeEnvironment Property

Enables or disables using OCI Unicode Environment.

Class
TOraSessionOptions

Syntaxproperty UnicodeEnvironment: boolean default False;

Remarks
When this option is enabled, Unicode characters can be used in SQL statements. Disable
this option if you have encountered some problems with Unicode Environment.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.21 UseOCI7 Property

Used to force TOraSession use OCI 7 call style only.

Class
TOraSessionOptions

Syntaxproperty UseOCI7: boolean default False;

Remarks
Use the UseOCI7 property to force TOraSession use OCI 7 call style only.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.22.2.22 UseUnicode Property

Used to enable or disable Unicode support.

Class
TOraSessionOptions

Syntax© 2019 DevartReference856

property UseUnicode: boolean default DefValUseUnicode;

Remarks
Use the UseUnicode property to enable or disable Unicode support. Affects character data
fetched from the server. When set to True all character data stored as WideStrings andTStringField is replaced with TWideStringFiled. Supported starting with Oracle 8.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23 TOraSQL Class

A component for executing SQL statements and calling stored procedures on the databaseserver.
For a list of all members of this type, see TOraSQL members.

Unit
Ora

SyntaxTOraSQL = class(TCustomDASQL);

Remarks
The TOraSQL component is a direct descendant of the TCustomDASQL class.
Use The TOraSQL component when a client application must execute SQL statement or the
PL/SQL block, and call stored procedure on the database server. The SQL statement should
not retrieve rows from the database.

Inheritance Hierarchy
TCustomDASQLTOraSQL

See Also
TOraQuery
TOraScript© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

857

Oracle Data Access Components

5.14.1.23.1 Members

TOraSQL class overview.

Properties
Name
ArrayLength
ChangeCursor (inherited from TCustomDASQL)

CommandTimeout

Connection (inherited from TCustomDASQL)
Debug (inherited from TCustomDASQL)
FinalSQL (inherited from TCustomDASQL)

MacroCount (inherited from TCustomDASQL)
Macros (inherited from TCustomDASQL)
NonBlocking

ParamCheck (inherited from TCustomDASQL)

ParamCount (inherited from TCustomDASQL)
ParamsParamValues (inherited from TCustomDASQL)

Description
Used to set the Length
propery to all parameters.
Enables or disables
changing screen cursor
when executing commandsin the NonBlocking mode.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to specify aconnection object to use toconnect to a data store.
Description is not available
at the moment.
Used to return a SQL
statement with expanded
macros.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to execute a SQL
statement by a separate
thread.
Used to specify whether
parameters for the Params
property are implicitly
generated when the SQL
property is being changed.
Indicates the number ofparameters in the Params
property.
Contains the parameters fora SQL statement.
Used to get or set the values© 2019 DevartReference

Prepared (inherited from TCustomDASQL)

RowsAffected (inherited from TCustomDASQL)

RowsProcessed
SessionSQL (inherited from TCustomDASQL)

SQLTypeStatementCache

TemporaryLobUpdate858

of individual fieldparameters that are
identified by name.
Used to indicate whether aquery is prepared forexecution.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Used to return the number ofrows processed by a SQL
statement.
Used to define the session
to execute SQL in.
Used to provide a SQL
statement that a
TCustomDASQL
component executes when
the Execute method iscalled.
Used to get the typecode of
the SQL statement being
processed by an Oracle
database server.
Used to get a value
indicating whether Oracle
resources assosiated withthe current statement will becached inside a session.
Specifies whether to use
temporary LOBs for writing
input and input/output LOB
parameters into databasewhen executing SQL
statements.

Methods
Name
CreateProcCall
ErrorOffset© 2019 Devart

Description
Assigns a PL/SQL blockthat calls stored procedure
Obtains zero-based starting
byte position of a parse

859

Oracle Data Access Components

Execute (inherited from TCustomDASQL)

Executing (inherited from TCustomDASQL)
FindMacro (inherited from TCustomDASQL)
FindParam
MacroByName (inherited from TCustomDASQL)
ParamByName
Prepare (inherited from TCustomDASQL)

UnPrepare (inherited from TCustomDASQL)

WaitExecuting (inherited from TCustomDASQL)

error detected by an Oracle
server while processing
SQL statement.
Overloaded. Executes a
SQL statement on theserver.
Checks whether
TCustomDASQL still
executes a SQL statement.
Searches for a macro withthe specified name.
Searches for and returns aparameter with the specified
name.
Finds a Macro with thename passed in Name.
Searches for and returns aparameter with the specified
name.
Allocates, opens, andparses cursor for a query.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Waits until TCustomDASQL
executes a SQL statement.

EventsName
AfterExecute (inherited from TCustomDASQL)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Description
Occurs after a SQL
statement has been
executed.
Provide Feedback

5.14.1.23.2 Properties

Properties of the TOraSQL class.
For a complete list of the TOraSQL class members, see the TOraSQL Members topic.

Public© 2019 DevartReference

Name
ArrayLength
ChangeCursor (inherited from TCustomDASQL)

Connection (inherited from TCustomDASQL)
Debug (inherited from TCustomDASQL)
FinalSQL (inherited from TCustomDASQL)

MacroCount (inherited from TCustomDASQL)
Macros (inherited from TCustomDASQL)

ParamCheck (inherited from TCustomDASQL)

ParamCount (inherited from TCustomDASQL)

ParamValues (inherited from TCustomDASQL)

Prepared (inherited from TCustomDASQL)

RowsAffected (inherited from TCustomDASQL)

RowsProcessed
SQL (inherited from TCustomDASQL)© 2019 Devart

860

Description
Used to set the Length
propery to all parameters.
Enables or disables
changing screen cursor
when executing commandsin the NonBlocking mode.
Used to specify aconnection object to use toconnect to a data store.
Description is not available
at the moment.
Used to return a SQL
statement with expanded
macros.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify whether
parameters for the Params
property are implicitly
generated when the SQL
property is being changed.
Indicates the number ofparameters in the Params
property.
Used to get or set the valuesof individual fieldparameters that are
identified by name.
Used to indicate whether aquery is prepared forexecution.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Used to return the number ofrows processed by a SQL
statement.
Used to provide a SQL
statement that a861

Oracle Data Access Components

TCustomDASQL
component executes when
the Execute method iscalled.
Used to get the typecode of
the SQL statement being
processed by an Oracle
database server.

SQLTypePublished
Name

Description
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to execute a SQL
statement by a separate
thread.
Contains the parameters fora SQL statement.
Used to define the session
to execute SQL in.
Used to get a value
indicating whether Oracle
resources assosiated withthe current statement will becached inside a session.
Specifies whether to use
temporary LOBs for writing
input and input/output LOB
parameters into databasewhen executing SQL
statements.

CommandTimeout

NonBlocking
ParamsSessionStatementCache

TemporaryLobUpdate

See Also
TOraSQL ClassTOraSQL Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference862

5.14.1.23.2.1 ArrayLength Property

Used to set the Length propery to all parameters.

Class
TOraSQL

Syntaxproperty ArrayLength: integer;

Remarks
Use the ArrayLength property to set the Length propery to all parameters. It is useful for DML
array operations.

See Also
TOraParam.Length© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23.2.2 CommandTimeout Property

Sets the wait time before a request is sent to the server to terminate the attempt to execute or
fetch the current SQL statement.

Class
TOraSQL

Syntaxproperty CommandTimeout: integer default 0;

Remarks
The wait time is specified in seconds to wait for the command to execute. The default value is
0. The value of 0 indicates there are no time limits (an attempt to execute a command will
wait indefinitely).

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

863

Oracle Data Access Components

5.14.1.23.2.3 NonBlocking Property

Used to execute a SQL statement by a separate thread.

Class
TOraSQL

Syntaxproperty NonBlocking: boolean;

Remarks
Set the NonBlocking property to True to execute a SQL statement by a separate thread.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23.2.4 Params Property

Contains the parameters for a SQL statement.

Class
TOraSQL

Syntaxproperty Params: TOraParams stored False;

Remarks
Contains the parameters for a SQL statement.
Access Params at runtime to view and set parameter names, values, and data types
dynamically (at design time use the Parameters editor to set parameter information). Params
is a zero-based array of parameter records. Index specifies the array element to access.
An easier way to set and retrieve parameter values when the name of each parameter isknown is to call ParamByName.

ExampleSetting parameters in runtime.
procedure TForm1.Button1Click(Sender: TObject);
beginwith OraSQL do
begin© 2019 DevartReference

864

SQL.Clear;
SQL.Add('INSERT INTO Temp_Table(Id, Name)');SQL.Add('VALUES (:id, :Name)');ParamByName('Id').AsInteger := 55;
Params[1].AsString := ' Green';
Execute;end;
end;

See Also
TOraParam
FindParam© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23.2.5 Row sProcessed Property

Used to return the number of rows processed by a SQL statement.

Class
TOraSQL

Syntaxproperty RowsProcessed: integer;

Remarks
Use the RowsProcessed property to return the number of rows processed by a SQL
statement. Useful for inserting, updating and deleting statements.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.14.1.23.2.6 Session Property

Used to define the session to execute SQL in.

Class
TOraSQL

Syntaxproperty Session: TOraSession;© 2019 Devart

DAC Forum

Provide Feedback

865

Oracle Data Access Components

Remarks
Use the Session property to specify the session in which SQL will be executed. If Session is
not connected, the Execute method calls Session.Connect.

See Also
TOraSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23.2.7 SQLType Property

Used to get the typecode of the SQL statement being processed by an Oracle databaseserver.

Class
TOraSQL

Syntaxproperty SQLType: integer;

Remarks
Use the SQLType property to get the typecode of the SQL statement being processed by an
Oracle database server.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23.2.8 StatementCache Property

Used to get a value indicating whether Oracle resources assosiated with the current
statement will be cached inside a session.

Class
TOraSQL

Syntaxproperty StatementCache: boolean default False;

Remarks© 2019 DevartReference

866

OCI statement cache is enabled when you set TOraSessionOptions.StatementCacheSize in
TOraSession.Options to a positive value. Set TOraSessionOptions.StatementCacheSize to 0
(default) or TOraSession.Options.StatemantCache to false if you don't want the statements
to be cached.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23.2.9 TemporaryLobUpdate Property

Specifies whether to use temporary LOBs for writing input and input/output LOB parameters
into database when executing SQL statements.

Class
TOraSQL

Syntaxproperty TemporaryLobUpdate: boolean default False;

Remarks
If the TemporaryLobUpdate property is True, temporary LOBs are used to write input andinput/output LOB parameters into database when executing SQL statements.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23.3 Methods

Methods of the TOraSQL class.
For a complete list of the TOraSQL class members, see the TOraSQL Members topic.

PublicNameCreateProcCall

ErrorOffset

Execute (inherited from TCustomDASQL)© 2019 Devart

Description
Assigns a PL/SQL blockthat calls stored procedure
Obtains zero-based starting
byte position of a parse
error detected by an Oracle
server while processing
SQL statement.
Overloaded. Executes a867

Oracle Data Access Components

Executing (inherited from TCustomDASQL)
FindMacro (inherited from TCustomDASQL)
FindParam
MacroByName (inherited from TCustomDASQL)
ParamByName
Prepare (inherited from TCustomDASQL)

UnPrepare (inherited from TCustomDASQL)

WaitExecuting (inherited from TCustomDASQL)

SQL statement on theserver.
Checks whether
TCustomDASQL still
executes a SQL statement.
Searches for a macro withthe specified name.
Searches for and returns aparameter with the specified
name.
Finds a Macro with thename passed in Name.
Searches for and returns aparameter with the specified
name.
Allocates, opens, andparses cursor for a query.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Waits until TCustomDASQL
executes a SQL statement.

See Also
TOraSQL ClassTOraSQL Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23.3.1 CreateProcCall Method

Assigns a PL/SQL block that calls stored procedureClass
TOraSQL

Syntax
procedure CreateProcCall(Name: string; Overload: integer = 0);
Parameters© 2019 DevartReference

868

Name
Holds the stored procedure name.
Overload
Holds the number of overloaded procedure.

Remarks
Call the CreateProcCall method to assign a PL/SQL block that calls stored procedure
specified by Name to the SQL property. The Overload parameter must contain the number ofoverloaded procedure. Retrieves the information about parameters of the procedure from
Oracle. After calling CreateProcCall you can execute a stored procedure by Execute method.

See Also
TCustomDASQL.Execute
TCustomDAConnection.ExecProc
TOraStoredProc© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23.3.2 ErrorOffset Method

Obtains zero-based starting byte position of a parse error detected by an Oracle server while
processing SQL statement.

Class
TOraSQL

Syntaxfunction ErrorOffset: integer;
Return Value
Holds the position of a parse error detected by an Oracle server while processing SQL
statement.

Remarks
Call the ErrorOffset method to obtain zero-based starting byte position of a parse error
detected by an Oracle server while processing SQL statement.
Note that statements which are longer than 64KB will have unpredictable effect on theErrorOffset value. Refer to Programmer's Guide to the Oracle Call Interface for further
information.

© 2019 Devart

869

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23.3.3 FindParam Method

Searches for and returns a parameter with the specified name.

Class
TOraSQL

Syntaxfunction FindParam(const Value: string): TOraParam;
Parameters
Value
Holds the stored procedure name.
Return Value
the parameter, if a match was found. Nil otherwise.

Remarks
Call the FindParam method to find a parameter with the name passed in the Name argument.
If a match was found, FindParam returns the parameter. Otherwise, it returns nil.

See Also
TOraParam
ParamByName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.23.3.4 ParamByName Method

Searches for and returns a parameter with the specified name.

Class
TOraSQL

Syntaxfunction ParamByName(const Value: string): TOraParam;
Parameters© 2019 DevartReference

870

Value
Holds the parameter name.
Return Value
the parameter, if a match was found. Otherwise an exception is raised.

Remarks
Call the ParamByName method to find a parameter with the name passed in the Nameargument.
If a match is found, ParamByName returns the parameter. Otherwise, an exception is raised.

ExampleOraSQL1.Execute;Edit1.Text := OraSQL1.ParamsByName('Contact').AsString;See Also
TOraParam
FindParam© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.24 TOraStoredProc Class

A component for accessing and executing stored procedures and functions.
For a list of all members of this type, see TOraStoredProc members.

Unit
Ora

SyntaxTOraStoredProc = class(TCustomOraQuery);Remarks
Use TOraStoredProc to access stored procedures on the database server.
You need only to define the StoredProcName property, and the SQL statement to call thestored procedure will be generated automatically.
Use the Execute method at runtime to generate request that instructs server to executeprocedure and PrepareSQL to describe parameters at run time

Inheritance Hierarchy© 2019 Devart

871

Oracle Data Access Components

TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQueryTOraStoredProc

See Also
TOraQuery
TOraSQL
Updating Data with ODAC Dataset Components
TCustomDAConnection.ExecProc© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.24.1 Members

TOraStoredProc class overview.

Properties
Name
BaseSQL (inherited from TCustomDADataSet)

CachedUpdates (inherited from TMemDataSet)

ChangeNotification (inherited from TOraDataSet)

CheckMode (inherited from TOraDataSet)

CommandTimeout (inherited from TOraDataSet)

Conditions (inherited from TCustomDADataSet)

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.
Used to define the checkmode before editing arecord.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query© 2019 DevartReference

Connection (inherited from TCustomDADataSet)

Cursor (inherited from TOraDataSet)
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)

DetailFields (inherited from TCustomDADataSet)

Disconnected (inherited from TCustomDADataSet)

DMLRefresh (inherited from TOraDataSet)

Encryption (inherited from TOraDataSet)

FetchAll (inherited from TOraDataSet)

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)© 2019 Devart

872

Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption
options in a dataset.
Used to request all recordsof the query from databaseserver when a dataset isbeing opened.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.

873

Oracle Data Access Components

IsPLSQL (inherited from TOraDataSet)

IsQuery (inherited from TOraDataSet)

KeyExclusive (inherited from TMemDataSet)

KeyFields (inherited from TOraDataSet)

KeySequence (inherited from TOraDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

LockMode
MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows ornot.
Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.
Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted orposted to a database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to specify what kind oflock will be performed when
editing a record.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component which© 2019 DevartReference

NonBlocking (inherited from TOraDataSet)

Options (inherited from TOraDataSet)

OptionsDS (inherited from TOraDataSet)
Overload

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)
Params (inherited from TOraDataSet)
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly (inherited from TCustomDADataSet)
RefreshMode (inherited from TOraDataSet)
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams (inherited from TOraDataSet)

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed (inherited from TOraDataSet)© 2019 Devart874

binds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify theoverloading number.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.
Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.
Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert
or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.

875

Oracle Data Access Components

SequenceMode (inherited from TOraDataSet)

Session (inherited from TOraDataSet)

SmartFetch (inherited from TOraDataSet)

SQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)

SQLInsert (inherited from TCustomDADataSet)

SQLLock (inherited from TCustomDADataSet)

SQLRecCount (inherited from TCustomDADataSet)

SQLRefresh (inherited from TCustomDADataSet)

SQLType (inherited from TOraDataSet)

SQLUpdate (inherited from TCustomDADataSet)

Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be
executed.
The SmartFetch mode isused for fast navigation
through a huge amount ofrecords and to minimize
memory consumption.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of
the SQL statement being
processed by Oracle
database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.

© 2019 DevartReferenceStoredProcName

StrictUpdate (inherited from TOraDataSet)

UniDirectional (inherited from TCustomDADataSet)

UpdateObject (inherited from TOraDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

876

Used to specify the name ofthe stored procedure to callon the server.
Used for TOraDataSet toraise the 'Update failed'exception when the numberof updated or deleted
records are not equal to 1.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which
provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
AddWhere (inherited from TCustomDADataSet)

ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)
BreakExec (inherited from TCustomDADataSet)
CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)© 2019 Devart

Description
Adds condition to the
WHERE clause of SELECT
statement in the SQL
property.
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
statement on the server.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its prior

877

Oracle Data Access Components

state.
Clears the cached updates
CommitUpdates (inherited from TMemDataSet)buffer.
Used to obtain a stream forreading data from or writing
CreateBlobStream (inherited from TCustomDADataSet) data to a BLOB field,
specified by the Field
parameter.
Generates the stored
CreateProcCall (inherited from TOraDataSet)
procedure call.
Makes permanent changes
DeferredPost (inherited from TMemDataSet)
to the database server.
Removes WHERE clausefrom the SQL property and
DeleteWhere (inherited from TCustomDADataSet)
assigns the BaseSQL
property.
Enables changing the
EditRangeEnd (inherited from TMemDataSet)
ending value for an existing
range.
Enables changing the
EditRangeStart (inherited from TMemDataSet)
starting value for an existing
range.
Returns the parse error
ErrorOffset (inherited from TOraDataSet)
offset.
Executes a SQL statement
ExecProcon the server.
Overloaded. Executes a
Execute (inherited from TCustomDADataSet)
SQL statement on theserver.
Indicates whether SQL
Executing (inherited from TCustomDADataSet)
statement is still being
executed.
Used to learn whether
Fetching (inherited from TCustomDADataSet)
TCustomDADataSet is still
fetching rows.
Used to learn whether
FetchingAll (inherited from TCustomDADataSet)
TCustomDADataSet isfetching all rows to the end.
Searches for a record which
FindKey (inherited from TCustomDADataSet)
contains specified fieldvalues.
Description is not available
FindMacro (inherited from TCustomDADataSet)at the moment.

© 2019 DevartReference

878

Moves the cursor to a
specific record or to the firstrecord in the dataset that
FindNearest (inherited from TCustomDADataSet)
matches or is greater thanthe values specified in the
KeyValues parameter.
Determines whether a
FindParam (inherited from TOraDataSet)
parameter with the specified
name exists in a dataset.
Retrieves a TOraArray
GetArray (inherited from TOraDataSet)
object for a field when only
its name is known.
Overloaded. Retrieves
TBlob object for a field or
GetBlob (inherited from TMemDataSet)
current record when only its
name or the field itself isknown.
Returns internal field types
GetDataType (inherited from TCustomDADataSet)
defined in the MemData andaccompanying modules.
Returns a row and column of
GetErrorPos (inherited from TOraDataSet)parse error for a SQL
statement.
Returns a multireference
GetFieldObject (inherited from TCustomDADataSet)
shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) Retrieves the precision of anumber field.
Retrieves the scale of a
GetFieldScale (inherited from TCustomDADataSet)
number field.
Retrieves a TOraFile object
GetFile (inherited from TOraDataSet)
for a field with known name.
Retrieves a TOraInterval
GetInterval (inherited from TOraDataSet)
object for a field with known
name.
GetKeyFieldNames (inherited from
Provides a list of available
TCustomDADataSet)

key field names.

GetKeyList (inherited from TOraDataSet)

Returns the list of tableprimary key fields.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraLob object
for a field with known name.

GetLob (inherited from TOraDataSet)
GetLobLocator (inherited from TOraDataSet)
GetObject (inherited from TOraDataSet)© 2019 Devart

Retrieves a TOraObject

879

Oracle Data Access Components

GetOrderBy (inherited from TCustomDADataSet)
GetRef (inherited from TOraDataSet)
GetTable (inherited from TOraDataSet)

GetTimeStamp (inherited from TOraDataSet)

GotoCurrent (inherited from TCustomDADataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock (inherited from TCustomDADataSet)
MacroByName (inherited from TCustomDADataSet)
OpenNext (inherited from TOraDataSet)

ParamByName (inherited from TOraDataSet)

Prepare (inherited from TCustomDADataSet)
PrepareSQL
RefreshRecord (inherited from TCustomDADataSet)
RestoreSQL (inherited from TCustomDADataSet)

object for a field with known
name.
Retrieves an ORDER BY
clause from a SQL
statement.
Retrieves a TOraRef object
for a field with known name.
Retrieve a TOraNestTable
object for a field with known
name.
Retrieves a
TOraTimeStamp object for afield with known name.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Opens next cursor or rowset
in the statement.
Sets or uses parameter
information for a specificparameter based on its
name.
Allocates, opens, andparses cursor for a query.
Describes the parameters ofa stored procedure.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
© 2019 DevartReference

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveSQL (inherited from TCustomDADataSet)

SaveToXML (inherited from TMemDataSet)

SetOrderBy (inherited from TCustomDADataSet)
SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

SQLSaved (inherited from TCustomDADataSet)
UnLock (inherited from TCustomDADataSet)
UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)© 2019 Devart

880

Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset when881

Oracle Data Access Components

cached updates areenabled.

EventsName
AfterExecute (inherited from TCustomDADataSet)
AfterFetch (inherited from TCustomDADataSet)
AfterUpdateExecute (inherited fromTCustomDADataSet)
BeforeFetch (inherited from TCustomDADataSet)
BeforeUpdateExecute (inherited fromTCustomDADataSet)
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Description
Occurs after a component
has executed a query todatabase.
Occurs after dataset finishes
fetching data from server.
Occurs after executing
insert, delete, update, lockand refresh operations.
Occurs before dataset isgoing to fetch block ofrecords from the server.
Occurs before executing
insert, delete, update, lock,and refresh operations.
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Provide Feedback

5.14.1.24.2 Properties

Properties of the TOraStoredProc class.
For a complete list of the TOraStoredProc class members, see the TOraStoredProc
Members topic.

PublicName

Description

BaseSQL (inherited from TCustomDADataSet)

Used to return SQL text
without any changes
performed by AddWhere,© 2019 DevartReference

CachedUpdates (inherited from TMemDataSet)

ChangeNotification (inherited from TOraDataSet)

CheckMode (inherited from TOraDataSet)

CommandTimeout (inherited from TOraDataSet)

Conditions (inherited from TCustomDADataSet)
Connection (inherited from TCustomDADataSet)

Cursor (inherited from TOraDataSet)
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)

DetailFields (inherited from TCustomDADataSet)

Disconnected (inherited from TCustomDADataSet)

DMLRefresh (inherited from TOraDataSet)

Encryption (inherited from TOraDataSet)
FetchAll (inherited from TOraDataSet)© 2019 Devart

882

SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.
Used to define the checkmode before editing arecord.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption
options in a dataset.
Used to request all recordsof the query from database883

Oracle Data Access Components

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)

IsPLSQL (inherited from TOraDataSet)

IsQuery (inherited from TOraDataSet)

KeyExclusive (inherited from TMemDataSet)

KeyFields (inherited from TOraDataSet)

KeySequence (inherited from TOraDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

server when a dataset isbeing opened.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows ornot.
Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.
Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted orposted to a database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on database© 2019 DevartReference

MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

NonBlocking (inherited from TOraDataSet)

Options (inherited from TOraDataSet)

OptionsDS (inherited from TOraDataSet)

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)
Params (inherited from TOraDataSet)
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly (inherited from TCustomDADataSet)© 2019 Devart

884

server.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.
Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.

885

Oracle Data Access Components

RefreshMode (inherited from TOraDataSet)
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams (inherited from TOraDataSet)

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed (inherited from TOraDataSet)
SequenceMode (inherited from TOraDataSet)

Session (inherited from TOraDataSet)

SmartFetch (inherited from TOraDataSet)

SQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)

SQLInsert (inherited from TCustomDADataSet)

SQLLock (inherited from TCustomDADataSet)

SQLRecCount (inherited from TCustomDADataSet)
SQLRefresh (inherited from TCustomDADataSet)

Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert
or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.
Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be
executed.
The SmartFetch mode isused for fast navigation
through a huge amount ofrecords and to minimize
memory consumption.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL© 2019 DevartReference

SQLType (inherited from TOraDataSet)

SQLUpdate (inherited from TCustomDADataSet)

StrictUpdate (inherited from TOraDataSet)

UniDirectional (inherited from TCustomDADataSet)

UpdateObject (inherited from TOraDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

886

statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of
the SQL statement being
processed by Oracle
database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used for TOraDataSet toraise the 'Update failed'exception when the numberof updated or deleted
records are not equal to 1.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which
provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Published
Name
LockModeOverloadStoredProcName© 2019 Devart

Description
Used to specify what kind oflock will be performed when
editing a record.
Used to specify theoverloading number.
Used to specify the name ofthe stored procedure to call

887

Oracle Data Access Components

on the server.

See Also
TOraStoredProc ClassTOraStoredProc Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.24.2.1 LockMode Property

Used to specify what kind of lock will be performed when editing a record.

Class
TOraStoredProc

Syntaxproperty LockMode: TLockMode default lmNone;

Remarks
Use the LockMode property to define what kind of lock will be performed when editing arecord. Locking a record is useful in creating multi-user applications. It prevents modificationof a record by several users at the same time.
Locking is performed by the RefreshRecord method.
The default value is lmNone.

See Also
TOraQuery.LockMode
TOraTable.LockMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.24.2.2 Overload Property

Used to specify the overloading number.

Class
TOraStoredProc© 2019 DevartReference

888

Syntaxproperty Overload: integer default 0;

Remarks
Use the Overload property to specify the overloading number in case the procedure orfunction is a part of a package and is overloaded.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.24.2.3 StoredProcName Property

Used to specify the name of the stored procedure to call on the server.

Class
TOraStoredProc

Syntaxproperty StoredProcName: string;

Remarks
Use the StoredProcName property to specify the name of the stored procedure to call on theserver. If StoredProcName does not match the name of an existing stored procedure on theserver, then when the application attempts to prepare the procedure prior to execution, an
exception is raised.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.24.3 Methods

Methods of the TOraStoredProc class.
For a complete list of the TOraStoredProc class members, see the TOraStoredProc
Members topic.

PublicName

Description

AddWhere (inherited from TCustomDADataSet)

Adds condition to the
WHERE clause of SELECT© 2019 Devart

889

Oracle Data Access Components

statement in the SQL
property.
Applies a range to the
ApplyRange (inherited from TMemDataSet)
dataset.
Overloaded. Writes
ApplyUpdates (inherited from TMemDataSet)
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
BreakExec (inherited from TCustomDADataSet)
statement on the server.
Removes any ranges
CancelRange (inherited from TMemDataSet)
currently in effect for adataset.
Clears all pending cachedupdates from cache andCancelUpdates (inherited from TMemDataSet)
restores dataset in its priorstate.
Clears the cached updates
CommitUpdates (inherited from TMemDataSet)buffer.
Used to obtain a stream forreading data from or writing
CreateBlobStream (inherited from TCustomDADataSet) data to a BLOB field,
specified by the Field
parameter.
Generates the stored
CreateProcCall (inherited from TOraDataSet)
procedure call.
Makes permanent changes
DeferredPost (inherited from TMemDataSet)
to the database server.
Removes WHERE clausefrom the SQL property and
DeleteWhere (inherited from TCustomDADataSet)
assigns the BaseSQL
property.
Enables changing the
EditRangeEnd (inherited from TMemDataSet)
ending value for an existing
range.
Enables changing the
EditRangeStart (inherited from TMemDataSet)
starting value for an existing
range.
Returns the parse error
ErrorOffset (inherited from TOraDataSet)
offset.
Executes a SQL statement
ExecProcon the server.
Overloaded. Executes a
Execute (inherited from TCustomDADataSet)
SQL statement on theserver.
© 2019 DevartReference

890

Indicates whether SQL
statement is still being
executed.
Used to learn whether
Fetching (inherited from TCustomDADataSet)
TCustomDADataSet is still
fetching rows.
Used to learn whether
FetchingAll (inherited from TCustomDADataSet)
TCustomDADataSet isfetching all rows to the end.
Searches for a record which
FindKey (inherited from TCustomDADataSet)
contains specified fieldvalues.
Description is not available
FindMacro (inherited from TCustomDADataSet)at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset that
FindNearest (inherited from TCustomDADataSet)
matches or is greater thanthe values specified in the
KeyValues parameter.
Determines whether a
FindParam (inherited from TOraDataSet)
parameter with the specified
name exists in a dataset.
Retrieves a TOraArray
GetArray (inherited from TOraDataSet)
object for a field when only
its name is known.
Overloaded. Retrieves
TBlob object for a field or
GetBlob (inherited from TMemDataSet)
current record when only its
name or the field itself isknown.
Returns internal field types
GetDataType (inherited from TCustomDADataSet)
defined in the MemData andaccompanying modules.
Returns a row and column of
GetErrorPos (inherited from TOraDataSet)parse error for a SQL
statement.
Returns a multireference
GetFieldObject (inherited from TCustomDADataSet)
shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) Retrieves the precision of anumber field.
Retrieves the scale of a
GetFieldScale (inherited from TCustomDADataSet)
number field.
GetFile (inherited from TOraDataSet)
Retrieves a TOraFile object
Executing (inherited from TCustomDADataSet)© 2019 Devart

891

Oracle Data Access Components

GetInterval (inherited from TOraDataSet)
GetKeyFieldNames (inherited fromTCustomDADataSet)
GetKeyList (inherited from TOraDataSet)
GetLob (inherited from TOraDataSet)
GetLobLocator (inherited from TOraDataSet)
GetObject (inherited from TOraDataSet)

GetOrderBy (inherited from TCustomDADataSet)
GetRef (inherited from TOraDataSet)
GetTable (inherited from TOraDataSet)

GetTimeStamp (inherited from TOraDataSet)

GotoCurrent (inherited from TCustomDADataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock (inherited from TCustomDADataSet)
MacroByName (inherited from TCustomDADataSet)

for a field with known name.
Retrieves a TOraInterval
object for a field with known
name.
Provides a list of available
key field names.
Returns the list of tableprimary key fields.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraObject
object for a field with known
name.
Retrieves an ORDER BY
clause from a SQL
statement.
Retrieves a TOraRef object
for a field with known name.
Retrieve a TOraNestTable
object for a field with known
name.
Retrieves a
TOraTimeStamp object for afield with known name.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.

© 2019 DevartReference

OpenNext (inherited from TOraDataSet)

ParamByName (inherited from TOraDataSet)

Prepare (inherited from TCustomDADataSet)
PrepareSQL
RefreshRecord (inherited from TCustomDADataSet)
RestoreSQL (inherited from TCustomDADataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveSQL (inherited from TCustomDADataSet)

SaveToXML (inherited from TMemDataSet)

SetOrderBy (inherited from TCustomDADataSet)
SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)© 2019 Devart

892

Opens next cursor or rowset
in the statement.
Sets or uses parameter
information for a specificparameter based on its
name.
Allocates, opens, andparses cursor for a query.
Describes the parameters ofa stored procedure.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.

893

Oracle Data Access Components

SQLSaved (inherited from TCustomDADataSet)
UnLock (inherited from TCustomDADataSet)
UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

See Also
TOraStoredProc ClassTOraStoredProc Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.24.3.1 ExecProc Method

Executes a SQL statement on the server.

Class
TOraStoredProc

Syntax
procedure ExecProc;

Remarks
The ExecProc method is the same as TCustomDADataSet.Execute method. It is included forcompatibility with TStoredProc.

See Also
TCustomDADataSet.Execute© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

894

Provide Feedback

5.14.1.24.3.2 PrepareSQL Method

Describes the parameters of a stored procedure.

Class
TOraStoredProc

Syntax
procedure PrepareSQL;

Remarks
Use the PrepareSQL method to describe parameters of a stored procedure. If it is necessary,
Execute method calls it automatically. You can define parameters at design time if
ParametersEditor is opened.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.25 TOraTimeStampField ClassA class providing access to the Oracle timestamp fields.
For a list of all members of this type, see TOraTimeStampField members.

Unit
Ora

SyntaxTOraTimeStampField = class(TField);

Remarks
TOraTimeStampField provides access to Oracle timestamp fields. The TOraTimeStampField
class supports three data types: TIMESTAMP, TIMESTAMP WITH TIME ZONE, TIMESTAMP
WITH LOCAL TIME ZONE. According to this, the TOraTimeStampField.DataType property
has three valid values ftTimeStamp, ftTimeStampTZ and ftTimeStampLTZ.
You can access actual timestamp value using the AsDateTime, AsString and
AsOraTimeStamp properties.

© 2019 Devart

895

Oracle Data Access Components

See Also
TOraTimeStamp© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.25.1 Members

TOraTimeStampField class overview.

Properties
Name

Description
Used to provide access to a
TOraTimeStamp object.
Used to get or set the datetime format model for
operations with the AsString
property.

AsTimeStamp

Format© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.25.2 Properties

Properties of the TOraTimeStampField class.
For a complete list of the TOraTimeStampField class members, see the
TOraTimeStampField Members topic.

PublicName
AsTimeStamp

Description
Used to provide access to a
TOraTimeStamp object.

Published
Name
FormatDescription
Used to get or set the datetime format model for
operations with the AsString
property.

© 2019 DevartReference

896

See Also
TOraTimeStampField Class
TOraTimeStampField Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.25.2.1 AsTimeStamp Property

Used to provide access to a TOraTimeStamp object.

Class
TOraTimeStampField

Syntaxproperty AsTimeStamp: TOraTimeStamp;

Remarks
Use the AsTimeStamp property to get access to a TOraTimeStamp object which you can
use for manipulations with timestamp value.

See Also
TOraTimeStamp© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.25.2.2 Format Property

Used to get or set the date-time format model for operations with the AsString property.

Class
TOraTimeStampField

Syntaxproperty Format: string;

Remarks
Use the Format property to get or set the date-time format model for operations with the© 2019 Devart

897

Oracle Data Access Components

AsString property. Format string should be an Oracle date-time string.

See Also
TOraTimeStamp.Format© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26 TOraTrace Class

A component allowing starting and stopping a SQL trace for a specified session. This
component provides access to the DBMS_TRACE package.
For a list of all members of this type, see TOraTrace members.

Unit
Ora

SyntaxTOraTrace = class(TComponent);

Remarks
Use the TOraTrace component to start and stop a SQL trace for a session. The component
also provides access to functionality of DBMS_TRACE package to control the PL/SQL trace.
SQL trace can be useful in performance diagnostics. It can help to determine in detail how
applications/users access the database.
The TOraTrace component automatically starts the trace when its TOraSession component
connects to a database or when you assign already connected session to the
TOraTrace.Session property. The SQL trace is started if TOraTrace.SqlTraceMode <> [].
The PL/SQL trace is started if TOraTrace.PlSqlTraceMode <> [].

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.1 Members

TOraTrace class overview.

Properties
Name
EnabledDescription
Used to enable the trace.
© 2019 DevartReference

MaxTraceFileSize
PlSqlTraceMode
Session
SqlTraceMode
State
TraceFileIdentifier

898

Used to limit the size of the
SQL trace dump file.
Defines the level of PL/SQL
trace.
used to specify the session
on which a trace will beenabled.
Used to determine the levelof SQL trace.
Used to define wheter SQL
trace and PL/SQL trace are
active.
Used to add a string to the
SQL trace dump file name.

Methods
Name

PlSqlTraceStop

Description
Returns the operating
system process identifier fora process that owns thecurrent session.
Returns the name of a dump
file on the database server
to which SQL trace data is
written.
Provides a comment on the
PL/SQL trace.
Limits the amount of storage
used in the database for the
PL/SQL trace data.
makes a pause in PL/SQL
tracing.
Resumes PL/SQL trace.
Returns a run number for thecurrent PL/SQL trace.
Starts PL/SQL trace datacollection.
Stops the PL/SQL trace.

SqlTraceStart

Starts the SQL trace.

SqlTraceStop

Stops the SQL trace.

GetSessionPID

GetTraceFileName

PlSqlTraceComment
PlSqlTraceLimit
PlSqlTracePause
PlSqlTraceResume
PlSqlTraceRunNumber
PlSqlTraceStart© 2019 Devart

899

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.2 Properties

Properties of the TOraTrace class.
For a complete list of the TOraTrace class members, see the TOraTrace Members topic.

PublicName

Description
Used to define wheter SQL
trace and PL/SQL trace are
active.

State

Published
Name
EnabledDescription

MaxTraceFileSize

Used to limit the size of the
SQL trace dump file.
Defines the level of PL/SQL
trace.
used to specify the session
on which a trace will beenabled.
Used to determine the levelof SQL trace.
Used to add a string to the
SQL trace dump file name.

Used to enable the trace.

PlSqlTraceMode
Session
SqlTraceMode
TraceFileIdentifier

See Also
TOraTrace Class
TOraTrace Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

900

5.14.1.26.2.1 Enabled Property

Used to enable the trace.

Class
TOraTrace

Syntaxproperty Enabled: boolean default True;

Remarks
Use the Enabled property to enable or disable the trace. Set Enabled to False to disable thetrace.

See Also
SqlTraceStart
SqlTraceStop© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.2.2 MaxTraceFileSize Property

Used to limit the size of the SQL trace dump file.

Class
TOraTrace

Syntaxproperty MaxTraceFileSize: integer default
DEFAULT_TRACE_FILE_SIZE;

Remarks
Use the MaxTraceFileSize property to limit the size of the SQL trace dump file.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

901

Oracle Data Access Components

5.14.1.26.2.3 PlSqlTraceMode Property

Defines the level of PL/SQL trace.

Class
TOraTrace

Syntaxproperty PlSqlTraceMode: TPlSqlTraceMode default [];Remarks
Use the PlSqlTraceMode property to define the level of PL/SQL trace.
Note: PL/SQL program unit is enabled when it is compiled with debug information.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.2.4 Session Property

used to specify the session on which a trace will be enabled.

Class
TOraTrace

Syntaxproperty Session: TOraSession;

Remarks
Use the Session property to specify the session on which a trace will be enabled.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.2.5 SqlTraceMode Property

Used to determine the level of SQL trace.

Class
TOraTrace

Syntax© 2019 DevartReference902

property SqlTraceMode: TSqlTraceMode default[smTypicalStatistics, smTimedStatistics];

Remarks
Use the SqlTraceMode property to define the level of SQL trace.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.2.6 State Property

Used to define wheter SQL trace and PL/SQL trace are active.

Class
TOraTrace

Syntaxproperty State: TTraceState;

Remarks
Use the State property to detect whether SQL trace and PL/SQL trace are active.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.2.7 TraceFileIdentifier Property

Used to add a string to the SQL trace dump file name.

Class
TOraTrace

Syntaxproperty TraceFileIdentifier: string;

Remarks
Use the TraceFileIdentifier property to add a string to the name of the SQL trace dump file. If
you set TraceFileIdentifier property to some non-empty string then this string will be added to
the name of SQL trace dump file. It makes finding of the SQL trace dump file easier.

© 2019 Devart

903

Oracle Data Access Components

See Also
GetTraceFileName
GetSessionPID© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.3 Methods

Methods of the TOraTrace class.
For a complete list of the TOraTrace class members, see the TOraTrace Members topic.

PublicName
GetSessionPID

GetTraceFileName

PlSqlTraceComment
PlSqlTraceLimit
PlSqlTracePause
PlSqlTraceResume

Description
Returns the operating
system process identifier fora process that owns thecurrent session.
Returns the name of a dump
file on the database server
to which SQL trace data is
written.
Provides a comment on the
PL/SQL trace.
Limits the amount of storage
used in the database for the
PL/SQL trace data.
makes a pause in PL/SQL
tracing.
Resumes PL/SQL trace.

PlSqlTraceStop

Returns a run number for thecurrent PL/SQL trace.
Starts PL/SQL trace datacollection.
Stops the PL/SQL trace.

SqlTraceStart

Starts the SQL trace.

SqlTraceStop

Stops the SQL trace.

PlSqlTraceRunNumber
PlSqlTraceStart

See Also
TOraTrace Class© 2019 DevartReference

904

TOraTrace Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.3.1 GetSessionPID Method

Returns the operating system process identifier for a process that owns the current session.

Class
TOraTrace

Syntaxfunction GetSessionPID: integer;
Return Value
the operating system process identifier for a process that owns the current session.

Remarks
Call the GetSessionPID method to return the operating system process identifier for aprocess that owns the current session. This identifier can be usefull to find the dump file inwhich SQL trace data is written. The name of the dump file contains this identifier.

See Also
GetTraceFileName
TraceFileIdentifier© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.3.2 GetTraceFileName Method

Returns the name of a dump file on the database server to which SQL trace data is written.

Class
TOraTrace

Syntaxfunction GetTraceFileName: string;
Return Value
the name of a dump file on the database server to which SQL trace data is written.
© 2019 Devart

905

Oracle Data Access Components

Remarks
Call the GetTraceFileName method to return the name of a dump file on the database server
to which SQL trace data is written. The file name is returned with the path to the file.
Note: In some versions of Oracle database the dump file name format can be different fromthe one returned by the GetTraceFileName method.

See Also
GetSessionPID
TraceFileIdentifier© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.3.3 PlSqlTraceComment Method

Provides a comment on the PL/SQL trace.

Class
TOraTrace

Syntax
procedure PlSqlTraceComment(const Comment: string);
Parameters
Comment
Holds the comment for the PL/SQL trace.

Remarks
Call the PlSqlTraceComment method to set a comment on the PL/SQL trace.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.3.4 PlSqlTraceLimit Method

Limits the amount of storage used in the database for the PL/SQL trace data.

Class
TOraTrace© 2019 DevartReference

906

Syntax
procedure PlSqlTraceLimit(Limit: integer = 8192);
Parameters
Limit
Holds the limit size for the storage used for the PL/SQL trace data.

Remarks
Call the PlSqlTraceLimit method to limit the amount of storage used in the database for the
PL/SQL trace data.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.3.5 PlSqlTracePause Method

makes a pause in PL/SQL tracing.

Class
TOraTrace

Syntax
procedure PlSqlTracePause;

Remarks
Call the PlSqlTracePause method to pause PL/SQL trace.

See Also
PlSqlTraceResume© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.14.1.26.3.6 PlSqlTraceResume Method

Resumes PL/SQL trace.

Class
TOraTrace© 2019 Devart

DAC Forum

Provide Feedback

907

Oracle Data Access Components

Syntax
procedure PlSqlTraceResume;

Remarks
Call the PlSqlTraceResume method to resume PL/SQL trace.

See Also
PlSqlTracePause© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.3.7 PlSqlTraceRunNumber Method

Returns a run number for the current PL/SQL trace.

Class
TOraTrace

Syntaxfunction PlSqlTraceRunNumber: integer;
Return Valuea run number for the current PL/SQL trace.

Remarks
Call the PlSqlTraceRunNumber method to return a run number for the current PL/SQL trace.
This number can be used to retrieve information from the trace tables.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.3.8 PlSqlTraceStart Method

Starts PL/SQL trace data collection.

Class
TOraTrace

Syntax© 2019 DevartReference

908

procedure PlSqlTraceStart;

Remarks
When Enabled property is False, call the PlSqlTraceStart method to start PL/SQL trace datacollection. Setting Enabled property to True is another way to start the PL/SQL trace.

See Also
EnabledPlSqlTraceStop
PlSqlTracePause
PlSqlTraceResume© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.3.9 PlSqlTraceStop Method

Stops the PL/SQL trace.

Class
TOraTrace

Syntax
procedure PlSqlTraceStop;

Remarks
Call the PlSqlTraceStop method to stop the PL/SQL trace. Setting the Enabled property to
False is another way to stop the PL/SQL trace.

See Also
EnabledPlSqlTraceStart
PlSqlTracePause
PlSqlTraceResume© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

909

Oracle Data Access Components

5.14.1.26.3.10 SqlTraceStart Method

Starts the SQL trace.

Class
TOraTrace

Syntax
procedure SqlTraceStart;

Remarks
When the Enabled property is False, call the SqlTraceStart method to start the SQL trace.
Setting the Enabled property to True is another way to start the SQL trace.

See Also
EnabledSqlTraceStop© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.26.3.11 SqlTraceStop Method

Stops the SQL trace.

Class
TOraTrace

Syntax
procedure SqlTraceStop;

Remarks
Call the SqlTraceStop method to stop the SQL trace. Setting the Enabled property to False isanother way to stop the SQL trace.

See Also
EnabledSqlTraceStart© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

910

Reserved.
5.14.1.27 TOraUpdateSQL Class

A component for tuning update operations for the DataSet component.
For a list of all members of this type, see TOraUpdateSQL members.

Unit
Ora

SyntaxTOraUpdateSQL = class(TCustomDAUpdateSQL);

Remarks
Use the TOraUpdateSQL component to provide DML statements for the dataset componentsthat return read-only result set. This component also allows setting objects that can be used
for executing update operations. You may prefer to use directly SQLInsert, SQLUpdate, andSQLDelete properties of the TCustomDADataSet descendants.

Inheritance Hierarchy
TCustomDAUpdateSQLTOraUpdateSQL

See Also
TOraDataSet.UpdateObject© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.27.1 Members

TOraUpdateSQL class overview.

Properties
Name
DataSet (inherited from TCustomDAUpdateSQL)

DeleteObject (inherited from TCustomDAUpdateSQL)© 2019 Devart

Description
Used to hold a reference tothe TCustomDADataSet
object that is being updated.
Provides ability to perform
advanced adjustment of thedelete operations.

911

Oracle Data Access Components

Used when deleting arecord.
Provides ability to perform
InsertObject (inherited from TCustomDAUpdateSQL)
advanced adjustment ofinsert operations.
Used when inserting a
InsertSQL (inherited from TCustomDAUpdateSQL)
record.
Provides ability to perform
LockObject (inherited from TCustomDAUpdateSQL)
advanced adjustment of lock
operations.
Used to lock the current
LockSQL (inherited from TCustomDAUpdateSQL)
record.
Provides ability to perform
ModifyObject (inherited from TCustomDAUpdateSQL) advanced adjustment ofmodify operations.
Used when updating a
ModifySQL (inherited from TCustomDAUpdateSQL)
record.
Provides ability to perform
RefreshObject (inherited from TCustomDAUpdateSQL) advanced adjustment of
refresh operations.
Used to specify an SQL
statement that will be used
RefreshSQL (inherited from TCustomDAUpdateSQL) for refreshing the current
record byTCustomDADataSet.Refres
hRecord procedure.
Used to return a SQL
statement for one of the
SQL (inherited from TCustomDAUpdateSQL)
ModifySQL, InsertSQL, orDeleteSQL properties.
DeleteSQL (inherited from TCustomDAUpdateSQL)

Methods
Name
Apply (inherited from TCustomDAUpdateSQL)

Description
Sets parameters for a SQL
statement and executes it to
update a record.

ExecSQL (inherited from TCustomDAUpdateSQL)

Executes a SQL statement.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference912

5.14.1.28 TOraXMLField ClassA class providing access to the Oracle SYS.XMLTYPE objects.
For a list of all members of this type, see TOraXMLField members.

Unit
Ora

SyntaxTOraXMLField = class(TField);

Remarks
TOraXMLField provides access to the Oracle SYS.XMLTYPE objects.
The TMSXMLField.DataType property values equal to ftXML. You can access actual XML
document using the AsString and TOraXMLField.AsXML properties.

See Also
TOraXML© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.28.1 Members

TOraXMLField class overview.

Properties
Name

Description
Used to provide access to a
TOraXML object.

AsXML© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.28.2 Properties

Properties of the TOraXMLField class.
For a complete list of the TOraXMLField class members, see the TOraXMLField Members
topic.

Public© 2019 Devart

913

Oracle Data Access Components

Name

Description
Used to provide access to a
TOraXML object.

AsXML

See Also
TOraXMLField Class
TOraXMLField Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.1.28.2.1 AsXML Property

Used to provide access to a TOraXML object.

Class
TOraXMLField

Syntaxproperty AsXML: TOraXML;

Remarks
Use the AsXML property to get access to TOraXML object that can be used for manipulations
with an XML document.

See Also
TOraXML© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.2 Types
Types in the Ora unit.

Types
Name
TConnectChangeEvent

Description
This type is used for the
TOraSession.OnConnectChange event.
© 2019 DevartReferenceThis Type is used for the
TOraSession.OnFailover
event.
This type is used for the
TOraChangeNotification.On
Change event.
Specifies the level of PL/
SQL trace.
Specifies the level of SQL
trace statistics level.

TFailoverEvent

TOraChangeNotificationEvent
TPlSqlTraceMode
TSqlTraceMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

914

DAC Forum

Provide Feedback

5.14.2.1 TConnectChangeEvent Procedure ReferenceThis type is used for the TOraSession.OnConnectChange event.

Unit
Ora

SyntaxTConnectChangeEvent = procedure (Sender: TObject; Connected:
boolean) of object;Parameters
SenderAn object that raised the event.
Connected
True, if connection is active.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.14.2.2 TFailoverEvent Procedure ReferenceThis Type is used for the TOraSession.OnFailover event.

Unit
Ora

Syntax© 2019 Devart

Provide Feedback

915

Oracle Data Access Components

TFailoverEvent = procedure (Sender: TObject; FailoverState:
TFailoverState; FailoverType: TFailoverType; var Retry: boolean)of object;Parameters
SenderAn object that raised the event.
FailoverStateThe failover state.
FailoverType
The type of failover.
Retry
True, if performing of the failover should be retried.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.2.3 TOraChangeNotificationEvent Procedure ReferenceThis type is used for the TOraChangeNotification.OnChange event.

Unit
Ora

SyntaxTOraChangeNotificationEvent = procedure (Sender: TObject;
NotifyType: TChangeNotifyEventType; TableChanges:
TNotifyTableChanges) of object;Parameters
SenderAn object that raised the event.
NotifyType
The type of the event that occurred.
TableChanges
Holds the information on all table changes.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

916

5.14.2.4 TPlSqlTraceMode Set

Specifies the level of PL/SQL trace.

Unit
Ora

SyntaxTPlSqlTraceMode = set of ( pmAllCalls, pmEnabledCalls,
pmAllExceptions, pmEnabledExceptions, pmAllSql, pmEnabledSql,
pmAllLines, pmEnabledLines);© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.2.5 TSqlTraceMode Set

Specifies the level of SQL trace statistics level.

Unit
Ora

Syntax
TSqlTraceMode = set of ( smBasicStatistics, smTypicalStatistics,
smAllStatistics, smBindVariables, smWaitEvents, smTimedStatistics);© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.3 Enumerations
Enumerations in the Ora unit.

Enumerations
Name
TFailoverState

Description
Indicates the failover state.

TFailoverType

Specifies the failover type.
Specifies the way thetransactions containing
database modifications arehandled.

TOraIsolationLevel© 2019 Devart917

Oracle Data Access Components

Defines when to refresh an
editing record.
Specifies the method usedinternally to generatesequenced field.

TRefreshMode
TSequenceMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.3.1 TFailoverState Enumeration

Indicates the failover state.

Unit
Ora

SyntaxTFailoverState = (fsEnd, fsAbort, fsReauth, fsBegin, fsError);

ValuesValue
fsAbortfsBegin
fsEnd
fsErrorfsReauth© 1997-2019
Devart. All Rights
Reserved.

Meaning
Indicates that failover was unsuccessful and there is no option of
retrying.
Indicates that failover has detected a lost connection and failoveris starting.
Indicates successful completion of failover.
Indicates that an error occurred while trying to re-establish theconnection.
Indicates that a user handle has been re-authenticated.
Request Support

DAC Forum

Provide Feedback

5.14.3.2 TFailoverType Enumeration

Specifies the failover type.

Unit
Ora

Syntax© 2019 DevartReference

918

TFailoverType = (ftSession, ftSelect);

ValuesValue
ftSelectftSession

Meaning
Indicates that the user has requested select failover as well.
Indicates that the user has requested only session failover.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.3.3 TOraIsolationLevel Enumeration

Specifies the way the transactions containing database modifications are handled.

Unit
Ora

SyntaxTOraIsolationLevel = (ilReadCommitted, ilSerializable, ilReadOnly);

ValuesValue
ilReadCommitted

ilReadOnly

ilSerializable© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Meaning
If the transaction contains DML that requires row locks held byanother transaction, then the DML statement waits until the row
locks are released. The default Oracle behavior.
All subsequent queries in that transaction only see changes
committed before the transaction began. Read-only transactions
are useful for reports that run multiple queries against one ormore tables while other users update these same tables.
Specifies serializable transaction isolation mode as defined in
the SQL92 standard. If a serializable transaction contains data
manipulation language (DML) that attempts to update any
resource that may have been updated in a transaction
uncommitted at the start of the serializable transaction, then the
DML statement fails.
Request Support

DAC Forum

Provide Feedback

919

Oracle Data Access Components

5.14.3.4 TRefreshMode Enumeration

Defines when to refresh an editing record.

Unit
Ora

SyntaxTRefreshMode = (rmNone, rmAfterInsert, rmAfterUpdate, rmAlways);

ValuesValue
rmAfterInsert
rmAfterUpdate
rmAlwaysrmNone© 1997-2019
Devart. All Rights
Reserved.

Meaning
Refresh is performed after inserting a record.
Refresh is performed after updating a record.
Refresh is performed after inserting and updating a record.
No refresh is performed. The default value.
Request Support

DAC Forum

Provide Feedback

5.14.3.5 TSequenceMode Enumeration

Specifies the method used internally to generate sequenced field.

Unit
Ora

SyntaxTSequenceMode = (smInsert, smPost);

ValuesValue
smInsert

smPost© 1997-2019

Meaning
New record is inserted into the dataset where the first key field ispopulated with a sequenced value. An application may modify
this field before posting the record to the database.
Database server populates the key field with a sequenced value
when application posts the record to the database. Any value put
into the key field before post will be overwritten.
Request Support

DAC Forum

Provide Feedback© 2019 DevartReference920

Devart. All Rights
Reserved.
5.14.4 Variables
Variables in the Ora unit.

Variables
Name

Description
Read this variable to get
pointer to default session
object. Same as
DefaultSession function.
All TOraQuery components
in project become editable,
and can be modified by theend users.
Holds pointers to all
TOraSession objects of an
application.
When set to True enables
TOraDataSet and TOraSQL
components to use default
session if they are notattached to any session.

DefSession

OraQueryCompatibilityMode

Sessions

UseDefSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.4.1 DefSession Variable

Read this variable to get pointer to default session object. Same as DefaultSession function.

Unit
Ora

SyntaxDefSession: TOraSession;© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

921

Oracle Data Access Components

5.14.4.2 OraQueryCompatibilityMode Variable

All TOraQuery components in project become editable, and can be modified by the end
users.

Unit
Ora

Syntax
OraQueryCompatibilityMode: boolean = False;

Remarks
Before ODAC 6, TOraQuery could be editable only when InsertSQL, UpdateSQL, andDeleteSQL properties are assigned. The ability to generate update SQL statements with
TOraQuery automatically was added in ODAC 6.00.0.4. Therefore, after upgrading yourODAC to the sixth version, all TOraQuery components in you project become editable, andcan be modified by the end users. To restore the old behavior, set the
OraQueryCompatibilityMode variable to True.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.4.3 Sessions Variable

Holds pointers to all TOraSession objects of an application.

Unit
Ora

Syntax
Sessions: TSessionList;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.14.4.4 UseDefSession Variable

When set to True enables TOraDataSet and TOraSQL components to use default session if
they are not attached to any session.

Unit© 2019 DevartReference

922

Ora

SyntaxUseDefSession: boolean;© 1997-2019
Devart. All Rights
Reserved.

5.15

Request Support

DAC Forum

Provide Feedback

OraAlerter
This unit contains implementation of the TOraAlerter component.

ClassesName

Description
A component allowing
transferring messages
between sessions or client
applications.

TOraAlerter

Types
Name

Description
This type is used for the
TOraAlerter.OnEvent event.
This type is used for the
TOraAlerter.OnTimeOut
event.

TOnEventEvent
TOnTimeOutEvent

Enumerations
Name

Description
Specifies the kind of
messages used by the
TOraAlerter component.

TEventType© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

923

Oracle Data Access Components

5.15.1 Classes
Classes in the OraAlerter unit.

ClassesName

Description
A component allowing
transferring messages
between sessions or client
applications.

TOraAlerter© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1 TOraAlerter Class

A component allowing transferring messages between sessions or client applications.
For a list of all members of this type, see TOraAlerter members.

Unit
OraAlerter

SyntaxTOraAlerter = class(TDAAlerter);

Remarks
The TOraAlerter component allows to transfer messages between sessions or client
applications. Use the EventType property to specify what kind of messages will be used. The
TOraAlerter component supports Oracle alerts by DBMS_ALERT and pipes by DBMS_PIPE.
You can send and get messages with the help of this component. When TOraAlerter isstarted by Start method it waits messages in a background thread. If a message is received,
the OnEvent event occurs. If no messages were received during the TimeOut time, theOnTimeOut event occurs.
Note: Alerts are transaction-based. This means that the waiting session does not get alert
until the transaction signaling the alert commits.

Inheritance Hierarchy
TDAAlerter
TOraAlerter© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference924

Devart. All Rights
Reserved.
5.15.1.1.1 Members

TOraAlerter class overview.

Properties
Name
Active (inherited from TDAAlerter)

AutoCommit

AutoRegister (inherited from TDAAlerter)
Connection (inherited from TDAAlerter)
EventsEventTypeInterval

Session

TimeOut

Methods© 2019 Devart

Description
Used to determine if
TDAAlerter waits formessages.
Used to specify whether the
TOraAlerter object shouldcommit transaction in its
Session property after
calling the SendEventmethod to send a named
message to an Oracle
server.
Used to automaticallyregister events wheneverconnection opens.
Used to specify theconnection for TDAAlerter.
Used to set the names of
waiting alerts or pipes.
Used to define the kind of
messages used by the
TOraAleter component.
Specifies the time after
which TOraAlerter starts
waiting process.
Specifies the session for
TOraAlerter to create aninternal TOraSession object
based on this session
settings.
Used to set the time for the
TOraAlerter component towait for a message.

925

Oracle Data Access Components

Name
GetMessage

Start (inherited from TDAAlerter)

Description
Overloaded.
Returns the datatype of thenext message found in thereceived named pipe local
buffer.
Returns the datatype of thenext message found in thereceived named pipe local
buffer.
Places messages into thenamed pipe local buffer.
Removes all incoming
messages from the pipe's
input buffer.
Places messages into thenamed pipe local buffer.
Sends an event with Nameand content Message.
Sends a named pipe eventto other listening sessions.
Sends a named pipe eventto other listening sessions.
Starts waiting process.

Stop (inherited from TDAAlerter)

Stops waiting process.

UnpackMessage

Overloaded. Retrieves
messages from a named
pipe local buffer.

NextItemType

NextMessageType

PackMessage
PurgePipe
PutMessage
SendEvent (inherited from TDAAlerter)
SendMessage
SendPipeMessage

EventsName

Description
Occurs if an exception
occurs in waiting process
Occurs if a message is
received by waiting process.
Occurs if there were no
messages during the
TimeOut time.

OnError (inherited from TDAAlerter)
OnEvent
OnTimeOut© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference926

5.15.1.1.2 Properties

Properties of the TOraAlerter class.
For a complete list of the TOraAlerter class members, see the TOraAlerter Members topic.

PublicName
Active (inherited from TDAAlerter)

AutoRegister (inherited from TDAAlerter)
Connection (inherited from TDAAlerter)

Description
Used to determine if
TDAAlerter waits formessages.
Used to automaticallyregister events wheneverconnection opens.
Used to specify theconnection for TDAAlerter.

Published
Name

AutoCommit

EventsEventTypeInterval

Session

TimeOut© 2019 Devart

Description
Used to specify whether the
TOraAlerter object shouldcommit transaction in its
Session property after
calling the SendEventmethod to send a named
message to an Oracle
server.
Used to set the names of
waiting alerts or pipes.
Used to define the kind of
messages used by the
TOraAleter component.
Specifies the time after
which TOraAlerter starts
waiting process.
Specifies the session for
TOraAlerter to create aninternal TOraSession object
based on this session
settings.
Used to set the time for the
TOraAlerter component towait for a message.

927

Oracle Data Access Components

See Also
TOraAlerter ClassTOraAlerter Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.2.1 AutoCommit Property

Used to specify whether the TOraAlerter object should commit transaction in its Session
property after calling the SendEvent method to send a named message to an Oracle server.

Class
TOraAlerter

Syntaxproperty AutoCommit: boolean;

Remarks
Set the AutoCommit property to specify whether the TOraAlerter object should commit
transaction in its Session property after calling the SendEvent method to send a named
message to an Oracle server.
Setting AutoCommit to True instructs TOraAlerter to commit its session each time an event issent. Otherwise listening session will have to wait till current transaction terminates and only
then it will be notified by the server.

See Also
TDAAlerter.SendEvent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.2.2 Events Property

Used to set the names of waiting alerts or pipes.

Class
TOraAlerter

Syntax© 2019 DevartReference928

property Events: string;

Remarks
Use the Events property to set the names of alerts or pipes which are waiting.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.2.3 EventType Property

Used to define the kind of messages used by the TOraAleter component.

Class
TOraAlerter

Syntaxproperty EventType: TEventType;

Remarks
Use EventType to specify what kind of messages is used by the TOraAleter component.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.2.4 Interval Property

Specifies the time after which TOraAlerter starts waiting process.

Class
TOraAlerter

Syntaxproperty Interval: integer default 0;

Remarks
If Interval property is greater than 0, TOraAlerter starts waiting process in Interval seconds
after time out occurred.

© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

929

Oracle Data Access Components

5.15.1.1.2.5 Session Property

Specifies the session for TOraAlerter to create an internal TOraSession object based on thissession settings.

Class
TOraAlerter

Syntaxproperty Session: TOraSession;

Remarks
Specifies the session for TOraAlerter to create an internal TOraSession object based on thissession settings.
Internal TOraSession object is represented by AlerterSession property.

See Also
TOraSession
AlerterSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.2.6 TimeOut Property

Used to set the time for the TOraAlerter component to wait for a message.

Class
TOraAlerter

Syntaxproperty TimeOut: integer default 0;

Remarks
Use TimeOut property to set the time of waiting message by the TOraAlerter component.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

930

5.15.1.1.3 Methods

Methods of the TOraAlerter class.
For a complete list of the TOraAlerter class members, see the TOraAlerter Members topic.

Public
Name
GetMessage

Description
Overloaded.
Returns the datatype of thenext message found in thereceived named pipe local
buffer.
Returns the datatype of thenext message found in thereceived named pipe local
buffer.
Places messages into thenamed pipe local buffer.
Removes all incoming
messages from the pipe's
input buffer.
Places messages into thenamed pipe local buffer.
Sends an event with Nameand content Message.
Sends a named pipe eventto other listening sessions.
Sends a named pipe eventto other listening sessions.

NextItemType

NextMessageType

PackMessage
PurgePipe
PutMessage
SendEvent (inherited from TDAAlerter)
SendMessage
SendPipeMessage
Start (inherited from TDAAlerter)

Starts waiting process.

Stop (inherited from TDAAlerter)

Stops waiting process.

UnpackMessage

Overloaded. Retrieves
messages from a named
pipe local buffer.

See Also
TOraAlerter ClassTOraAlerter Class Members© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

931

Oracle Data Access Components

5.15.1.1.3.1 GetMessage Method

Class
TOraAlerter

Overload List
Name
GetMessage
GetMessage(var Item: variant)© 1997-2019
Devart. All Rights
Reserved.

Request Support

Description
Retrieves messages from a named pipe
local buffer.
Retrieves messages from a named pipe
local buffer.
DAC Forum

Provide Feedback

Retrieves messages from a named pipe local buffer.

Class
TOraAlerter

Syntaxfunction GetMessage: variant; overload;
Return Value
True, if the Item parameter holds not Null variant value or False otherwise.

Remarks
Call the GetMessage method to retrieve messages from a named pipe local buffer.
GetMessage is desined to work only with Oracle DBMS_PIPE communication package whichis the case only if TOraAlerter.EventType property has been set to etPipe.
Implemntation with the parameter will return True if the Item parameter holds not Null variant
value or False otherwise.
Note: This method is considered obsolete now. In newer projects use functionally equivalent
TOraAlerter.UnpackMessage method instead.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

932

Retrieves messages from a named pipe local buffer.

Class
TOraAlerter

Syntaxfunction GetMessage(var Item: variant): variant; overload;
Parameters
Item
Holds a value received from the pipe.
Return Value
True, if the Item parameter holds not Null variant value or False otherwise.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.3.2 NextItemType Method

Returns the datatype of the next message found in the received named pipe local buffer.

Class
TOraAlerter

Syntaxfunction NextItemType: TMessageType;
Return Value
the datatype of the next message found in the received named pipe local buffer.

Remarks
Use NextItemType to retrieve the datatype of the next message found in the received named
pipe local buffer.
NextItemType is desined to work only with Oracle DBMS_PIPE communication package
which is the case only if EventType property has been set to etPipe.
The mtNone return value indicates that no more messages are found in the local buffer.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

933

Oracle Data Access Components

5.15.1.1.3.3 NextMessageType Method

Returns the datatype of the next message found in the received named pipe local buffer.

Class
TOraAlerter

Syntaxfunction NextMessageType: TMessageType;
Return Value
the datatype of the next message found in the received named pipe local buffer.

Remarks
Use NextMessageType to retrieve the datatype of the next message found in the received
named pipe local buffer.
NextMessageType is desined to work only with Oracle DBMS_PIPE communication package
which is the case only if EventType property has been set to etPipe.
The return value of mtNone indicates that no more messages are found in the local buffer.
Note: This method is considered obsolete now. In newer projects use functionally equivalent
NextItemType method instead.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.3.4 PackMessage Method

Places messages into the named pipe local buffer.

Class
TOraAlerter

Syntax
procedure PackMessage(Item: variant);
Parameters
Item
Holds the value to be sent in a message.

Remarks
Call PackMessage to place messages into the named pipe local buffer. Local buffer is limited© 2019 DevartReference934

in size to 8192 bytes and besides the actual message values accommodates other internal
data. Item will be dropped out if it doesn't fit into available free buffer space.
PackMessage is desined to work only with the Oracle DBMS_PIPE communication package
which is the case only if the EventType property has been set to etPipe.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.3.5 PurgePipe Method

Removes all incoming messages from the pipe's input buffer.

Class
TOraAlerter

Syntax
procedure PurgePipe;

Remarks
Call PurgePipe to clear the pipe's input buffer.
PurgePipe is desined to work only with the Oracle DBMS_PIPE communication package. So
it can be called only if EventType property has been set to etPipe.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.15.1.1.3.6 PutMessage Method

Places messages into the named pipe local buffer.

Class
TOraAlerter

Syntax
procedure PutMessage(Item: variant);
Parameters
Item
Holds the value to be sent in a message.

Remarks© 2019 Devart

Provide Feedback

935

Oracle Data Access Components

Call PutMessage to place messages into the named pipe local buffer. Local buffer is limited insize to 8192 bytes and besides the actual message values accommodates other internal
data. Item will be dropped out if it doesn't fit into free buffer space.
PutMessage is desined to work only with the Oracle DBMS_PIPE communication package
which is the case only if EventType property has been set to etPipe.
Note: This method is now considered obsolete. In newer projects use functionally equivalent
PackMessage method instead.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.3.7 SendMessage Method

Sends a named pipe event to other listening sessions.

Class
TOraAlerter

Syntax
procedure SendMessage(Name: string = '');
Parameters
Name
Holds the name of the pipe.

Remarks
Use SendMessage procedure to send a named pipe event to other listening sessions. The
event internally is a local buffer which has been previously filled in by the PutMessage
method.
SendMessage is desined to work only with the Oracle DBMS_PIPE communication package
which is the case only if EventType property has been set to etPipe.
Note: This method is considered obsolete now. In newer projects use functionally equivalent
SendPipeMessage method instead.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

936

5.15.1.1.3.8 SendPipeMessage Method

Sends a named pipe event to other listening sessions.

Class
TOraAlerter

Syntax
procedure SendPipeMessage(Name: string = '');
Parameters
Name
Holds the name of the pipe.

Remarks
Use SendPipeMessage procedure to send a named pipe event to other listening sessions.
The event internally is a local buffer which has been previously filled in by the PackMessage
method.
SendPipeMessage is desined to work only with the Oracle DBMS_PIPE communication
package which is the case only if EventType property has been set to etPipe.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.3.9 UnpackMessage Method

Retrieves messages from a named pipe local buffer.

Class
TOraAlerter

Overload List
Name
UnpackMessage
UnpackMessage(var Item: variant)© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

Description
Retrieves messages from a named pipe
local buffer.
Retrieves messages from a named pipe
local buffer.
DAC Forum

Provide Feedback

937

Oracle Data Access Components

Retrieves messages from a named pipe local buffer.

Class
TOraAlerter

Syntaxfunction UnpackMessage: variant; overload;
Return Value
True, if the Item parameter holds not Null variant value or False otherwise.

Remarks
UnpackMessage function is used to retrieve messages from a named pipe local buffer.
UnpackMessage is desined to work only with the Oracle DBMS_PIPE communication
package which is the case only if TOraAlerter.EventType property has been set to etPipe.
An implementation with the parameter will return True if the Item parameter holds not Nullvariant value or False otherwise.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Retrieves messages from a named pipe local buffer.

Class
TOraAlerter

Syntaxfunction UnpackMessage(var Item: variant): variant; overload;
Parameters
Item
Holds a value received from the pipe.
Return Value
True, if the Item parameter holds not Null variant value or False otherwise.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

938

5.15.1.1.4 Events

Events of the TOraAlerter class.
For a complete list of the TOraAlerter class members, see the TOraAlerter Members topic.

PublicName

Description
Occurs if an exception
occurs in waiting process

OnError (inherited from TDAAlerter)

Published
Name

Description
Occurs if a message is
received by waiting process.
Occurs if there were no
messages during the
TimeOut time.

OnEvent
OnTimeOut

See Also
TOraAlerter ClassTOraAlerter Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.4.1 OnEvent Event

Occurs if a message is received by waiting process.

Class
TOraAlerter

Syntaxproperty OnEvent: TOnEventEvent;Remarks
Occurs when waiting process receives some message. The event parameter is the name ofan event (alert or pipe) and Message is its content.

© 2019 Devart

939

Oracle Data Access Components

See Also
OnTimeOut© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.1.1.4.2 OnTimeOut Event

Occurs if there were no messages during the TimeOut time.

Class
TOraAlerter

Syntaxproperty OnTimeOut: TOnTimeOutEvent;Remarks
Occurs when there were no messages during the TimeOut time. Assign True to the Continue
parameter to continue waiting messages. If Continue is False (by default) waiting process is
stopped.

See Also
TimeOut
OnEvent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Description
This type is used for the
TOraAlerter.OnEvent event.
This type is used for the
TOraAlerter.OnTimeOut
event.
Provide Feedback

5.15.2 Types
Types in the OraAlerter unit.

Types
Name
TOnEventEvent
TOnTimeOutEvent© 1997-2019

Request Support© 2019 DevartReference940

Devart. All Rights
Reserved.
5.15.2.1 TOnEventEvent Procedure ReferenceThis type is used for the TOraAlerter.OnEvent event.

Unit
OraAlerter

SyntaxTOnEventEvent = procedure (Sender: TObject; Event: string;
Message: string) of object;Parameters
SenderAn object that raised the event.
Event
A name of event (alert or pipe).
Message
The content of message waiting process receives.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.2.2 TOnTimeOutEvent Procedure ReferenceThis type is used for the TOraAlerter.OnTimeOut event.

Unit
OraAlerter

Syntax
TOnTimeOutEvent = procedure (Sender: TObject; var Continue:
boolean) of object;Parameters
SenderAn object that raised the event.
Continue
True, if waiting messages process should be continued. If False (by default), the waiting
process is stopped.

© 2019 Devart

941

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.3 Enumerations
Enumerations in the OraAlerter unit.

Enumerations
Name

Description
Specifies the kind of
messages used by the
TOraAlerter component.

TEventType© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.15.3.1 TEventType Enumeration

Specifies the kind of messages used by the TOraAlerter component.

Unit
OraAlerter

SyntaxTEventType = (etAlert, etPipe);

ValuesValue
etAlertetPipe© 1997-2019
Devart. All Rights
Reserved.

5.16

Meaning
Lets all listening sessions be notified when another session
broadcasts its message with the corresponding name parameter.
The default value.
Causes only one of the listening sessions to receive a message.
Request Support

DAC Forum

Provide Feedback

OraAQ
This unit contains ODAC components for working with Oracle Advanced Queueing.

Classes© 2019 DevartReference

Name

TDequeueOptions

TEnqueueOptions

TOraQueue
TOraQueueAdmin
TOraQueueTable
TQueueAgent
TQueueAgents
TQueueMessage
TQueueMessageProperties

942

Description
A base class for setting
default dequeue options forthe queue or for using
special dequeue options
when calling the
TOraQueue.Dequeue or
TOraQueue.DequeueArraymethods.
A base class for setting
default or special enqueue
options for a queue.
A component providing
access to Oracle Streams
Advanced Queuing.
A component for managing
queues in a database.
A component managing
queue tables in a database.
A class reperesenting a
producer or a consumer of aqueue message.
A class holding a collectionof the TQueueAgent objects.
A class representing aqueue message.
A class for setting orproviding queue message
properties.

Types
Name
TQueueMessageEvent

Description
This type is used for the
TOraQueue.OnMessage
event.

Enumerations
Name
TDequeueMode© 2019 Devart

Description
Specifies the locking
behavior associated with thedequeue.

943

Oracle Data Access Components

Specifies the type of themessage that will bedequeued.
Specifies the message
grouping behavior in thequeues based on this table.
Specifies the message
state.
Specifies the position of themessage that will be
retrieved.
Specifies if a message
should be enqueued before
other messages.
Specifies the columnt thatwill be used as a sort key.
Specifies whether the queue
being created is an
exception queue or a normal
queue.
Specifies the transaction
behaviour of the dequeue orenqueue request.

TQueueDeliveryMode

TQueueMessageGrouping
TQueueMessageState
TQueueNavigation

TQueueSequenceDeviation
TQueueSortList

TQueueType

TQueueVisibility© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1 Classes
Classes in the OraAQ unit.

ClassesName

TDequeueOptions

Description
A base class for setting
default dequeue options forthe queue or for using
special dequeue options
when calling the
TOraQueue.Dequeue or
TOraQueue.DequeueArraymethods.

TEnqueueOptions

A base class for setting
default or special enqueue© 2019 DevartReference

options for a queue.
A component providing
access to Oracle Streams
Advanced Queuing.
A component for managing
queues in a database.
A component managing
queue tables in a database.
A class reperesenting a
producer or a consumer of aqueue message.
A class holding a collectionof the TQueueAgent objects.
A class representing aqueue message.
A class for setting orproviding queue message
properties.

TOraQueue
TOraQueueAdmin
TOraQueueTable
TQueueAgent
TQueueAgents
TQueueMessage
TQueueMessageProperties© 1997-2019
Devart. All Rights
Reserved.

Request Support

944

DAC Forum

Provide Feedback

5.16.1.1 TDequeueOptions ClassA base class for setting default dequeue options for the queue or for using special dequeue
options when calling the TOraQueue.Dequeue or TOraQueue.DequeueArray methods.
For a list of all members of this type, see TDequeueOptions members.

Unit
OraAQ

Syntax
TDequeueOptions = class(TPersistent);

Remarks
Use the TDequeueOptions class for setting default dequeue options for the queue or for using
special dequeue options when calling TOraQueue.Dequeue or TOraQueue.DequeueArraymethods.

See Also
TOraQueue.Dequeue© 2019 Devart

945

Oracle Data Access Components

TOraQueue.DequeueArray
TOraQueue.DequeueOptions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.1.1 Members

TDequeueOptions class overview.

Properties
Name
ConsumerName
Correlation

DeliveryMode

DequeueCondition

DequeueMode

MessageId

Navigation

Transformation

Visibility
WaitTimeout

Description
Used to specify the name of
the consumer.
Used to specify thecorrelation identifier of themessage to be dequeued.
Used to specify the type ofthe message that will bedequeued.
Used to specify theconditional expression
based on the message
properties, the message
data properties, and PL/
SQL functions.
Used to specify the locking
behaviour associated withthe dequeue.
Used to specify themessage ID for themessage to be dequeued.
Used to specify the positionof the message that will be
retrieved.
Used to specify atransformation that will beapplied after dequeuing themessage.
Used to specify thetransactional behavior of thedequeue request.
Specifies the time to wait if
there is no message© 2019 DevartReference

946

matching the search criteria.
© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.1.2 Properties

Properties of the TDequeueOptions class.
For a complete list of the TDequeueOptions class members, see the TDequeueOptions
Members topic.

PublicName
MessageId

Description
Used to specify themessage ID for themessage to be dequeued.

Published
Name
ConsumerName
Correlation

DeliveryMode

DequeueCondition

DequeueModeNavigation
Transformation© 2019 Devart

Description
Used to specify the name of
the consumer.
Used to specify thecorrelation identifier of themessage to be dequeued.
Used to specify the type ofthe message that will bedequeued.
Used to specify theconditional expression
based on the message
properties, the message
data properties, and PL/
SQL functions.
Used to specify the locking
behaviour associated withthe dequeue.
Used to specify the positionof the message that will be
retrieved.
Used to specify atransformation that will be947

Oracle Data Access Components

applied after dequeuing themessage.
Used to specify thetransactional behavior of thedequeue request.
Specifies the time to wait if
there is no message
matching the search criteria.

Visibility

WaitTimeout

See Also
TDequeueOptions Class
TDequeueOptions Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.1.2.1 ConsumerName Property

Used to specify the name of the consumer.

Class
TDequeueOptions

Syntaxproperty ConsumerName: string;

Remarks
Use ConsumerName property to specify the name of the consumer.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.1.2.2 Correlation Property

Used to specify the correlation identifier of the message to be dequeued.

Class
TDequeueOptions

Syntaxproperty Correlation: string;© 2019 DevartReference

948

Remarks
Use Correlation property to specify the correlation identifier of the message to be dequeued.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.1.2.3 DeliveryMode Property

Used to specify the type of the message that will be dequeued.

Class
TDequeueOptions

Syntaxproperty DeliveryMode: TQueueDeliveryMode default qdmPersistent;

Remarks
Use the DeliveryMode property to specify the type of the message that will be dequeued. Use
it with Oracle 10 and higher.

See Also
TEnqueueOptions.DeliveryMode
TQueueMessageProperties.DeliveryMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.1.2.4 DequeueCondition Property

Used to specify the conditional expression based on the message properties, the message
data properties, and PL/SQL functions.

Class
TDequeueOptions

Syntaxproperty DequeueCondition: string;

Remarks© 2019 Devart

949

Oracle Data Access Components

Use DequeueCondition property to specify the conditional expression based on the message
properties, the message data properties, and PL/SQL functions. It should be a boolean
expression like a SQL WHERE clause. DequeueCondition should not exceed 4000
characters.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.1.2.5 DequeueMode Property

Used to specify the locking behaviour associated with the dequeue.

Class
TDequeueOptions

Syntaxproperty DequeueMode: TDequeueMode default dqmRemove;

Remarks
Use DequeueMode property to specify the locking behavior associated with the dequeue.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.1.2.6 MessageId Property

Used to specify the message ID for the message to be dequeued.

Class
TDequeueOptions

Syntaxproperty MessageId: string;

Remarks
Use the MessageId property to specify the message ID for the message to be dequeued.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

950

5.16.1.1.2.7 Navigation Property

Used to specify the position of the message that will be retrieved.

Class
TDequeueOptions

Syntaxproperty Navigation: TQueueNavigation default qnNextMessage;

Remarks
Use the Navigation property to specify the position of the message that will be retrieved.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.1.2.8 Transformation Property

Used to specify a transformation that will be applied after dequeuing the message.

Class
TDequeueOptions

Syntaxproperty Transformation: string;

Remarks
Use the Transformation property to specify a transformation that will be applied after
dequeuing the message. Use it with Oracle 10 and higher.

See Also
TEnqueueOptions.Transformation© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.16.1.1.2.9 Visibility Property

Used to specify the transactional behavior of the dequeue request.

Class© 2019 Devart

Provide Feedback

951

Oracle Data Access Components

TDequeueOptions

Syntaxproperty Visibility: TQueueVisibility default qvOnCommit;

Remarks
Use Visibility property to specify the transactional behavior of the dequeue request.

See Also
TEnqueueOptions.Visibility© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.1.2.10 WaitTimeout Property

Specifies the time to wait if there is no message matching the search criteria.

Class
TDequeueOptions

Syntaxproperty WaitTimeout: integer default AQ_FOREVER;

Remarks
Use WaitTimeout property to specify the wait time in seconds if there is currently no message
matching the search criteria available. You can use constants AQ_FOREVER (the default
value - wait forever) and AQ_NO_WAIT (do not wait).

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.2 TEnqueueOptions ClassA base class for setting default or special enqueue options for a queue.
For a list of all members of this type, see TEnqueueOptions members.

Unit
OraAQ

© 2019 DevartReference

952

SyntaxTEnqueueOptions = class(TPersistent);

Remarks
Use the TEnqueueOptions class for setting default enqueue options for a queue or for using
special enqueue options when calling TOraQueue.Enqueue or the
TOraQueue.EnqueueArraymethod.

See Also
TOraQueue.Enqueue
TOraQueue.EnqueueArray
TOraQueue.EnqueueOptions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.2.1 Members

TEnqueueOptions class overview.

Properties
Name
DeliveryMode

RelativeMessageId

SequenceDeviation

Transformation

Visibility© 2019 Devart

Description
Used to specify the type ofthe message that will beenqueued.
Used to specify themessage identifier of themessage which is used in
the sequence deviation
operation.
Used to specify whether theenqueued message should
be dequeued before othermessages that are in thequeue already.
Used to specify thetransformation that will beapplied before enqueuing amessage.
Used to specify thetransactional behavior of the953

Oracle Data Access Components

enqueue request.
© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.2.2 Properties

Properties of the TEnqueueOptions class.
For a complete list of the TEnqueueOptions class members, see the TEnqueueOptions
Members topic.

PublicName
RelativeMessageId

Description
Used to specify themessage identifier of themessage which is used in
the sequence deviation
operation.

Published
Name
DeliveryMode

SequenceDeviation

Transformation

Visibility

Description
Used to specify the type ofthe message that will beenqueued.
Used to specify whether theenqueued message should
be dequeued before othermessages that are in thequeue already.
Used to specify thetransformation that will beapplied before enqueuing amessage.
Used to specify thetransactional behavior of theenqueue request.

See Also
TEnqueueOptions Class
TEnqueueOptions Class Members© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

954

Provide Feedback

5.16.1.2.2.1 DeliveryMode Property

Used to specify the type of the message that will be enqueued.

Class
TEnqueueOptions

Syntaxproperty DeliveryMode: TQueueDeliveryMode default qdmPersistent;

Remarks
Use the DeliveryMode property to specify the type of the message that will be enqueued. Use
it with Oracle 10 and higher.

See Also
TDequeueOptions.DeliveryMode
TQueueMessageProperties.DeliveryMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.2.2.2 RelativeMessageId Property

Used to specify the message identifier of the message which is used in the sequence
deviation operation.

Class
TEnqueueOptions

Syntaxproperty RelativeMessageId: string;

Remarks
Use the RelativeMsgid property to specify the message identifier of the message which isused in the sequence deviation operation. Ignored if SequenceDeviation is not set to
sdBefore.

© 2019 Devart

955

Oracle Data Access Components

See Also
SequenceDeviation© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.2.2.3 SequenceDeviation Property

Used to specify whether the enqueued message should be dequeued before other messages
that are in the queue already.

Class
TEnqueueOptions

Syntaxproperty SequenceDeviation: TQueueSequenceDeviation default
qsdNone;See Also
RelativeMessageId© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.2.2.4 Transformation Property

Used to specify the transformation that will be applied before enqueuing a message.

Class
TEnqueueOptions

Syntaxproperty Transformation: string;

Remarks
Use the Transformation property to specify a transformation that will be applied before
enqueuing a message. Use it with Oracle 10 and higher.

See Also
TDequeueOptions.Transformation© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

956

Provide Feedback

5.16.1.2.2.5 Visibility Property

Used to specify the transactional behavior of the enqueue request.

Class
TEnqueueOptions

Syntaxproperty Visibility: TQueueVisibility default qvOnCommit;

Remarks
Use the Visibility property to specify the transactional behavior of the enqueue request.

See Also
TDequeueOptions.Visibility© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3 TOraQueue Class

A component providing access to Oracle Streams Advanced Queuing.
For a list of all members of this type, see TOraQueue members.

Unit
OraAQ

SyntaxTOraQueue = class(TComponent);

Remarks
The TOraQueue component provides access to Oracle Streams Advanced Queuing. It
allows to enqueue and dequeue messages and to listen to the queue.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

957

Oracle Data Access Components

5.16.1.3.1 Members

TOraQueue class overview.

Properties
Name
AsyncNotification

DequeueOptions

EnqueueMessageProperties

EnqueueOptions

PayloadArrayTypeName

PayloadTypeName
QueueName
SessionDescription
Used to generate theOnMessage event each time
when a new message isenqueued.
Used to set the default
message dequeuing
options.
Used to set the default
enqueuing message
properties.
Used to set the default
message enqueuing
options.
Contains the type name ofassociative array, VARRAY,
or nested table of queue
payload type.
Contains the payload type
for the queue.
Used to set the name of the
Oracle queue to operation.
Used to specify the session
through which a queue will
be controlled.

Methods
Name
DequeueDequeueArray
Enqueue
EnqueueArray
ListenDescription
Overloaded. Dequeues
messages.
Dequeues an array of
messages.
Overloaded. Enqueues
messages.
Enqueues an array of
messages.
Overloaded. Listens to one© 2019 DevartReference958

or more queues on behalf ofthe list of agents.

EventsName

Description
Occurs when new messages
are enqueued.

OnMessage© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.2 Properties

Properties of the TOraQueue class.
For a complete list of the TOraQueue class members, see the TOraQueue Members topic.

PublicName
PayloadArrayTypeName

PayloadTypeName

Description
Contains the type name ofassociative array, VARRAY,
or nested table of queue
payload type.
Contains the payload type
for the queue.

Published
Name
AsyncNotification

DequeueOptions

EnqueueMessageProperties

EnqueueOptions© 2019 Devart

Description
Used to generate theOnMessage event each time
when a new message isenqueued.
Used to set the default
message dequeuing
options.
Used to set the default
enqueuing message
properties.
Used to set the default
message enqueuing
options.

959

Oracle Data Access Components

Used to set the name of the
Oracle queue to operation.
Used to specify the session
through which a queue will
be controlled.

QueueName
SessionSee Also
TOraQueue Class
TOraQueue Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.2.1 AsyncNotification Property

Used to generate the OnMessage event each time when a new message is enqueued.

Class
TOraQueue

Syntaxproperty AsyncNotification: boolean default False;

Remarks
If the AsyncNotification propery is True, the TOraQueue component will generate theOnMessage event each time when a new message is enqueued.
When setting the AsyncNotification value to True, a message subscription is created in thequeue. When setting the property value to False, the subscription is unregistered.
Active session is required to change the value of AsyncNotification, but TOraQueue doesn't
need a session to get notifications. You can disconnect after setting the AsyncNotification
value.
AsyncNotification property works only if OCI is initialized with the OCI_EVENTS flag. By
default ODAC sets this flag if the OCI version is 9.0 or higher. If you need to use
AsyncNotification with Oracle client 8.1, you should set the OCIEventsVersion variable from
OraCall unit to 8100 in the initialization section of one of your program units.
AsyncNotification is not supported in Direct mode.
Note, the Oracle client version 8.1 has a bug when the NAMES.DEFAULT_DOMAIN
parameter in the sqlnet.ora file is not working when the OCI_EVENTS flag is set.

© 2019 DevartReference

960

See Also
OnMessage© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.2.2 DequeueOptions Property

Used to set the default message dequeuing options.

Class
TOraQueue

Syntaxproperty DequeueOptions: TDequeueOptions;Remarks
Use the DequeueOptions property to set the default message dequeuing options.

See Also
TDequeueOptions
EnqueueOptions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.2.3 EnqueueMessageProperties Property

Used to set the default enqueuing message properties.

Class
TOraQueue

Syntaxproperty EnqueueMessageProperties: TQueueMessageProperties;

Remarks
Use the EnqueueMessageProperties property to set the default enqueuing message
properties.

© 2019 Devart

961

Oracle Data Access Components

See Also
TQueueMessageProperties© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.2.4 EnqueueOptions Property

Used to set the default message enqueuing options.

Class
TOraQueue

Syntaxproperty EnqueueOptions: TEnqueueOptions;Remarks
Use the EnqueueOptions property to set the default message enqueuing options.

See Also
TEnqueueOptions
DequeueOptions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.2.5 PayloadArrayTypeName Property

Contains the type name of associative array, VARRAY, or nested table of queue payload type.

Class
TOraQueue

Syntaxproperty PayloadArrayTypeName: string;

Remarks
The PayLoadArrayTypeName property contains the type name of associative array, VARRAY,
or nested table of queue payload type. It is used by EnqueueArray and DequeueArray© 2019 DevartReference

962

functions.

See Also
EnqueueArray
DequeueArray
PayloadTypeName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.2.6 PayloadTypeName Property

Contains the payload type for the queue.

Class
TOraQueue

Syntaxproperty PayloadTypeName: string;

Remarks
The PayloadTypeName property contains the payload type for the queue. PayloadType canbe 'RAW' or the name of an object type. PayloadType value is used in Dequeue method. Ifvalue of the property is not set then Dequeue method will get payload type from the server
before dequeuing message.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.16.1.3.2.7 QueueName Property

Used to set the name of the Oracle queue to operation.

Class
TOraQueue

Syntaxproperty QueueName: string;

Remarks© 2019 Devart

Provide Feedback

963

Oracle Data Access Components

Use the QueueName property to set the name of the Oracle queue to operation.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.2.8 Session Property

Used to specify the session through which a queue will be controlled.

Class
TOraQueue

Syntaxproperty Session: TOraSession;

Remarks
Use the Session property to specify the session through which a queue will be controlled.

See Also
TOraSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.3 Methods

Methods of the TOraQueue class.
For a complete list of the TOraQueue class members, see the TOraQueue Members topic.

PublicName
DequeueDequeueArray
Enqueue
EnqueueArray
ListenDescription
Overloaded. Dequeues
messages.
Dequeues an array of
messages.
Overloaded. Enqueues
messages.
Enqueues an array of
messages.
Overloaded. Listens to one
or more queues on behalf of© 2019 DevartReference964

the list of agents.

See Also
TOraQueue Class
TOraQueue Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Name
Dequeue(Payload: TOraObject;
MessageProperties:
TQueueMessageProperties;
DequeueOptions: TDequeueOptions)
Dequeue(Message: TQueueMessage;
DequeueOptions: TDequeueOptions)
Dequeue(out Payload: TBytes;
MessageProperties:
TQueueMessageProperties;
DequeueOptions: TDequeueOptions)
Dequeue(out Payload: string;
MessageProperties:
TQueueMessageProperties;
DequeueOptions: TDequeueOptions)© 1997-2019
Request Support
Devart. All Rights
Reserved.

Description

Provide Feedback

5.16.1.3.3.1 Dequeue Method

Dequeues messages.

Class
TOraQueue

Overload List

Dequeueus a message as a TOraObject.

Class
TOraQueue© 2019 Devart

Dequeueus a message as a TOraObject.

Dequeueus messages.

Dequeueus a message as array of Byte.

Dequeues string messages.

DAC Forum

Provide Feedback

965

Oracle Data Access Components

Syntaxfunction Dequeue(Payload: TOraObject; MessageProperties:
TQueueMessageProperties = nil; DequeueOptions: TDequeueOptions =nil): TMessageId; overload;
Parameters
PayloadHolds a message content as a TOraObject.
MessageProperties
Holds the properties of a message that will be dequeued.
DequeueOptions
Holds the options for dequeueing messages.
Return Valuemessage ID as string.

Remarks
Use one of Dequeue method overloads to dequeue messages. Use overloads with string or
TBytes payload for queues with the RAW payload type. For queues with the object payload
type pass TOraObject instance with appropriate object type to Dequeue method. If
DequeueOptions parameter was not specified, the TOraQueue.DequeueOptions property of
TOraQueue component will be used. MessageProperties parameter will be filled with theproperties of the dequeued message.
In Direct mode only queues with RAW payload are supported.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Dequeueus messages.

Class
TOraQueue

Syntaxfunction Dequeue(Message: TQueueMessage; DequeueOptions:
TDequeueOptions = nil): TMessageId; overload;
Parameters
Message
Holds the message content.

© 2019 DevartReference

966

DequeueOptions
Holds the options for dequeueing messages.
Return Valuemessage ID as string.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Dequeueus a message as array of Byte.

Class
TOraQueue

Syntaxfunction Dequeue(out Payload: TBytes; MessageProperties:
TQueueMessageProperties = nil; DequeueOptions: TDequeueOptions =nil): TMessageId; overload;
Parameters
PayloadHolds the message content as array of Byte.
MessageProperties
Holds the properties of a message that will be dequeued.
DequeueOptions
Holds the options for dequeueing messages.
Return Valuemessage ID as string.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Dequeues string messages.

Class
TOraQueue

Syntaxfunction Dequeue(out Payload: string; MessageProperties:
TQueueMessageProperties = nil; DequeueOptions: TDequeueOptions =nil): TMessageId; overload;© 2019 Devart

967

Oracle Data Access Components

Parameters
PayloadHolds a message as string.
MessageProperties
Holds the properties of a message that will be dequeued.
DequeueOptions
Holds the options for dequeueing messages.
Return Valuemessage ID as string.

See Also
TOraQueue.OnMessage
TOraQueue.DequeueOptions
TOraQueue.Enqueue
TOraQueue.DequeueArray
TQueueMessage
TDequeueOptions
TQueueMessageProperties
TOraObject© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.3.2 DequeueArray Method

Dequeues an array of messages.

Class
TOraQueue

Syntaxfunction DequeueArray(const MessageArray: array of TQueueMessage;out DequeuedSize: integer; DequeueOptions: TDequeueOptions = nil):
TMessageIds;
Parameters
MessageArray
An array of messages to dequeue.
DequeuedSize
Returns the number of dequeued messages.
© 2019 DevartReference

968

DequeueOptions
Holds the options for dequeueing messages.
Return Valuean array of message IDs.

Remarks
Use DequeueArray method to dequeue an array of messages. If DequeueOptions parameter
was not specified, DequeueOptions property of TOraQueue component will be used.
DequeuedSize returns the number of the dequeued messages.

See Also
OnMessage
TDequeueOptions
Dequeue
EnqueueArray
TQueueMessage
TQueueMessageProperties
TOraObject© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Name
Enqueue(Payload: TOraObject;
MessageProperties:
TQueueMessageProperties;
EnqueueOptions: TEnqueueOptions)
Enqueue(Message: TQueueMessage;
EnqueueOptions: TEnqueueOptions)
Enqueue(const Payload: TBytes;
MessageProperties:
TQueueMessageProperties;

Description

Provide Feedback

5.16.1.3.3.3 Enqueue Method

Enqueues messages.

Class
TOraQueue

Overload List

© 2019 Devart

Enqueueus a message as TOraObject.

Enqueues messages.
Enqueueus a message as array of Byte.

969

Oracle Data Access Components

EnqueueOptions: TEnqueueOptions)
Enqueue(const Payload: string;
MessageProperties:
TQueueMessageProperties;
EnqueueOptions: TEnqueueOptions)© 1997-2019
Request Support
Devart. All Rights
Reserved.

Enqueues string messages.

DAC Forum

Provide Feedback

Enqueueus a message as TOraObject.

Class
TOraQueue

Syntaxfunction Enqueue(Payload: TOraObject; MessageProperties:
TQueueMessageProperties = nil; EnqueueOptions: TEnqueueOptions =nil): TMessageId; overload;
Parameters
Payloada message content as a TOraObject.
MessageProperties
Holds the properties of the message which will be enqueued.
EnqueueOptions
Holds the options fore enqueueing messages.
Return Valuea message ID.

Remarks
Use one of the Enqueue method overloads to enqueue messages. Use overloads with string
or TBytes payload for queues with the RAW payload type. For queues with object payload
type pass the TOraObject instance with appropriate object type to the Enqueue method. If
EnqueueOptions or MessageProperies parameters were not specified, the
TOraQueue.EnqueueOptions and TOraQueue.EnqueueMessageProperties properties of
TOraQueue component will be used.
In Direct mode only queues with RAW payload are supported.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

970

Enqueues messages.

Class
TOraQueue

Syntaxfunction Enqueue(Message: TQueueMessage; EnqueueOptions:
TEnqueueOptions = nil): TMessageId; overload;
Parameters
Message
Holds the message content.
EnqueueOptions
Holds the options fore enqueueing messages.
Return Valuea message ID.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Enqueueus a message as array of Byte.

Class
TOraQueue

Syntaxfunction Enqueue(const Payload: TBytes; MessageProperties:
TQueueMessageProperties = nil; EnqueueOptions: TEnqueueOptions =nil): TMessageId; overload;
Parameters
PayloadHolds the message content as array of Byte.
MessageProperties
Holds the properties of the message which will be enqueued.
EnqueueOptions
Holds the options fore enqueueing messages.
Return Valuea message ID.

© 1997-2019© 2019 Devart

Request Support

DAC Forum

Provide Feedback

971

Oracle Data Access Components

Devart. All Rights
Reserved.
Enqueues string messages.

Class
TOraQueue

Syntaxfunction Enqueue(const Payload: string; MessageProperties:
TQueueMessageProperties = nil; EnqueueOptions: TEnqueueOptions =nil): TMessageId; overload;
Parameters
PayloadHolds a message as a string.
MessageProperties
Holds the properties of the message which will be enqueued.
EnqueueOptions
Holds the options fore enqueueing messages.
Return Valuea message ID.

See Also
TOraQueue.OnMessage
TOraQueue.EnqueueOptions
TOraQueue.EnqueueMessageProperties
TOraQueue.Dequeue
TQueueMessage
TEnqueueOptions
TQueueMessageProperties
TOraObject© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.3.4 EnqueueArray Method

Enqueues an array of messages.

Class© 2019 DevartReference

972

TOraQueue

Syntaxfunction EnqueueArray(const MessageArray: array of TQueueMessage;
EnqueueOptions: TEnqueueOptions = nil): TMessageIds;
Parameters
MessageArray
Holds an array of messages to enqueue.
EnqueueOptions
Holds the options for enqueueing messages.
Return Valuean array of message IDs.

Remarks
Use the EnqueueArray method to enqueue an array of messages. If the EnqueueOptions
parameter was not specified, the EnqueueOptions property of TOraQueue will be used.
DequeuedSize returns the number of dequeued messages.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.3.5 Listen Method

Listens to one or more queues on behalf of the list of agents.

Class
TOraQueue

Overload List
Name
Listen(Agents: TQueueAgents; Agent:
TQueueAgent; WaitTimeout: integer)
Listen(Agents: TQueueAgents;
ListDeliveryMode: TQueueDeliveryMode;
Agent: TQueueAgent; var
MessageDeliveryMode:
TQueueDeliveryMode; WaitTimeout:
integer)

Description
Listens to one or more queues on behalf ofthe list of agents.

© 1997-2019

DAC Forum© 2019 Devart

Request Support

Listens to one or more queues on behalf ofthe list of agents.

Provide Feedback

973

Oracle Data Access Components

Devart. All Rights
Reserved.
Listens to one or more queues on behalf of the list of agents.

Class
TOraQueue

Syntax
procedure Listen(Agents: TQueueAgents; Agent: TQueueAgent;
WaitTimeout: integer = AQ_FOREVER); overload;
Parameters
AgentsHolds the list of the agents.
Agent
Holds the agent name when monitoring multiconsumer queues.
WaitTimeout
Holds the amount of time to wait if there are no messages found.

Remarks
Call the Listen method to listen to one or more queues on behalf of the list of agents. You
specify the queue to be monitored in the address field of each agent listed. You must also
specify the name of the agent when monitoring multiconsumer queues. For single-consumer
queues, an agent name must not be specified. Only local queues are supported asaddresses.
This is a blocking call that returns when there is a message ready for consumption for an
agent in the list. If there are messages for more than one agent, only the first agent listed isreturned. If there are no messages found when the wait time expires, an error is raised.
A successful return from the LISTEN call is only an indication that there is a message for oneof the listed agents in one of the specified queues. The interested agent must still dequeue
the relevant message.
Second overload with DeliveryMode is supported starting with Oracle 10. DeliveryMode
possible values are described in TDequeueOptions.DeliveryMode topic.

See Also
TDequeueOptions.DeliveryMode
TQueueAgent
TQueueAgents© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

974

Provide Feedback

Listens to one or more queues on behalf of the list of agents.

Class
TOraQueue

Syntax
procedure Listen(Agents: TQueueAgents; ListDeliveryMode:
TQueueDeliveryMode; Agent: TQueueAgent; var MessageDeliveryMode:
TQueueDeliveryMode; WaitTimeout: integer = AQ_FOREVER); overload;
Parameters
AgentsHolds the list of the agents.
ListDeliveryMode
Holds the message type (persistent, buffered messages or both).
Agent
Holds the agent name when monitoring multiconsumer queues.
MessageDeliveryMode
Holds the message type along with the queue and consumer for whom there is a message.
WaitTimeout
Holds the amount of time to wait if there are no messages found.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.4 Events

Events of the TOraQueue class.
For a complete list of the TOraQueue class members, see the TOraQueue Members topic.

Published
Name
OnMessage

See Also
TOraQueue Class© 2019 Devart

Description
Occurs when new messages
are enqueued.

975

Oracle Data Access Components

TOraQueue Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.3.4.1 OnMessage Event

Occurs when new messages are enqueued.

Class
TOraQueue

Syntaxproperty OnMessage: TQueueMessageEvent;Remarks
Use OnMessage event handler to get notifications when new messages are enqueued. Set
the AsyncNotification property to True to get OnMessage events.
To get the payload for the message assign MessageId value passed to the event handler tothe TDequeueOptions.MessageId property in DequeueOptions and then call
TOraQueue.Dequeue.

See Also
AsyncNotification
TQueueMessageProperties
DequeueOptions
TDequeueOptions.MessageId© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4 TOraQueueAdmin Class

A component for managing queues in a database.
For a list of all members of this type, see TOraQueueAdmin members.

Unit
OraAQ

Syntax© 2019 DevartReference

976

TOraQueueAdmin = class(TComponent);

Remarks
Use the TOraQueueAdmin component to manage queues in a database.
Database user must have AQ_ADMINISTRATOR_ROLE to work with TOraQueueAdmin
component.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.1 Members

TOraQueueAdmin class overview.

Properties
Name
Comment

MaxRetries

MultipleConsumers

QueueName
QueueTableName

QueueType

RetentionTime

RetryDelay© 2019 Devart

Description
Used to get or set the userspecified description of thequeue.
Used to specify the numberof attempts to dequeue
message.
Enables the possibility ofusing definite table forqueues that can havemultiple consumers for eachmessage.
Used to set the name of the
Oracle queue to operate.
Used to set or get the queue
table for the queue.
Indicates whether the queue
being created is an
exception queue or a normal
queue.
Used to set the time inseconds for which amessage remains in thequeue after being
dequeued.
Used to get or set delay timein seconds before themessage that failed to be977

Oracle Data Access Components

Sessiondequeued, will be scheduled
to processing again.
Used to specify the session
through which queues will be
managed.

Methods
Name
AddSubscriber
AlterComment
AlterMaxRetries
AlterPropagationSchedule
AlterQueue
AlterRetentionTime

AlterRetryDelay

AlterSubscriber

CreateQueue

DisablePropagationSchedule

DropQueue

EnablePropagationSchedule

Description
Adds a subscriber to thequeue.
Alters the user-definedqueue description.
Alters the number ofattempts to dequeue amessage.
Alters parameters for a
propagation schedule.
Alters queue properties.
Alters the time in seconds
during which a message
remains in the queue after
being dequeued.
Alters the delay time inseconds before themessage, which failed to bedequeued, will be scheduled
to processing again.
Alters the rule andtransformation properties ofa queue subscriber.
Creates a queue with thename, specified by the
TOraQueueAdmin.QueueNa
me property.
Disables a propagation
schedule.
Drops the queue specified
by theTOraQueueAdmin.QueueNa
me property.
Enables a previously
disabled propagation© 2019 DevartReference

schedule.
Provides the list of queue
subscribers.
Grants queue privilege to the
grantee.
Reads the information about
a queue specified by the
TOraQueueAdmin.QueueNa
me property from thedatabase to a
TOraQueueAdmin
component.
Removes a subscriber fromthe queue.
Revokes queue privilege
from a grantee.
Schedules the propagationof messages from the queue
to a destination identified bya specific database link.
Enables dequeueing on aqueue.
Enables enqueueing on aqueue.
Enables enqueueing,dequeueing, or both on aqueue.
Disables dequeueing on aqueue.
Disables enqueueing on aqueue.
Stops enqueueing,dequeueing, or both on aqueue.
Unschedules previously
scheduled propagation of
messages from the queue tothe specified destination.
Verifies that the current
queue and destination
queue have the same type.

GetSubscribers
GrantQueuePrivilege

ReadQueueProperties

RemoveSubscriber
RevokeQueuePrivilege

SchedulePropagation

StartDequeueStartEnqueueStartQueue
StopDequeue
StopEnqueue
StopQueue

UnschedulePropagation

VerifyQueueTypes© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

978

DAC Forum

Provide Feedback

979

Oracle Data Access Components

5.16.1.4.2 Properties

Properties of the TOraQueueAdmin class.
For a complete list of the TOraQueueAdmin class members, see the TOraQueueAdmin
Members topic.

Published
Name
Comment

MaxRetries

MultipleConsumers

QueueName
QueueTableName

QueueType

RetentionTime

RetryDelay

SessionDescription
Used to get or set the userspecified description of thequeue.
Used to specify the numberof attempts to dequeue
message.
Enables the possibility ofusing definite table forqueues that can havemultiple consumers for eachmessage.
Used to set the name of the
Oracle queue to operate.
Used to set or get the queue
table for the queue.
Indicates whether the queue
being created is an
exception queue or a normal
queue.
Used to set the time inseconds for which amessage remains in thequeue after being
dequeued.
Used to get or set delay timein seconds before themessage that failed to bedequeued, will be scheduled
to processing again.
Used to specify the session
through which queues will be
managed.

See Also
TOraQueueAdmin Class© 2019 DevartReference

980

TOraQueueAdmin Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.2.1 Comment Property

Used to get or set the user-specified description of the queue.

Class
TOraQueueAdmin

Syntaxproperty Comment: string;

Remarks
Call the Comment property to get or set the user-specified description of the queue.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.2.2 MaxRetries Property

Used to specify the number of attempts to dequeue message.

Class
TOraQueueAdmin

Syntaxproperty MaxRetries: integer default AQ_NOT_DEFINED;

Remarks
Use the MaxRetries property to specify the number of attempts to dequeue message.

See Also
RetryDelay© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

981

Oracle Data Access Components

5.16.1.4.2.3 MultipleConsumers Property

Enables the possibility of using definite table for queues that can have multiple consumers foreach message.

Class
TOraQueueAdmin

Syntaxproperty MultipleConsumers: boolean default False;

Remarks
Should be set to True to use definite table for queues that can have multiple consumers foreach message. False is the default value and means that queues, based on this table canhave only one consumer for each message.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.2.4 QueueName Property

Used to set the name of the Oracle queue to operate.

Class
TOraQueueAdmin

Syntaxproperty QueueName: string;

Remarks
Use the QueueName property to set the name of the Oracle queue to operate.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.2.5 QueueTableName Property

Used to set or get the queue table for the queue.

Class
TOraQueueAdmin© 2019 DevartReference

982

Syntaxproperty QueueTableName: string;

Remarks
Use the QueueTableName property to set or get the queue table for the queue.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.2.6 QueueType Property

Indicates whether the queue being created is an exception queue or a normal queue.

Class
TOraQueueAdmin

Syntaxproperty QueueType: TQueueType default qtNormalQueue;

Remarks
Use the QueueType property to specify whether the queue being created is an exception
queue or a normal queue. Only the dequeue operation is allowed in the exception queue. The
default value is qtNormalQueue.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.2.7 RetentionTime Property

Used to set the time in seconds for which a message remains in the queue after being
dequeued.

Class
TOraQueueAdmin

Syntaxproperty RetentionTime: integer default 0;

Remarks© 2019 Devart

983

Oracle Data Access Components

Use the RetentionTime property to set the time in seconds for which a message remains in
the queue after being dequeued. The default value is 0.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.2.8 RetryDelay Property

Used to get or set delay time in seconds before the message that failed to be dequeued, will
be scheduled to processing again.

Class
TOraQueueAdmin

Syntaxproperty RetryDelay: integer default 0;

Remarks
Use the RetryDelay property to get or set delay time in seconds before the message thatfailed to be dequeued, will be scheduled to processing again. The default value is 0. Useless if
MaxRetries property is set to 0.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.2.9 Session Property

Used to specify the session through which queues will be managed.

Class
TOraQueueAdmin

Syntaxproperty Session: TOraSession;

Remarks
Use the Session property to specify the session through which queues will be managed.

See Also
TOraSession© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

984

Provide Feedback

5.16.1.4.3 Methods

Methods of the TOraQueueAdmin class.
For a complete list of the TOraQueueAdmin class members, see the TOraQueueAdmin
Members topic.

PublicName
AddSubscriber
AlterComment
AlterMaxRetries
AlterPropagationSchedule
AlterQueue
AlterRetentionTime

AlterRetryDelay

AlterSubscriber

CreateQueue

DisablePropagationSchedule

DropQueue© 2019 Devart

Description
Adds a subscriber to thequeue.
Alters the user-definedqueue description.
Alters the number ofattempts to dequeue amessage.
Alters parameters for a
propagation schedule.
Alters queue properties.
Alters the time in seconds
during which a message
remains in the queue after
being dequeued.
Alters the delay time inseconds before themessage, which failed to bedequeued, will be scheduled
to processing again.
Alters the rule andtransformation properties ofa queue subscriber.
Creates a queue with thename, specified by the
TOraQueueAdmin.QueueNa
me property.
Disables a propagation
schedule.
Drops the queue specified
by theTOraQueueAdmin.QueueNa
me property.

985

Oracle Data Access Components

EnablePropagationSchedule
GetSubscribers
GrantQueuePrivilege

ReadQueueProperties

RemoveSubscriber
RevokeQueuePrivilege

SchedulePropagation

StartDequeueStartEnqueueStartQueue
StopDequeue
StopEnqueue
StopQueue

UnschedulePropagation

VerifyQueueTypes

Enables a previously
disabled propagation
schedule.
Provides the list of queue
subscribers.
Grants queue privilege to the
grantee.
Reads the information about
a queue specified by the
TOraQueueAdmin.QueueNa
me property from thedatabase to a
TOraQueueAdmin
component.
Removes a subscriber fromthe queue.
Revokes queue privilege
from a grantee.
Schedules the propagationof messages from the queue
to a destination identified bya specific database link.
Enables dequeueing on aqueue.
Enables enqueueing on aqueue.
Enables enqueueing,dequeueing, or both on aqueue.
Disables dequeueing on aqueue.
Disables enqueueing on aqueue.
Stops enqueueing,dequeueing, or both on aqueue.
Unschedules previously
scheduled propagation of
messages from the queue tothe specified destination.
Verifies that the current
queue and destination
queue have the same type.

© 2019 DevartReference

986

See Also
TOraQueueAdmin Class
TOraQueueAdmin Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.1 AddSubscriber Method

Adds a subscriber to the queue.

Class
TOraQueueAdmin

Syntax
procedure AddSubscriber(Subscriber: TQueueAgent; const Rule:string = ''; const Transformation: string = ''; QueueToQueue:
boolean = False; DeliveryMode: TQueueDeliveryMode = qdmPersistent);
Parameters
Subscriber
Holds an agent on whose behalf the subscription is being defined.
Rule
Holds a conditional expression based on the message properties, the message data
properties, and PL/SQL functions.
Transformation
Holds the transformation that will be applied when this subscriber dequeues the message.
QueueToQueue
Is True, if propagation is from queue-to-queue.
DeliveryMode
Holds the delivery mode of the messages the subscriber is interested in. See
TDequeueOptions.DeliveryMode for more information.

Remarks
Call the AddSubscriber method to add a subscriber to the queue.

See Also
AlterSubscriber
RemoveSubscriber
TDequeueOptions.DeliveryMode© 2019 Devart

987

Oracle Data Access Components

TQueueAgent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.2 AlterComment Method

Alters the user-defined queue description.

Class
TOraQueueAdmin

Syntax
procedure AlterComment(const Comment: string);
Parameters
Comment
Holds the user-defined queue description.

Remarks
Call the AlterComment method to alter the user-defined queue description.

See Also
AlterQueue
Comment© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.3 AlterMaxRetries Method

Alters the number of attempts to dequeue a message.

Class
TOraQueueAdmin

Syntax
procedure AlterMaxRetries(MaxRetries: integer);
Parameters
MaxRetries
Holds the number of attempts that can be taken to dequeue a message.
© 2019 DevartReference

988

Remarks
Call the AlterMaxRetries method to alter the number of attempts to dequeue a message.

See Also
AlterQueue
MaxRetries© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.4 AlterPropagationSchedule Method

Alters parameters for a propagation schedule.

Class
TOraQueueAdmin

Syntax
procedure AlterPropagationSchedule(const Destination: string;
Duration: integer; const NextTime: string; Latency: integer;
const DestinationQueue: string = '');
Parameters
Destination
Holds the destination database link.
Duration
Holds the duration of the propagation window in seconds (NULL value means the
propagation window is unscheduled forever or until the propagation).
NextTime
Holds the date function to compute the start of the next propagation window from the end of
the current window.
Latency
Holds the maximum wait time in seconds in the propagation window for a message to be
propagated after it is enqueued.
DestinationQueue
Holds the name of the destination queue. This parameter is supported starting with Oracle
10.

Remarks
Call the AlterPropagationSchedule method to alter parameters for a propagation schedule.

© 2019 Devart

989

Oracle Data Access Components

See Also
SchedulePropagation
DisablePropagationSchedule
UnschedulePropagation© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.5 AlterQueue Method

Alters queue properties.

Class
TOraQueueAdmin

Syntax
procedure AlterQueue(MaxRetries: integer; RetryDelay: integer =AQ_NOT_DEFINED; RetentionTime: integer = AQ_NOT_DEFINED; const
Comment: string = '');
Parameters
MaxRetries
Holds the number of attempts to dequeue message.
RetryDelay
Holds the delay time before the message that failed to be dequeued, will be scheduled toprocessing again.
RetentionTime
Holds the time for which a message remains in the queue after being dequeued.
Comment
Holds the user-specified description of the queue.

Remarks
Call the AlterQueue method to alter queue properties.

See Also
MaxRetries
RetryDelay
RetentionTime
Comment© 2019 DevartReference

990

AlterMaxRetries
AlterRetryDelay
AlterRetentionTime
AlterComment© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.6 AlterRetentionTime Method

Alters the time in seconds during which a message remains in the queue after being
dequeued.

Class
TOraQueueAdmin

Syntax
procedure AlterRetentionTime(RetentionTime: integer);
Parameters
RetentionTime
Holds the time for which a message remains in the queue after being dequeued.

Remarks
Call the AlterRetentionTime method to alter the time in seconds during which a message
remains in the queue after being dequeued.

See Also
AlterQueue
RetentionTime© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.7 AlterRetryDelay Method

Alters the delay time in seconds before the message, which failed to be dequeued, will bescheduled to processing again.

Class
TOraQueueAdmin© 2019 Devart

991

Oracle Data Access Components

Syntax
procedure AlterRetryDelay(RetryDelay: integer);
Parameters
RetryDelay
Holds the delay time before the message that failed to be dequeued, will be scheduled toprocessing again.

Remarks
Call the AlterRetryDelay method to alter delay time in seconds before the message, which
failed to be dequeued, will be scheduled to processing again.

See Also
AlterQueue
RetryDelay© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.8 AlterSubscriber Method

Alters the rule and transformation properties of a queue subscriber.

Class
TOraQueueAdmin

Syntax
procedure AlterSubscriber(Subscriber: TQueueAgent; const Rule:string; const Transformation: string = '');
Parameters
Subscriber
Holds an agent on whose behalf the subscription is being defined.
Rule
Holds a conditional expression based on the message properties, the message data
properties, and PL/SQL functions.
Transformation
Holds the transformation that will be applied when this subscriber dequeues the message.

Remarks© 2019 DevartReference

992

Call the AlterSubscriber method to alter the rule and transformation properties of a queue
subscriber.

See Also
AddSubscriber
RemoveSubscriber
TQueueAgent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.9 CreateQueue Method

Creates a queue with the name, specified by the QueueName property.

Class
TOraQueueAdmin

Syntax
procedure CreateQueue(NonPersistent: boolean = False);
Parameters
NonPersistentHolds True, if the created queue should be persistent. False otherwise.

Remarks
Call the CreateQueue method to create a queue with the name, specified by QueueName
property. When creating a persistent queue, properties
QueueTableName
QueueType,
MaxRetries,
RetryDelay,
RetentionTime,
Comment
will be used as parameters for the new queue.
When creating a non-persistent queue, TOraQueueAdmin component uses properties
MultipleConsumers and Comment.

© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

993

Oracle Data Access Components

Reserved.
5.16.1.4.3.10 DisablePropagationSchedule Method

Disables a propagation schedule.

Class
TOraQueueAdmin

Syntax
procedure DisablePropagationSchedule(const Destination: string;
const DestinationQueue: string = '');
Parameters
Destination
Holds the destination database link.
DestinationQueue
Holds the name of the destination queue.

Remarks
Call the DisablePropagationSchedule method to disable a propagation schedule. The
DestinationQueue parameter is supported starting with Oracle 10.

See Also
EnablePropagationSchedule
SchedulePropagation
UnschedulePropagation
AlterPropagationSchedule© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.11 DropQueue Method

Drops the queue specified by the QueueName property.

Class
TOraQueueAdmin

Syntax
procedure DropQueue;© 2019 DevartReference

994

Remarks
Call the DropQueue method to drop the queue specified by the QueueName property.

See Also
QueueName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.12 EnablePropagationSchedule Method

Enables a previously disabled propagation schedule.

Class
TOraQueueAdmin

Syntax
procedure EnablePropagationSchedule(const Destination: string;
const DestinationQueue: string = '');
Parameters
Destination
Holds the destination database link.
DestinationQueue
Holds the name of the destination queue.

Remarks
Use the EnablePropagationSchedule method to enable a previously disabled propagation
schedule. DestinationQueue parameter is supported starting with Oracle 10.

See Also
DisablePropagationSchedule
SchedulePropagation
AlterPropagationSchedule© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

995

Oracle Data Access Components

5.16.1.4.3.13 GetSubscribers Method

Provides the list of queue subscribers.

Class
TOraQueueAdmin

Syntax
procedure GetSubscribers(Subscribers: TQueueAgents);
Parameters
Subscribers
Holds a list of TOraAgent objects.

Remarks
Call the GetSubscribers method to get queue subscribers.

See Also
AddSubscriber
RemoveSubscriber
TQueueAgents© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.14 GrantQueuePrivilege Method

Grants queue privilege to the grantee.

Class
TOraQueueAdmin

Syntax
procedure GrantQueuePrivilege(Privilege: TQueuePrivilege; const
Grantee: string; GrantOption: boolean = False);
Parameters
Privilege
Holds the kind of privilege.
GranteeHolds the grantee name.
© 2019 DevartReference

996

GrantOption
True, if the privilege will be granted with GRANT OPTION. False otherwise.

Remarks
Use the GrantQueuePrivilege method to grant queue privilege to the grantee. Privilege can be
qpEnqueue (ENQUEUE privilege), qpDequeue (DEQUEUE privilege) or qpAll (bothENQUEUE and DEQUEUE privileges). If GrantOption parameter is set to True, the privilege
will be granted with GRANT OPTION.

See Also
RevokeQueuePrivilege© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.15 ReadQueueProperties Method

Reads the information about a queue specified by the QueueName property from thedatabase to a TOraQueueAdmin component.

Class
TOraQueueAdmin

Syntax
procedure ReadQueueProperties;

Remarks
Call the ReadQueueProperties method to read the information about a queue specified by
the QueueName property from the database to a TOraQueueAdmin component. After calling
this method use properties
QueueTableName
QueueType,
MaxRetries,
RetryDelay,
RetentionTime,
Comment
to get queue parameters.

© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

997

Oracle Data Access Components

Reserved.
5.16.1.4.3.16 RemoveSubscriber Method

Removes a subscriber from the queue.

Class
TOraQueueAdmin

Syntax
procedure RemoveSubscriber(Subscriber: TQueueAgent);
Parameters
Subscriber
Holds an agent on whose behalf the subscription is being defined.

Remarks
Call the RemoveSubscriber method to remove a subscriber from the queue. All references tothe subscriber in existing messages will be also removed.

See Also
GetSubscribers
AddSubscriber
TQueueAgent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.17 RevokeQueuePrivilege Method

Revokes queue privilege from a grantee.

Class
TOraQueueAdmin

Syntax
procedure RevokeQueuePrivilege(Privilege: TQueuePrivilege; const
Grantee: string);
Parameters
Privilege
Holds the kind of privilege.
© 2019 DevartReference

998

GranteeHolds the grantee name.

Remarks
Call the RevokeQueuePrivilege method to revoke queue privilege from a grantee. The
privilege can be qpEnqueue (ENQUEUE privilege), qpDequeue (DEQUEUE privilege) or qpAll(both ENQUEUE and DEQUEUE privileges).

See Also
GrantQueuePrivilege© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.18 SchedulePropagation Method

Schedules the propagation of messages from the queue to a destination identified by aspecific database link.

Class
TOraQueueAdmin

Syntax
procedure SchedulePropagation(const Destination: string;
StartTime: TDateTime; Duration: integer; const NextTime: string;
Latency: integer; const DestinationQueue: string = '');
Parameters
Destination
Holds the destination database link.
StartTime
Holds the initial start time for the propagation window for messages from the queue to thedestination.
Duration
Holds the duration of the propagation window in seconds.
NextTime
Holds the date function to compute the start of the next propagation window from the end of
the current window.
Latency
Holds the maximum wait time in seconds in the propagation window for a message to be
propagated after it is enqueued.

© 2019 Devart

999

Oracle Data Access Components

DestinationQueue
Holds the name of the destination queue. DestinationQueue parameter is supported startingwith Oracle 10.

Remarks
Call the SchedulePropagation metod to schedule the propagation of messages from thequeue to a destination identified by a specific database link.

See Also
UnschedulePropagation
AlterPropagationSchedule
EnablePropagationSchedule© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.19 StartDequeue Method

Enables dequeueing on a queue.

Class
TOraQueueAdmin

Syntax
procedure StartDequeue;

Remarks
Call the StartDequeue method to enable dequeueing on a queue.

See Also
StartQueue
StartEnqueue
StopDequeue© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1000

5.16.1.4.3.20 StartEnqueue Method

Enables enqueueing on a queue.

Class
TOraQueueAdmin

Syntax
procedure StartEnqueue;

Remarks
Call the StartEnqueue method to enable enqueueing on a queue.

See Also
StartQueue
StartDequeue
StopEnqueue© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.21 StartQueue Method

Enables enqueueing, dequeueing, or both on a queue.

Class
TOraQueueAdmin

Syntax
procedure StartQueue(Enqueue: boolean = True; Dequeue: boolean =True);
Parameters
Enqueue
True, if enqueueing is enabled. False otherwise.
Dequeue
True, if dequeueing is enabled. False otherwise.

Remarks
Call the StopQueue method to enable enqueueing, dequeueing, or both on a queue.

© 2019 Devart

1001

Oracle Data Access Components

See Also
StartEnqueueStartDequeue
StopQueue© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.22 StopDequeue Method

Disables dequeueing on a queue.

Class
TOraQueueAdmin

Syntax
procedure StopDequeue(Wait: boolean = True);
Parameters
Wait
True, if waiting for the completion of the currently active queue transactions is enabled.

Remarks
Call the StopDequeue method to disable dequeueing on a queue. The Wait parameter
specifies whether to wait for the completion of the currently active queue transactions.

See Also
StopQueue
StopEnqueueStartDequeue© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.23 StopEnqueue Method

Disables enqueueing on a queue.

Class
TOraQueueAdmin© 2019 DevartReference

1002

Syntax
procedure StopEnqueue(Wait: boolean = True);
Parameters
Wait
True, if wait for the completion of the currently active queue transactions is enabled.

Remarks
Call the StopEnqueue method to disable enqueueing on a queue. The Wait parameter
specifies whether to wait for the completion of the currently active queue transactions.

See Also
StopQueue
StopDequeueStartEnqueue© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.24 StopQueue Method

Stops enqueueing, dequeueing, or both on a queue.

Class
TOraQueueAdmin

Syntax
procedure StopQueue(Enqueue: boolean = True; Dequeue: boolean =True; Wait: boolean = True);
Parameters
Enqueue
True, if enqueueing is stopped. False otherwise.
Dequeue
True, if dequeueing is stopped. False otherwise.
Wait
True, if waiting for the completion of the currently active queue transactions is enabled.

Remarks
Call the StopQueue method to stop enqueueing, dequeueing, or both on a queue. The Wait
© 2019 Devart

1003

Oracle Data Access Components

parameter specifies whether to wait for the completion of the currently active queuetransactions.

See Also
StopEnqueue
StopDequeueStartQueue© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.4.3.25 UnschedulePropagation Method

Unschedules previously scheduled propagation of messages from the queue to the specified
destination.

Class
TOraQueueAdmin

Syntax
procedure UnschedulePropagation(const Destination: string; const
DestinationQueue: string = '');
Parameters
Destination
Holds the destination database link.
DestinationQueue
Holds the name of the destination queue. This parameter is supported starting with Oracle
10.

Remarks
Call the UnschedulePropagation method to unschedule previously scheduled propagation of
messages from the queue to the specified destination (database link). DestinationQueueparameter is supported starting with Oracle 10.

See Also
SchedulePropagation
AlterPropagationSchedule
DisablePropagationSchedule© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1004

Devart. All Rights
Reserved.
5.16.1.4.3.26 VerifyQueueTypes Method

Verifies that the current queue and destination queue have the same type.

Class
TOraQueueAdmin

Syntaxfunction VerifyQueueTypes(const DestQueueName: string; const
Destination: string): boolean;
Parameters
DestQueueName
Holds the name of the destination queue.
Destination
Holds the destination database link.
Return Value
True, if the queues have the same type.

Remarks
Call the VerifyQueueTypes method to verify that the current queue and destination queue
have the same type.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.16.1.5 TOraQueueTable Class

A component managing queue tables in a database.
For a list of all members of this type, see TOraQueueTable members.

Unit
OraAQ

SyntaxTOraQueueTable = class(TComponent);

Remarks© 2019 Devart

Provide Feedback

1005

Oracle Data Access Components

Use the TOraQueueTable component to manage queue tables in a database.
Database user must have AQ_ADMINISTRATOR_ROLE to work with the TOraQueueTable
component.

See Also
TOraQueue, TOraQueueAdmin and TOraQueueTable Components
TOraQueueAdmin
TOraQueue© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.1 Members

TOraQueueTable class overview.

Properties
Name
Comment

Compatible

MessageGrouping

MultipleConsumers

PayloadTypeName
PrimaryInstance
QueueTableName
SecondaryInstance
SecureDescription
Used to det or set a userspecified description of teh
queue table.
Used to define the lowest
database version the queue
is compatible with.
Used to specify themessage grouping behavior
in the queues based on thistable.
Used if a definite table forqueues that can havemultiple consumers for eachmessage is needed.
Used to get or set the object
type name for the queue
payload.
Used to set the primaryowner of the queue table.
Used to get or set the queue
table name.
Used to set the secondary
owner of the queue table.
Used for queue tables that© 2019 DevartReference

Session
SortList
StorageClause1006

will be used for secure
queues.
Used to specify the session
through which a queue table
will be controlled.
Used to specify the columns
to be used as the sort key.
Used to get or set the tablestorage clause.

Methods
Name
AlterComment
AlterPrimaryInstance
AlterQueueTable
AlterSecondaryInstance
CreateQueueTable
DropQueueTable
GrantSystemPrivilege

MigrateQueueTable

PurgeQueueTable

ReadQueueTableProperties

RevokeSystemPrivilege© 2019 Devart

Description
Alters queue table userdefined description.
Changes queue tableprimary_instanceparameter.
Changes existing queue
table properties.
Changes the queue tablesecondary_instanceparameter.
Creates a queue table in a
database.
Drops the queue table.
Grants system queue
privilege.
Used to upgrade or
downgrade a queue table tothe desired Compatible
parameter value.
Purges records from thequeue table.
Reads information about aqueue table specified by theQueueTableName property
from the database to the
TOraQueueTable
component.
Revokes system queue
privilege.

1007

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.2 Properties

Properties of the TOraQueueTable class.
For a complete list of the TOraQueueTable class members, see the TOraQueueTable
Members topic.

Published
Name
Comment

Compatible

MessageGrouping

MultipleConsumers

PayloadTypeName
PrimaryInstance
QueueTableName
SecondaryInstance
SecureSession
SortList
StorageClause

Description
Used to det or set a userspecified description of teh
queue table.
Used to define the lowest
database version the queue
is compatible with.
Used to specify themessage grouping behavior
in the queues based on thistable.
Used if a definite table forqueues that can havemultiple consumers for eachmessage is needed.
Used to get or set the object
type name for the queue
payload.
Used to set the primaryowner of the queue table.
Used to get or set the queue
table name.
Used to set the secondary
owner of the queue table.
Used for queue tables thatwill be used for secure
queues.
Used to specify the session
through which a queue table
will be controlled.
Used to specify the columns
to be used as the sort key.
Used to get or set the table© 2019 DevartReference

1008

storage clause.

See Also
TOraQueueTable Class
TOraQueueTable Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.2.1 Comment Property

Used to det or set a user-specified description of teh queue table.

Class
TOraQueueTable

Syntaxproperty Comment: string;

Remarks
Use The Comment property to get user-specified description of the queue table or to set it. It
is used by the CreateQueueTable method.

See Also
CreateQueueTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.2.2 Compatible Property

Used to define the lowest database version the queue is compatible with.

Class
TOraQueueTable

Syntaxproperty Compatible: TQueueCompatible default qcDefault;

Remarks© 2019 Devart

1009

Oracle Data Access Components

Use the Compatible property to determine the lowest database version with which the queue
is compatible. The default value is qcDefault. The meaning of this value depends on the
database compatible mode. For more information read the Oracle documentation. This
property is used by the CreateQueueTable method.

See Also
CreateQueueTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.2.3 MessageGrouping Property

Used to specify the message grouping behavior in the queues based on this table.

Class
TOraQueueTable

Syntaxproperty MessageGrouping: TQueueMessageGrouping default qmgNone;

Remarks
Use the MessageGrouping property to determine message grouping behavior in the queues
based on this table. mgNone means that each queue message is treated individually,
mgTransactional means that messages, enqueued in one transaction, will belong to thesame group. The default value is mgNone. This property is used by the CreateQueueTable
method.

See Also
CreateQueueTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.2.4 MultipleConsumers Property

Used if a definite table for queues that can have multiple consumers for each message isneeded.

Class
TOraQueueTable© 2019 DevartReference

1010

Syntaxproperty MultipleConsumers: boolean default False;

Remarks
The MultipleConsumers property should be set to True to use a definite table for queues that
can have multiple consumers for each message. False is the default value and means thatqueues, based on this table can have only one consumer for each message. This property isused by the CreateQueueTable method.

See Also
CreateQueueTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.2.5 PayloadTypeName Property

Used to get or set the object type name for the queue payload.

Class
TOraQueueTable

Syntaxproperty PayloadTypeName: string stored IsPayloadTypeNameStored;

Remarks
Use the PayloadTypeName property to get or set the object type name for the queue payload.
This property is used by the CreateQueueTable method. This property is set to 'RAW' for
RAW payload.

See Also
CreateQueueTable© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1011

Oracle Data Access Components

5.16.1.5.2.6 PrimaryInstance Property

Used to set the primary owner of the queue table.

Class
TOraQueueTable

Syntaxproperty PrimaryInstance: integer default 0;

Remarks
Use the PrimaryInstance property to get or set primary owner of the queue table. Queue
monitor scheduling and propagation for the queues in the queue table are done in thisinstance. The default value for primary instance is 0, what means that queue monitor
scheduling and propagation will be done in any available instance. This property is used by
CreateQueueTable method.

See Also
CreateQueueTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.2.7 QueueTableName Property

Used to get or set the queue table name.

Class
TOraQueueTable

Syntaxproperty QueueTableName: string;

Remarks
Use the QueueTableName property to get or set the queue table name. This property is usedby the CreateQueueTable method.

See Also
CreateQueueTable© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1012

Devart. All Rights
Reserved.
5.16.1.5.2.8 SecondaryInstance Property

Used to set the secondary owner of the queue table.

Class
TOraQueueTable

Syntaxproperty SecondaryInstance: integer default 0;

Remarks
The queue table fails over the secondary instance if the primary instance is not available. The
default value is 0. It means that the queue table will fail over any available instance. This
property is used by CreateQueueTable method.

See Also
CreateQueueTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.2.9 Secure Property

Used for queue tables that will be used for secure queues.

Class
TOraQueueTable

Syntaxproperty Secure: boolean default False;

Remarks
The Secure property must be True for queue tables that will be used for secure queues. It is
used by the CreateQueueTable method.

See Also
CreateQueueTable© 2019 Devart

1013

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.2.10 Session Property

Used to specify the session through which a queue table will be controlled.

Class
TOraQueueTable

Syntaxproperty Session: TOraSession;

Remarks
Use the Session property to specify the session through which a queue table will becontrolled.

See Also
TOraSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.2.11 SortList Property

Used to specify the columns to be used as the sort key.

Class
TOraQueueTable

Syntaxproperty SortList: TQueueSortList default qslDefault;

Remarks
Use the SortList property to specify the columns to be used as the sort key in the ascendingorder.

See Also
CreateQueueTable© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

1014

Provide Feedback

5.16.1.5.2.12 StorageClause Property

Used to get or set the table storage clause.

Class
TOraQueueTable

Syntaxproperty StorageClause: string;

Remarks
Use the StorageClause property to get or set the table storage clause. It is used by theCreateQueueTable method. May contain any SQL code that can be in the CREATE TABLE
storage clause.

See Also
CreateQueueTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.3 Methods

Methods of the TOraQueueTable class.
For a complete list of the TOraQueueTable class members, see the TOraQueueTable
Members topic.

PublicName
AlterComment
AlterPrimaryInstance
AlterQueueTable
AlterSecondaryInstance© 2019 Devart

Description
Alters queue table userdefined description.
Changes queue tableprimary_instanceparameter.
Changes existing queue
table properties.
Changes the queue table1015

Oracle Data Access Components

secondary_instanceparameter.
Creates a queue table in a
database.
Drops the queue table.
Grants system queue
privilege.
Used to upgrade or
downgrade a queue table tothe desired Compatible
parameter value.
Purges records from thequeue table.
Reads information about aqueue table specified by theQueueTableName property
from the database to the
TOraQueueTable
component.
Revokes system queue
privilege.

CreateQueueTable
DropQueueTable
GrantSystemPrivilege

MigrateQueueTable

PurgeQueueTable

ReadQueueTableProperties

RevokeSystemPrivilege

See Also
TOraQueueTable Class
TOraQueueTable Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.3.1 AlterComment Method

Alters queue table user-defined description.

Class
TOraQueueTable

Syntax
procedure AlterComment(const Comment: string);
Parameters
Comment
Holds the user-defined description of the queue-table.
© 2019 DevartReference

1016

Remarks
Call the AlterComment method to alter queue table user-defined description.

See Also
Comment
AlterQueueTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.3.2 AlterPrimaryInstance Method

Changes queue table primary_instance parameter.

Class
TOraQueueTable

Syntax
procedure AlterPrimaryInstance(PrimaryInstance: integer);
Parameters
PrimaryInstanceHolds the primary owner of the queue table.

Remarks
Call the AlterPrimaryInstance method to alter queue table primary_instance parameter.

See Also
PrimaryInstance
AlterQueueTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.16.1.5.3.3 AlterQueueTable Method

Changes existing queue table properties.

Class
TOraQueueTable© 2019 Devart

DAC Forum

Provide Feedback

1017

Oracle Data Access Components

Syntax
procedure AlterQueueTable(const Comment: string; PrimaryInstance:
integer = AQ_NOT_DEFINED; SecondaryInstance: integer =AQ_NOT_DEFINED);
Parameters
Comment
Holds the user-defined description of the queue-table.
PrimaryInstanceHolds the primary owner of the queue table.
SecondaryInstanceHolds the secondary owner of the queue table.

Remarks
Call the AlterQueueTable method to alter existing queue table properties. You can alter thefollowing properties: Comment, PrimaryInstance, SecondaryInstance.

See Also
Comment
PrimaryInstance
SecondaryInstance
AlterComment
AlterSecondaryInstance
AlterPrimaryInstance© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.3.4 AlterSecondaryInstance Method

Changes the queue table secondary_instance parameter.

Class
TOraQueueTable

Syntax
procedure AlterSecondaryInstance(SecondaryInstance: integer);
Parameters© 2019 DevartReference

1018

SecondaryInstanceHolds the secondary owner of the queue table.

Remarks
Call the AlterSecondaryInstance method to alter queue table secondary_instance parameter.

See Also
SecondaryInstance
AlterQueueTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.3.5 CreateQueueTable Method

Creates a queue table in a database.

Class
TOraQueueTable

Syntax
procedure CreateQueueTable;

Remarks
Call the CreateQueueTable method to create a queue table in a database. The
QueueTableName property of the TOraQueueTable component will be used as a name forthe queue table. Properties
StorageClause,
PayloadTypeName,
SortList,
MultipleConsumers,
MessageGrouping,
Comment,
PrimaryInstance,
SecondaryInstance,
Compatible,
Securewill be used as parameters for a new queue table.

© 2019 Devart

1019

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.3.6 DropQueueTable Method

Drops the queue table.

Class
TOraQueueTable

Syntax
procedure DropQueueTable(Force: boolean = False);
Parameters
Force
If True, stops and dropps all queues in the table automatically. Otherwise the table will not
be dropped if there are any queues in it.

Remarks
Call the DropQueueTable method to drop the queue table. If the Force parameter is set to
False, the table will not be dropped if there are any queues in the table. Otherwise all queues
will be stopped and dropped automatically.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.3.7 GrantSystemPrivilege Method

Grants system queue privilege.

Class
TOraQueueTable

Syntax
procedure GrantSystemPrivilege(Privilege: TQueueSystemPrivilege;const Grantee: string; AdminOption: boolean = False);
Parameters
Privilege
Holds a system privilege to a grant.
Grantee© 2019 DevartReference

1020

Holds the user name, a role, or a PUBLIC role.
AdminOption
Specifies whether the privilege will be granted with ADMIN OPTION.

Remarks
Call the GrantSystemPrivilege method to grant system queue privilege. Privilege parameter isa system privilege to grant. Can be qspEnqueueAny (ENQUEUE_ANY privilege),
qspDequeueAny (DEQUEUE_ANY privilege), qspManageAny (MANAGE_ANY privilege).
Grantee parameter is a grantee - can be a user, a role, or the PUBLIC role. AdminOption
parameter specifies whether the privilege will be granted with ADMIN OPTION.

See Also
RevokeSystemPrivilege© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.3.8 MigrateQueueTable Method

Used to upgrade or downgrade a queue table to the desired Compatible parameter value.

Class
TOraQueueTable

Syntax
procedure MigrateQueueTable(Compatible: TQueueCompatible);
Parameters
Compatible
Holds the lowest database version the queue is compatible with.

Remarks
Call the MigrateQueueTable method to upgrade or downgrade a queue table to the desired
Compatible parameter value.

See Also
Compatible© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1021

Oracle Data Access Components

5.16.1.5.3.9 PurgeQueueTable Method

Purges records from the queue table.

Class
TOraQueueTable

Syntax
procedure PurgeQueueTable(const PurgeCondition: string; Block:boolean = False; DeliveryMode: TQueueDeliveryMode = qdmPersistent);
Parameters
PurgeCondition
Specifies the purge condition, which must be in the format of a SQL WHERE clause and isbased on the columns of aq$queue_table_name view.
Block
Specifies whether to hold an exclusive lock on all the queues in the queue table while
purging the queue table.
DeliveryMode
Specifies which type of messages should be purged. Possible values are described in
TDequeueOptions.DeliveryMode topic

Remarks
Call the PurgeQueueTable method to purge records from the queue table.

See Also
TDequeueOptions.DeliveryMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.3.10 ReadQueueTableProperties Method

Reads information about a queue table specified by the QueueTableName property from thedatabase to the TOraQueueTable component.

Class
TOraQueueTable

Syntax
procedure ReadQueueTableProperties;© 2019 DevartReference

1022

Remarks
Call the ReadQueueTableProperties method to read information about a queue tablespecified by the QueueTableName property from the database to the TOraQueueTable
component. After calling this method use properties
PayloadTypeName,
SortList,
MultipleConsumers,
MessageGrouping,
Comment,
PrimaryInstance,
SecondaryInstance,
Compatible,
Secureto get queue table parameters.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.5.3.11 RevokeSystemPrivilege Method

Revokes system queue privilege.

Class
TOraQueueTable

Syntax
procedure RevokeSystemPrivilege(Privilege: TQueueSystemPrivilege;const Grantee: string);
Parameters
Privilege
Holds the system privilege to revoke.
GranteeHolds the user name, a role, or a PUBLIC role.

Remarks
Call the RevokeSystemPrivilege method to revoke system queue privilege. Privilege
parameter is a system privilege to revoke. Can be qspEnqueueAny (ENQUEUE_ANY© 2019 Devart

1023

Oracle Data Access Components

privilege), qspDequeueAny (DEQUEUE_ANY privilege), qspManageAny (MANAGE_ANY
privilege). Grantee parameter is a grantee - can be a user, a role, or the PUBLIC role.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.6 TQueueAgent ClassA class reperesenting a producer or a consumer of a queue message.
For a list of all members of this type, see TQueueAgent members.

Unit
OraAQ

SyntaxTQueueAgent = class(TCollectionItem);Remarks
The TQueueAgent class represents a producer or a consumer of a queue message. Use the
TQueueAgent class to set producers or consumers of queue messages, queue subscribers
etc.

See Also
TQueueAgents
TQueueMessageProperties.SenderId
TOraQueue.Listen
TOraQueueAdmin.AddSubscriber
TOraQueueAdmin.RemoveSubscriber
TOraQueueAdmin.AlterSubscriber© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.6.1 Members

TQueueAgent class overview.

Properties
Name

Description© 2019 DevartReference

Used to get or set therecipient protocol-specificaddress.
Used to get or set a name ofthe queue agent.
Used to set a protocol tointerpret the address andpropagate the message.

Address
Name
Protocol© 1997-2019
Devart. All Rights
Reserved.

1024

Request Support

DAC Forum

Provide Feedback

5.16.1.6.2 Properties

Properties of the TQueueAgent class.
For a complete list of the TQueueAgent class members, see the TQueueAgent Members
topic.

Published
Name

Description
Used to get or set therecipient protocol-specificaddress.
Used to get or set a name ofthe queue agent.
Used to set a protocol tointerpret the address andpropagate the message.

Address
Name
ProtocolSee Also
TQueueAgent Class
TQueueAgent Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.16.1.6.2.1 Address Property

Used to get or set the recipient protocol-specific address.

Class
TQueueAgent© 2019 Devart

Provide Feedback

1025

Oracle Data Access Components

Syntaxproperty Address: string;

Remarks
Use the Address property to get or set the recipient protocol-specific address. If the Protocol
property is 0, then the address should have the [schema.]queue[@dblink] form.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.6.2.2 Name Property

Used to get or set a name of the queue agent.

Class
TQueueAgent

Syntaxproperty Name: string;

Remarks
Use the Name property to get or set a name of the queue agent.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.6.2.3 Protocol Property

Used to set a protocol to interpret the address and propagate the message.

Class
TQueueAgent

Syntaxproperty Protocol: integer default 0;

Remarks
Use the Protocol property to set a protocol to interpret the address and propagate themessage.

© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

1026

Provide Feedback

5.16.1.7 TQueueAgents ClassA class holding a collection of the TQueueAgent objects.
For a list of all members of this type, see TQueueAgents members.

Unit
OraAQ

SyntaxTQueueAgents = class(TOwnedCollection);

Remarks
Each TQueueAgents holds a collection of the TQueueAgent objects. TQueueAgents
maintains an index of the columns in its Items array. The Count property contains the numberof columns in the collection.

See Also
TQueueAgent
TQueueMessageProperties.RecipientList
TOraQueue.Listen
TOraQueueAdmin.GetSubscribers© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.7.1 Members

TQueueAgents class overview.

Properties
Name
Items

Methods© 2019 Devart

Description
Used to access individualcolumns.

1027

Oracle Data Access Components

Name

Description
Adds a TQueueAgent object
to the collection.
Inserts a TQueueAgent
object in the TQueueAgentscollection to the required
place.

Add

Insert© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.7.2 Properties

Properties of the TQueueAgents class.
For a complete list of the TQueueAgents class members, see the TQueueAgents Members
topic.

PublicName

Description
Used to access individualcolumns.

Items

See Also
TQueueAgents Class
TQueueAgents Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.7.2.1 Items Property(Indexer)

Used to access individual columns.

Class
TQueueAgents

Syntaxproperty Items[Index: integer]: TQueueAgent; default;
Parameters
Index© 2019 DevartReference

1028

Holds the index of a TQueueAgent object.

Remarks
Use the Items property to access individual columns. The value of the Index parametercorresponds to the Index property of TQueueAgent.

See Also
TQueueAgent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.7.3 Methods

Methods of the TQueueAgents class.
For a complete list of the TQueueAgents class members, see the TQueueAgents Members
topic.

PublicName

Description
Adds a TQueueAgent object
to the collection.
Inserts a TQueueAgent
object in the TQueueAgentscollection to the required
place.

Add

InsertSee Also
TQueueAgents Class
TQueueAgents Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.16.1.7.3.1 Add Method

Adds a TQueueAgent object to the collection.

Class
TQueueAgents© 2019 Devart

DAC Forum

Provide Feedback

1029

Oracle Data Access Components

Syntaxfunction Add: TQueueAgent;
Return Valuea TQueueAgent object with empty properties.

Remarks
Call the Add method to add a TQueueAgent object with empty properties to the collection.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.7.3.2 Insert Method

Inserts a TQueueAgent object in the TQueueAgents collection to the required place.

Class
TQueueAgents

Syntaxfunction Insert(Index: Integer): TQueueAgent;Parameters
Index
Holds the index of the place to insert a TQueueAgent object to.
Return Valuea TQueueAgent object.

Remarks
Call the Insert method to insert a TQueueAgent object in the TQueueAgents collection to therequired place, specified with Index parameter.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.8 TQueueMessage ClassA class representing a queue message.
For a list of all members of this type, see TQueueMessage members.

Unit© 2019 DevartReference

1030

OraAQ

SyntaxTQueueMessage = class(System.TObject);Remarks
The TQueueMessage class represents a queue message. Use the TQueueMessage classfor setting or reading message parameters and payload when sending or receiving a queue
message.

See Also
TOraQueue.Dequeue
TOraQueue.DequeueArray
TOraQueue.Enqueue
TOraQueue.EnqueueArray© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.8.1 Members

TQueueMessage class overview.

Properties
Name

Description
Used to provide a message
ID.
Used to get or set queue thequeue message
parameters.
Used to set or get payloadof the queue message as
RAW payload.
Used to set or get the
payload of a queue
message as string payload.

MessageId
MessageProperties

RawPayload

StringPayload© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1031

Oracle Data Access Components

5.16.1.8.2 Properties

Properties of the TQueueMessage class.
For a complete list of the TQueueMessage class members, see the TQueueMessage
Members topic.

PublicName

Description
Used to provide a message
ID.
Used to get or set queue thequeue message
parameters.
Used to set or get payloadof the queue message as
RAW payload.
Used to set or get the
payload of a queue
message as string payload.

MessageId
MessageProperties

RawPayload

StringPayload

See Also
TQueueMessage Class
TQueueMessage Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.8.2.1 MessageId Property

Used to provide a message ID.

Class
TQueueMessage

Syntaxproperty MessageId: TMessageId;

Remarks
Use the MessageId property to get the message ID for a message.

© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1032

Reserved.
5.16.1.8.2.2 MessageProperties Property

Used to get or set queue the queue message parameters.

Class
TQueueMessage

Syntaxproperty MessageProperties: TQueueMessageProperties;

Remarks
Use the MessageProperties property to get or set queue the queue message parameters that
AQ uses to manage individual messages.

See Also
TQueueMessageProperties© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.8.2.3 Raw Payload Property

Used to set or get payload of the queue message as RAW payload.

Class
TQueueMessage

Syntaxproperty RawPayload: TBytes;

Remarks
Use the RawPayload method to set or get payload of the queue message as RAW payload.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1033

Oracle Data Access Components

5.16.1.8.2.4 StringPayload Property

Used to set or get the payload of a queue message as string payload.

Class
TQueueMessage

Syntaxproperty StringPayload: string;

Remarks
Use the StringPayload property to set or get the payload of a queue message as string
payload.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9 TQueueMessageProperties ClassA class for setting or providing queue message properties.
For a list of all members of this type, see TQueueMessageProperties members.

Unit
OraAQ

SyntaxTQueueMessageProperties = class(TPersistent);

Remarks
Use the TQueueMessageProperties class to set or get queue message properties.

See Also
TQueueMessage.MessageProperties
TOraQueue.EnqueueMessageProperties
TOraQueue.OnMessage
TOraQueue.Dequeue
TOraQueue.DequeueArray
TOraQueue.Enqueue
TOraQueue.EnqueueArray© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

1034

Provide Feedback

5.16.1.9.1 Members

TQueueMessageProperties class overview.

Properties
Name
Attempts

Correlation
Delay

DeliveryMode

EnqueueTime

ExceptionQueue

Expiration
OriginalMessageId
Priority
RecipientList
SenderId
State© 2019 Devart

Description
Contains the number ofattempts that have been
made to dequeue amessage.
Contains the identifier
supplied by the message
producer at enqueue time.
Contains the delay of theenqueued message.
Used to indicate whether themessage will be enqueued
as buffered or persistent andto specify what kinds ofmessages should bedequeued.
Contains the time when amessage was enqueued.
Contains the name of thequeue into which themessage is moved if itcannot be processed
successfully.
Contains the expiration of amessage.
Contains the parameter for
propagating messages.
Contains the message
priority.
Contains the list of agentsthat receive a message.
Contains application-sender
identification.
Contains the state of amessage.

1035

Oracle Data Access Components

Contains thetransaction_group for thedequeued message.

TransactionGroup© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2 Properties

Properties of the TQueueMessageProperties class.
For a complete list of the TQueueMessageProperties class members, see the
TQueueMessageProperties Members topic.

PublicName
Attempts

Correlation
EnqueueTime
OriginalMessageId
State
TransactionGroup

Description
Contains the number ofattempts that have been
made to dequeue amessage.
Contains the identifier
supplied by the message
producer at enqueue time.
Contains the time when amessage was enqueued.
Contains the parameter for
propagating messages.
Contains the state of amessage.
Contains thetransaction_group for thedequeued message.

Published
Name
Delay

DeliveryMode

Description
Contains the delay of theenqueued message.
Used to indicate whether themessage will be enqueued
as buffered or persistent andto specify what kinds ofmessages should be© 2019 DevartReference

1036

dequeued.
Contains the name of thequeue into which themessage is moved if itcannot be processed
successfully.
Contains the expiration of amessage.
Contains the message
priority.
Contains the list of agentsthat receive a message.
Contains application-sender
identification.

ExceptionQueue

Expiration
Priority
RecipientList
SenderId

See Also
TQueueMessageProperties Class
TQueueMessageProperties Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2.1 Attempts Property

Contains the number of attempts that have been made to dequeue a message.

Class
TQueueMessageProperties

Syntaxproperty Attempts: integer;

Remarks
The Attempts property contains the number of attempts that have been made to dequeue amessage.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1037

Oracle Data Access Components

5.16.1.9.2.2 Correlation Property

Contains the identifier supplied by the message producer at enqueue time.

Class
TQueueMessageProperties

Syntaxproperty Correlation: string;

Remarks
The Correlation property contains the identifier supplied by the message producer at enqueuetime.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2.3 Delay Property

Contains the delay of the enqueued message.

Class
TQueueMessageProperties

Syntaxproperty Delay: integer default AQ_NO_DELAY;

Remarks
The Delay property contains the delay of the enqueued message. The delay represents thenumber of seconds after which a message is available for dequeuing. The default value is
AQ_NO_DELAY. That means the message will be available for immediate dequeuing.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2.4 DeliveryMode Property

Used to indicate whether the message will be enqueued as buffered or persistent and to
specify what kinds of messages should be dequeued.

Class© 2019 DevartReference

1038

TQueueMessageProperties

Syntaxproperty DeliveryMode: TQueueDeliveryMode default qdmPersistent;

Remarks
Use the DeliveryMode property to indicate whether the message will be enqueued as bufferedor persistent when enqueueing it, and to specify what kinds of messages should be dequeued(buffered, persistent or both), when dequeueing messages. qdmPersistentOrBuffered value
can be set only when dequeuing a message.

See Also
TEnqueueOptions.DeliveryMode
TDequeueOptions.DeliveryMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2.5 EnqueueTime Property

Contains the time when a message was enqueued.

Class
TQueueMessageProperties

Syntaxproperty EnqueueTime: TDateTime;

Remarks
The EnqueueTime property contains the time when a message was enqueued.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2.6 ExceptionQueue Property

Contains the name of the queue into which the message is moved if it cannot be processed
successfully.

Class© 2019 Devart

1039

Oracle Data Access Components

TQueueMessageProperties

Syntaxproperty ExceptionQueue: string;

Remarks
The ExceptionQueue property contains the name of the queue into which the message is
moved if it cannot be processed successfully.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2.7 Expiration Property

Contains the expiration of a message.

Class
TQueueMessageProperties

Syntaxproperty Expiration: integer default AQ_NEVER;

Remarks
The Expiration property contains the expiration of a message in seconds. It is the duration themessage is available for dequeuing. The default value is AQ_NEVER. It means that themessage will never expire.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2.8 OriginalMessageId Property

Contains the parameter for propagating messages.

Class
TQueueMessageProperties

Syntaxproperty OriginalMessageId: string;© 2019 DevartReference

1040

Remarks
The OriginalMessageId property contains the parameter used by Oracle Streams AQ for
propagating messages.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2.9 Priority Property

Contains the message priority.

Class
TQueueMessageProperties

Syntaxproperty Priority: integer default 1;

Remarks
The Priority property contains the message priority. A smaller number indicates higher
priority. The priority can be any number, including negative numbers.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2.10 RecipientList Property

Contains the list of agents that receive a message.

Class
TQueueMessageProperties

Syntaxproperty RecipientList: TQueueAgents stored
IsRecipientListStored;

Remarks
The RecipientList property contains the list of agents that receive a message.

See Also© 2019 Devart

1041

Oracle Data Access Components

TQueueAgents© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2.11 SenderId Property

Contains application-sender identification.

Class
TQueueMessageProperties

Syntaxproperty SenderId: TQueueAgent;

Remarks
The SenderId property contains application-sender identification specified at the enqueue timeby the message producer.

See Also
TQueueAgent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.1.9.2.12 State Property

Contains the state of a message.

Class
TQueueMessageProperties

Syntaxproperty State: TQueueMessageState;

Remarks
The State property contains the state of a message.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference1042

5.16.1.9.2.13 TransactionGroup Property

Contains the transaction_group for the dequeued message.

Class
TQueueMessageProperties

Syntaxproperty TransactionGroup: string;

Remarks
The TransactionGroup property contains the transaction_group for the dequeued message.
Messages belonging to the same transaction group will have the same value for this attribute.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.2 Types
Types in the OraAQ unit.

Types
Name

Description
This type is used for the
TOraQueue.OnMessage
event.

TQueueMessageEvent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.2.1 TQueueMessageEvent Procedure ReferenceThis type is used for the TOraQueue.OnMessage event.

Unit
OraAQ

SyntaxTQueueMessageEvent = procedure (Sender: TOraQueue; const
MessageId: string; const MessageProperties:
TQueueMessageProperties) of object;© 2019 Devart

1043

Oracle Data Access Components

Parameters
SenderAn object that raised the event.
MessageId
Holds the payload for the message.
MessageProperties
Holds the message properties.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.3 Enumerations
Enumerations in the OraAQ unit.

Enumerations
Name
TDequeueMode

TQueueDeliveryMode

TQueueMessageGrouping
TQueueMessageState
TQueueNavigation

TQueueSequenceDeviation
TQueueSortList

TQueueType

TQueueVisibility

Description
Specifies the locking
behavior associated with thedequeue.
Specifies the type of themessage that will bedequeued.
Specifies the message
grouping behavior in thequeues based on this table.
Specifies the message
state.
Specifies the position of themessage that will be
retrieved.
Specifies if a message
should be enqueued before
other messages.
Specifies the columnt thatwill be used as a sort key.
Specifies whether the queue
being created is an
exception queue or a normal
queue.
Specifies the transaction
behaviour of the dequeue orenqueue request.
© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

1044

Provide Feedback

5.16.3.1 TDequeueMode Enumeration

Specifies the locking behavior associated with the dequeue.

Unit
OraAQ

Syntax
TDequeueMode = (dqmBrowse, dqmLocked, dqmRemove, dqmRemoveNoData);

ValuesValue
dqmBrowse

Meaning
Messages will be dequeued without any locking.
Sets write locks on the dequeued messages. The locks last for
dqmLocked
the durations of the transaction.
dqmRemove
Messages are removed after dequeuing. The default value.
dqmRemoveNoDat Messages are marked as updated or deleted after dequeuing.
The message can be retained in the queue table based on thearetention properties.

Remarks
Use DequeueMode property to specify the locking behavior associated with the dequeue.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.16.3.2 TQueueDeliveryMode Enumeration

Specifies the type of the message that will be dequeued.

Unit
OraAQ

SyntaxTQueueDeliveryMode = (qdmPersistent, qdmBuffered,
qdmPersistentOrBuffered);© 2019 Devart

Provide Feedback

1045

Oracle Data Access Components

ValuesValue
Meaning
qdmBuffered
Only buffered message will be dequeued.
qdmPersistent
Only persistent message will be dequeued.
qdmPersistentOrB Suited message of any type can be dequeued. Is not used whenufferedenqueueing a message.
© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.3.3 TQueueMessageGrouping Enumeration

Specifies the message grouping behavior in the queues based on this table.

Unit
OraAQ

SyntaxTQueueMessageGrouping = (qmgNone, qmgTransactional);

ValuesValue
qmgNoneMeaning
Each queue message is treated individually. The default value.
qmgTransactional Messages, enqueued in one transaction, will belong to the samegroup.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
5.16.3.4 TQueueMessageState Enumeration

Specifies the message state.

Unit
OraAQ

SyntaxTQueueMessageState = (qmsReady, qmsWaiting, qmsProcessed,
qmsExpired);© 2019 DevartReference

1046

ValuesValue
qmsExpired
qmsProcessed
qmsReady
qmsWaiting

Meaning
The message has been moved to the exception queue.
The message has been processed and is retained.
The message is ready to be processed.
The message delay has not yet been reached.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.3.5 TQueueNavigation Enumeration

Specifies the position of the message that will be retrieved.

Unit
OraAQ

SyntaxTQueueNavigation = (qnNextMessage, qnNextTransaction,
qnFirstMessage, qnFirstMessageMultiGroup, qnNextMessageMultiGroup);

ValuesValue

Meaning
The first message which is available and that matches the search
qnFirstMessage
criteria will be dequeued. This setting resets the position to thebeginning of the queue.
Available matching messages from the beginning of the queue
qnFirstMessageMu will be dequeued (possibly across different transaction groups)
ltiGroup
until reaching the limit of result message array size. This setting
resets the position to the beginning of the queue.
The next message that is available and that matches the search
qnNextMessage
criteria will be dequeued. The default value.
The next set of available matching messages from the beginning
qnNextMessageMu of the queue will be dequeued (possibly across different
transaction groups) until reaching the limit of the result message
ltiGrouparray size. This setting resets the position to the beginning of thequeue.
qnNextTransaction The first message of the next transaction group that is available
and that matches the search criteria will be dequeued.

© 2019 Devart

1047

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.16.3.6 TQueueSequenceDeviation Enumeration

Specifies if a message should be enqueued before other messages.

Unit
OraAQ

SyntaxTQueueSequenceDeviation = (qsdNone, qsdBefore, qsdTop);

ValuesValue
qsdBefore
qsdNoneqsdTop© 1997-2019
Devart. All Rights
Reserved.

Meaning
Message is enqueued before the message specified byRelativeMsgid property.
Message is enqueued in usual order. The default value.
The message will be enqueued before all queued messages.
Request Support

DAC Forum

Provide Feedback

5.16.3.7 TQueueSortList Enumeration

Specifies the columnt that will be used as a sort key.

Unit
OraAQ

SyntaxTQueueSortList = (qslDefault, qslPriority, qslEnqueueTime,qslPriorityEnqueueTime, qslEnqueueTimePriority);

ValuesValue
qslDefault
qslEnqueueTime

Meaning
No sorting is specified, the table will be sorted in the enqueue
time in the ascending order by default. The default value.
The table will be sorted by enq_time column.
© 2019 DevartReference1048

qslEnqueueTimePr The table will be sorted by both enq_time and priority columns.
Enq_time column defines the most significant order.
iorityqslPriority
The table will be sorted by priority column.
qslPriorityEnqueue The table will be sorted by both the enq_time and priority
columns. Priority column defines the most significant order.
Time© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
5.16.3.8 TQueueType Enumeration

Specifies whether the queue being created is an exception queue or a normal queue.

Unit
OraAQ

SyntaxTQueueType = (qtNormalQueue, qtExceptionQueue);

ValuesValue
Meaning
qtExceptionQueue The queue being created is an exception queue.
qtNormalQueue
The queue being created is a normal queue. The Default value.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
5.16.3.9 TQueueVisibility Enumeration

Specifies the transaction behaviour of the dequeue or enqueue request.

Unit
OraAQ

SyntaxTQueueVisibility = (qvOnCommit, qvImmediate);

ValuesValue© 2019 Devart

Meaning1049

Oracle Data Access Components

qvImmediate
qvOnCommit© 1997-2019
Devart. All Rights
Reserved.

5.17

The dequeue or enqueue is being made in an autonomoustransaction.
The dequeue or enqueue is a part of the current transaction. The
operation is complete when the transaction commits. The default
value.
Request Support

DAC Forum

Provide Feedback

OraCall
Defines Oracle Call Interface routines.

ClassesName

Description
A class representing the
TOraSession.Home
property for using Oracle
Client.

TOracleHome© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.17.1 Classes
Classes in the OraCall unit.

ClassesName

Description
A class representing the
TOraSession.Home
property for using Oracle
Client.

TOracleHome© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.17.1.1 TOracleHome ClassA class representing the TOraSession.Home property for using Oracle Client.
For a list of all members of this type, see TOracleHome members.

© 2019 DevartReference

1050

Unit
OraCall

SyntaxTOracleHome = class(System.TObject);Remarks
Use TOraSession.Home property to select which Oracle client will be used in yourapplication. Use this property in cases when there is a number of Oracle clients on themachine. ODAC searches all available homes in the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ALL_HOMES registry folder.

See Also
TOraSession.Home© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.17.1.1.1 Members

TOracleHome class overview.

Properties
Name
Name

OCICallStyle
OCIClientDLL
OCIDLL
OCIVersion
OCIVersionSt
Path© 2019 Devart

Description
Defines the name of Oracle
Client ORACLE_HOME_NAME
Defines belonging to the
OCI function set {None,
OCI73, OCI80}
Defines the name and fullpath to the ClientOCI library
Defines the name and fullpath to the OCI library
Defines the version of the
OCI library as integer
Defines the version of the
OCI library
Defines the path to Oracle
Client1051

Oracle Data Access Components

Holds the list of supported
OCI function sets
Defines the value for the
TNS_ADMIN variable

PossibleOCICallStyles
TNSPath© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.17.1.1.2 Properties

Properties of the TOracleHome class.
For a complete list of the TOracleHome class members, see the TOracleHome Members
topic.

PublicName

Description
Defines the name of Oracle
Client ORACLE_HOME_NAME
Defines belonging to the
OCI function set {None,
OCI73, OCI80}
Defines the name and fullpath to the ClientOCI library
Defines the name and fullpath to the OCI library
Defines the version of the
OCI library as integer
Defines the version of the
OCI library
Defines the path to Oracle
ClientHolds the list of supported
OCI function sets
Defines the value for the
TNS_ADMIN variable

Name

OCICallStyle
OCIClientDLL
OCIDLL
OCIVersion
OCIVersionSt
Path
PossibleOCICallStyles
TNSPathSee Also
TOracleHome Class
TOracleHome Class Members© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1052

Devart. All Rights
Reserved.
5.17.1.1.2.1 Name Property

Defines the name of Oracle Client - ORACLE_HOME_NAME

Class
TOracleHome

Syntaxproperty Name: string;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.17.1.1.2.2 OCICallStyle Property

Defines belonging to the OCI function set {None, OCI73, OCI80}

Class
TOracleHome

Syntaxproperty OCICallStyle: TOCICallStyle;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.17.1.1.2.3 OCIClientDLL Property

Defines the name and full path to the ClientOCI libraryClass
TOracleHome

Syntaxproperty OCIClientDLL: string;© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1053

Oracle Data Access Components

5.17.1.1.2.4 OCIDLL Property

Defines the name and full path to the OCI libraryClass
TOracleHome

Syntaxproperty OCIDLL: string;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.17.1.1.2.5 OCIVersion Property

Defines the version of the OCI library as integer

Class
TOracleHome

Syntaxproperty OCIVersion: word;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.17.1.1.2.6 OCIVersionSt Property

Defines the version of the OCI libraryClass
TOracleHome

Syntaxproperty OCIVersionSt: string;© 1997-2019
Devart. All Rights
Reserved.

Request Support© 2019 DevartReference

1054

5.17.1.1.2.7 Path Property

Defines the path to Oracle ClientClass
TOracleHome

Syntaxproperty Path: string;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.17.1.1.2.8 PossibleOCICallStyles Property

Holds the list of supported OCI function sets

Class
TOracleHome

Syntaxproperty PossibleOCICallStyles: TOCICallStyleSet;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.17.1.1.2.9 TNSPath Property

Defines the value for the TNS_ADMIN variable

Class
TOracleHome

Syntaxproperty TNSPath: string;© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

1055

5.18

Oracle Data Access Components

OraClasses
OraClasses unit defines following data type constants: dtRowId dtCursor dtOraBlob
dtOraClob dtBFILE dtCFILE dtLabel dtFixedChar dtUndefined dtTimeStamp dtTimeStampTZ
dtTimeStampLTZ dtIntervalYM dtIntervalDS // obsolete dtBLOBLocator = dtOraBlob
dtCLOBLocator = dtOraClob

ClassesName
TNotifyTableChanges

TOraCursor

TOraFile
TOraInterval
TOraLob
TOraNumber
TOraTimeStamp

Description
Allows getting the list oftables and changes made tothem using the
TNotifyTableChanges.Chan
ges property.
A class holding the internal
Oracle Call Interface data
CDA for Oracle 7 and the
OCIStmt descriptor for
Oracle 8.
A class holding the value ofthe BFile field andparameter.
A class providing support for
Oracle 9 interval datatypes.
A class holding the value ofthe BLOB and CLOB fields
and parameters.
A class supporting
A class supporting Oracle 9
timestamp datatypes.

Enumerations
Name
TChangeNotifyEventType
TConnectMode

TMessageType

Description
Contains the event type.
Specifies the system
privileges used when a user
connects to the server.
Defines the type of the next
message found in thereceived named pipe local
buffer.
© 2019 DevartReference

1056

Specifies the optimizer
mode for connection.

TOptimizerMode

Variables
Name

Description
Set this constant to define
the type of NUMBER fields
with Scale > 0.
Set this constant to define
the type of NUMBER fields
with precision less than orequal to IntegerPrecision as
dtInteger.
Set this constant to define
the type of NUMBER fields
with precision greater thanthe IntegerPresision andless than or equal toLargeIntPrecision as
dtLargeInt.

FloatPrecision

IntegerPrecision

LargeIntPrecision© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1 Classes
Classes in the OraClasses unit.

ClassesName
TNotifyTableChanges

TOraCursor

TOraFile© 2019 Devart

Description
Allows getting the list oftables and changes made tothem using the
TNotifyTableChanges.Chan
ges property.
A class holding the internal
Oracle Call Interface data
CDA for Oracle 7 and the
OCIStmt descriptor for
Oracle 8.
A class holding the value ofthe BFile field and1057

Oracle Data Access Components

parameter.
A class providing support for
Oracle 9 interval datatypes.
A class holding the value ofthe BLOB and CLOB fields
and parameters.
A class supporting

TOraInterval
TOraLob
TOraNumber

A class supporting Oracle 9
timestamp datatypes.

TOraTimeStamp© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.1 TNotifyTableChanges Class

Allows getting the list of tables and changes made to them using the
TNotifyTableChanges.Changes property.
For a list of all members of this type, see TNotifyTableChanges members.

Unit
OraClasses

Syntax
TNotifyTableChanges = class(TCustomNotifyChanges);

Inheritance Hierarchy
TCustomNotifyChanges
TNotifyTableChanges© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.1.1 Members

TNotifyTableChanges class overview.

Properties
Name
Changes

Description
Contains the list of tables
and changes made to them.

© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

1058

Provide Feedback

5.18.1.1.2 Properties

Properties of the TNotifyTableChanges class.
For a complete list of the TNotifyTableChanges class members, see theTNotifyTableChanges Members topic.

PublicName

Description
Contains the list of tables
and changes made to them.

ChangesSee Also
TNotifyTableChanges Class
TNotifyTableChanges Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.1.2.1 Changes Property(Indexer)

Contains the list of tables and changes made to them.

Class
TNotifyTableChanges

Syntaxproperty Changes[Index: integer]: TNotifyTableChange; default;
Parameters
Index© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.2 TOraCursor ClassA class holding the internal Oracle Call Interface data CDA for Oracle 7 and the OCIStmt
descriptor for Oracle 8.
For a list of all members of this type, see TOraCursor members.
© 2019 Devart

1059

Oracle Data Access Components

Unit
OraClasses

SyntaxTOraCursor = class(TCRCursor);

Remarks
TOraCursor holds the internal Oracle Call Interface data CDA for Oracle 7 and the OCIStmt
descriptor for Oracle 8.

Inheritance Hierarchy
TSharedObject
TCRCursor
TOraCursor

See Also
TCursorField
TOraDataSet.Cursor
TOraParam.AsCursor© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.2.1 Members

TOraCursor class overview.

Properties
Name
CDA
OCICallStyle

OCIStmt
RefCount (inherited from TSharedObject)

Description
Used to return CDA.
Used to get or set the Oracle
Client version for asubsequent cursor
operations.
Used to return the OCIStmt
handler.
Used to return the count ofreference to a
© 2019 DevartReference

1060

TSharedObject object.
Used to set the cursor state.

State

Methods
Name

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Allocates CDA for Oracle 7
and OCIStmt handler for
Oracle 8.
Verifies if the cursor statepermits data fetching.
Releases the cursor data.

AddRef (inherited from TSharedObject)

AllocCursor
CanFetch
FreeCursor

Decrements the reference
count.

Release (inherited from TSharedObject)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.2.2 Properties

Properties of the TOraCursor class.
For a complete list of the TOraCursor class members, see the TOraCursor Members topic.

PublicName
CDA
OCICallStyle

OCIStmt
RefCount (inherited from TSharedObject)State© 2019 Devart

Description
Used to return CDA.
Used to get or set the Oracle
Client version for asubsequent cursor
operations.
Used to return the OCIStmt
handler.
Used to return the count ofreference to a
TSharedObject object.
Used to set the cursor state.

1061

Oracle Data Access Components

See Also
TOraCursor Class
TOraCursor Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.2.2.1 CDA Property

Used to return CDA.

Class
TOraCursor

Syntaxproperty CDA: PCDA;

Remarks
Use the CDA property to return CDA. You can use this property for Oracle 7.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.2.2.2 OCICallStyle Property

Used to get or set the Oracle Client version for a subsequent cursor operations.

Class
TOraCursor

Syntaxproperty OCICallStyle: TOCICallStyle;Remarks
Use the OCICallStyle property to get or set the Oracle Client version for a subsequent cursor
operations.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1062

5.18.1.2.2.3 OCIStmt Property

Used to return the OCIStmt handler.

Class
TOraCursor

Syntaxproperty OCIStmt: pOCIStmt;

Remarks
Use the OCIStmt property to return the OCIStmt handler. You can use this property for Oracle8.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.18.1.2.2.4 State Property

Used to set the cursor state.

Class
TOraCursor

Syntaxproperty State: TCursorState;

See Also
TCursorState© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.18.1.2.3 Methods

Methods of the TOraCursor class.
For a complete list of the TOraCursor class members, see the TOraCursor Members topic.

PublicName© 2019 Devart

Description

1063

Oracle Data Access Components

Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Allocates CDA for Oracle 7
and OCIStmt handler for
Oracle 8.
Verifies if the cursor statepermits data fetching.
Releases the cursor data.
Decrements the reference
count.

AddRef (inherited from TSharedObject)

AllocCursor
CanFetch
FreeCursor
Release (inherited from TSharedObject)

See Also
TOraCursor Class
TOraCursor Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.2.3.1 AllocCursor Method

Allocates CDA for Oracle 7 and OCIStmt handler for Oracle 8.

Class
TOraCursor

Syntax
procedure AllocCursor(StatementMode: TStatementMode =smAllocated);Parameters
AStatementCache

Remarks
Call the AllocCursor procedure to allocate CDA for Oracle 7 and OCIStmt handler for Oracle8.

See Also
FreeCursor© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

1064

Provide Feedback

5.18.1.2.3.2 CanFetch Method

Verifies if the cursor state permits data fetching.

Class
TOraCursor

Syntaxfunction CanFetch: boolean; override;
Return Value
True, if data fetching is permitted, False otherwise.

Remarks
Call the CanFetch function to verify whether the cursor is in the state that permits data
fetching.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.2.3.3 FreeCursor Method

Releases the cursor data.

Class
TOraCursor

Syntax
procedure FreeCursor;

Remarks
Call the FreeCursor method to release the cursor data.

See Also
AllocCursor© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1065

Oracle Data Access Components

Reserved.
5.18.1.3 TOraFile ClassA class holding the value of the BFile field and parameter.
For a list of all members of this type, see TOraFile members.

Unit
OraClasses

SyntaxTOraFile = class(TOraLob);

Remarks
TOraFile is a descendant of the TOraLob class. It holds the value of the BFile field andparameter.
The BFile datatype provides access to the file LOBs that are stored in file systems outside an
Oracle database. Oracle 8 currently supports access to binary files, or BFILEs. The BFILE
datatype allows the read-only support of large binary files; you cannot modify a file throughOracle.

Inheritance Hierarchy
TSharedObject
TBlob
TCompressedBlob
TOraLob
TOraFile

See Also
TOraLob
TBFileField
TOraParam.AsBFile© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1066

5.18.1.3.1 Members

TOraFile class overview.

Properties
Name
AsString (inherited from TBlob)
AsWideString (inherited from TBlob)
Cached (inherited from TOraLob)
Compressed (inherited from TCompressedBlob)
CompressedSize (inherited from TCompressedBlob)

FileDir

FileName

IsUnicode (inherited from TBlob)

OCILobLocator (inherited from TOraLob)
OCILobLocatorPtr (inherited from TOraLob)
OCISvcCtx (inherited from TOraLob)
RefCount (inherited from TSharedObject)
Size (inherited from TBlob)

Description
Used to manipulate BLOB
value as string.
Used to manipulate BLOB
value as Unicode string.
Used to indicate where the
LOB data is.
Used to indicate if the Blob
is compressed.
Used to indicatecompressed size of the Blob
data.
Determines the directory
alias of where the fileassociated with the BFile
field is stored.
Used to determine the nameof a file associated with the
BFile field.
Gives choice of making
TBlob store and processdata in Unicode format ornot.
Used to get or set the
OCILobLocator handle.
Used to retrieve the LOB
value type locator.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of the
TBlob value in bytes.

Methods
Name© 2019 Devart

Description

1067

Oracle Data Access Components

AddRef (inherited from TSharedObject)

AllocLob (inherited from TOraLob)
Assign (inherited from TBlob)
Clear (inherited from TBlob)
Close
CreateTemporary (inherited from TOraLob)
DisableBuffering (inherited from TOraLob)
EnableBuffering (inherited from TOraLob)
ExistsFreeLob (inherited from TOraLob)
FreeTemporary (inherited from TOraLob)
Init (inherited from TOraLob)
IsInit (inherited from TOraLob)
IsOpenIsTemporary (inherited from TOraLob)
LengthLob (inherited from TOraLob)
LoadFromFile (inherited from TBlob)
LoadFromStream (inherited from TBlob)
Open
Read (inherited from TBlob)

Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Allocates and initializes the
LOB locator.
Sets BLOB value fromanother TBlob object.
Deletes the current value in
TBlob object.
Closes a file opened by
Open.
Allocates and initializes atemporary LOB locator of
the specified type.
Disables the LOB buffering
for the LOB locator.
Enables the LOB buffering
for the LOB locator.
Determines whether a fileassociated with the BFile
field exists.
Releases the LOB locator
descriptor.
Frees a temporary LOB.
Initializes the
OCILobLocator handle.
Verifies if the LOB locator is
initialized.
Determines whether the fileassociated with the BFile
field is opened.
Indicates whether the LOB is
temporary.
Returns the number of bytes
contained in the LOB object.
Loads the contents of a file
into a TBlob object.
Copies the contents of a
stream into the TBlob object.
Opens the file associatedwith the BFile field.
Acquires a raw sequence of© 2019 DevartReference

bytes from the data stored in
TBlob.
Reads the LOB content fromthe server.
Reloads a file associatedthe BFile field opened byOpen.
Decrements the reference
count.
Saves the contents of the
TBlob object to a file.
Copies the contents of a
TBlob object to a stream.
Sets new TBlob size anddiscards all data over it.
Stores a raw sequence ofbytes into a TBlob object.
Writes a LOB value to theserver.

ReadLob (inherited from TOraLob)
RefreshRelease (inherited from TSharedObject)
SaveToFile (inherited from TBlob)
SaveToStream (inherited from TBlob)
Truncate (inherited from TBlob)
Write (inherited from TBlob)
WriteLob (inherited from TOraLob)© 1997-2019
Devart. All Rights
Reserved.

Request Support

1068

DAC Forum

Provide Feedback

5.18.1.3.2 Properties

Properties of the TOraFile class.
For a complete list of the TOraFile class members, see the TOraFile Members topic.

PublicName
AsString (inherited from TBlob)
AsWideString (inherited from TBlob)
Cached (inherited from TOraLob)
Compressed (inherited from TCompressedBlob)
CompressedSize (inherited from TCompressedBlob)
FileDir© 2019 Devart

Description
Used to manipulate BLOB
value as string.
Used to manipulate BLOB
value as Unicode string.
Used to indicate where the
LOB data is.
Used to indicate if the Blob
is compressed.
Used to indicatecompressed size of the Blob
data.
Determines the directory
alias of where the file1069

Oracle Data Access Components

FileName

IsUnicode (inherited from TBlob)

OCILobLocator (inherited from TOraLob)
OCILobLocatorPtr (inherited from TOraLob)
OCISvcCtx (inherited from TOraLob)
RefCount (inherited from TSharedObject)
Size (inherited from TBlob)

associated with the BFile
field is stored.
Used to determine the nameof a file associated with the
BFile field.
Gives choice of making
TBlob store and processdata in Unicode format ornot.
Used to get or set the
OCILobLocator handle.
Used to retrieve the LOB
value type locator.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of the
TBlob value in bytes.

See Also
TOraFile Class
TOraFile Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.3.2.1 FileDir Property

Determines the directory alias of where the file associated with the BFile field is stored.

Class
TOraFile

Syntaxproperty FileDir: string;

Remarks
Use FileDir to determine the directory alias where the file associated with the BFile field isstored.

© 2019 DevartReference1070

To create a directory alias use CREATE DIRECTORY.

See Also
FileName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.3.2.2 FileName Property

Used to determine the name of a file associated with the BFile field.

Class
TOraFile

Syntaxproperty FileName: string;

Remarks
Use the FileName property to determine the name of a file associated with the BFile field.

See Also
FileDir© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.3.3 Methods

Methods of the TOraFile class.
For a complete list of the TOraFile class members, see the TOraFile Members topic.

PublicName
AddRef (inherited from TSharedObject)

AllocLob (inherited from TOraLob)
Assign (inherited from TBlob)© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Allocates and initializes the
LOB locator.
Sets BLOB value from

1071

Oracle Data Access Components

Clear (inherited from TBlob)
Close
CreateTemporary (inherited from TOraLob)
DisableBuffering (inherited from TOraLob)
EnableBuffering (inherited from TOraLob)
ExistsFreeLob (inherited from TOraLob)
FreeTemporary (inherited from TOraLob)
Init (inherited from TOraLob)
IsInit (inherited from TOraLob)
IsOpenIsTemporary (inherited from TOraLob)
LengthLob (inherited from TOraLob)
LoadFromFile (inherited from TBlob)
LoadFromStream (inherited from TBlob)
Open
Read (inherited from TBlob)
ReadLob (inherited from TOraLob)
Refreshanother TBlob object.
Deletes the current value in
TBlob object.
Closes a file opened by
Open.
Allocates and initializes atemporary LOB locator of
the specified type.
Disables the LOB buffering
for the LOB locator.
Enables the LOB buffering
for the LOB locator.
Determines whether a fileassociated with the BFile
field exists.
Releases the LOB locator
descriptor.
Frees a temporary LOB.
Initializes the
OCILobLocator handle.
Verifies if the LOB locator is
initialized.
Determines whether the fileassociated with the BFile
field is opened.
Indicates whether the LOB is
temporary.
Returns the number of bytes
contained in the LOB object.
Loads the contents of a file
into a TBlob object.
Copies the contents of a
stream into the TBlob object.
Opens the file associatedwith the BFile field.
Acquires a raw sequence ofbytes from the data stored in
TBlob.
Reads the LOB content fromthe server.
Reloads a file associatedthe BFile field opened byOpen.
© 2019 DevartReference

1072

Decrements the reference
count.
Saves the contents of the
TBlob object to a file.
Copies the contents of a
TBlob object to a stream.
Sets new TBlob size anddiscards all data over it.
Stores a raw sequence ofbytes into a TBlob object.
Writes a LOB value to theserver.

Release (inherited from TSharedObject)
SaveToFile (inherited from TBlob)
SaveToStream (inherited from TBlob)
Truncate (inherited from TBlob)
Write (inherited from TBlob)
WriteLob (inherited from TOraLob)

See Also
TOraFile Class
TOraFile Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.3.3.1 Close Method

Closes a file opened by Open.

Class
TOraFile

Syntax
procedure Close;

Remarks
Call the Close procedure to close a file specified by FileDir and FileName properties of the
BFile field, opened earlier by Open.

See AlsoOpen© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1073

Oracle Data Access Components

5.18.1.3.3.2 Exists Method

Determines whether a file associated with the BFile field exists.

Class
TOraFile

Syntaxfunction Exists: boolean;
Return Value
True, if a file associated with the BFile field exists, False otherwise.

Remarks
Call the Exists method to determine if a file associated with the BFile field exists.

See AlsoOpen© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.3.3.3 IsOpen Method

Determines whether the file associated with the BFile field is opened.

Class
TOraFile

Syntaxfunction IsOpen: boolean;
Return Value
True, if the file is opened, False otherwise.

Remarks
Use the IsOpen method to determine whether the file associated with the BFile field is
opened.

See AlsoOpen© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

1074

Provide Feedback

5.18.1.3.3.4 Open Method

Opens the file associated with the BFile field.

Class
TOraFile

Syntax
procedure Open;

Remarks
Call the Open procedure to open the file associated with the BFile field.

See Also
Close
IsOpenExists© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.3.3.5 Refresh Method

Reloads a file associated the BFile field opened by Open.

Class
TOraFile

Syntax
procedure Refresh;

Remarks
Call the Refresh procedure to reload the file associated the BFile field, which was opened
earlier by Open.

See Also© 2019 Devart1075

Oracle Data Access Components

Open© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4 TOraInterval ClassA class providing support for Oracle 9 interval datatypes.
For a list of all members of this type, see TOraInterval members.

Unit
OraClasses

SyntaxTOraInterval = class(TSharedObject);Remarks
TOraInterval is used to support Oracle 9 interval datatypes. There are two interval datatypes:
INTERVAL YEAR TO MONTH,
INTERVAL DAY TO SECOND.
They can be distinguished by the DescriptorType property.

Inheritance Hierarchy
TSharedObject
TOraInterval© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.1 Members

TOraInterval class overview.

Properties
Name
AsString

DescriptorType

Description
Used to get and set theinterval value as string.
Used to define thedescriptor type allocated tooperate with the intervalvalue.
© 2019 DevartReference

1076

Used to get or set theinterval fractional second
precision.
Used to get or set the nullinterval value flag.
Used to get or set theleading field precision.
Used to get or set the
OCIInterval descriptor
handle.
Used to get the OCIInterval
type locator.
Used to return the count ofreference to a
TSharedObject object.

FracPrecision
IsNullLeadPrecision
OCIInterval
OCIIntervalPtr
RefCount (inherited from TSharedObject)

Methods
Name

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Allocates the OCIInterval
descriptor handle.
Compares the current
TOraInterval value with theDest value.
Frees the OCIInterval
descriptor handle.
Gets the values of the day
and second from an interval.
Gets the values of the year
and month from an interval.
Decrements the reference
count.
Used to set the values of the
day and second from in aninterval.
Sets the values of the year
and month in an interval.

AddRef (inherited from TSharedObject)

AllocInterval
CompareFreeInterval
GetDaySecond
GetYearMonth
Release (inherited from TSharedObject)
SetDaySecond
SetYearMonth© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1077

Oracle Data Access Components

Reserved.
5.18.1.4.2 Properties

Properties of the TOraInterval class.
For a complete list of the TOraInterval class members, see the TOraInterval Members topic.

PublicName

Description
Used to get and set theinterval value as string.
Used to define thedescriptor type allocated tooperate with the intervalvalue.
Used to get or set theinterval fractional second
precision.
Used to get or set the nullinterval value flag.
Used to get or set theleading field precision.
Used to get or set the
OCIInterval descriptor
handle.
Used to get the OCIInterval
type locator.
Used to return the count ofreference to a
TSharedObject object.

AsString

DescriptorType

FracPrecision
IsNullLeadPrecision
OCIInterval
OCIIntervalPtr
RefCount (inherited from TSharedObject)

See Also
TOraInterval ClassTOraInterval Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.2.1 AsString Property

Used to get and set the interval value as string.

Class© 2019 DevartReference

1078

TOraInterval

Syntaxproperty AsString: string;

Remarks
Use the AsString property to get and set the interval value as string. Oracle establishes
certain formats for each interval type.
INTERVAL YEAR TO MONTH format:'[year-]month'.
INTERVAL DAY TO SECOND formats:'seconds','minutes[:seconds]','hours[:minutes:[seconds]]','days[ hours[:minutes:[seconds]]]'.
Optional fields are surrounded by brackets.
Reading AsString property when IsNull is True returns an empty string.

See Also
IsNull© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.2.2 DescriptorType Property

Used to define the descriptor type allocated to operate with the interval value.

Class
TOraInterval

Syntaxproperty DescriptorType: cardinal;

Remarks
Use the DescriptorType property to define the type of the descriptor which is allocated tooperate with the interval value. In most cases you don't need to set this property directly: it isadjusted automatically when working with fields and parameters.
Valid values for this property are:© 2019 Devart1079

Oracle Data Access Components

OCI_DTYPE_INTERVAL_DS,
OCI_DTYPE_INTERVAL_YM.
They are defined in OraCall unit.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.2.3 FracPrecision Property

Used to get or set the interval fractional second precision.

Class
TOraInterval

Syntaxproperty FracPrecision: byte;

Remarks
Use the FracPrecision property to get or set fractional second precision of the interval (thenumber of digits that are used to represent fractional seconds). This property affects only
when reading the AsString property. The default value of the property is 6.

See Also
AsString© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.2.4 IsNull Property

Used to get or set the null interval value flag.

Class
TOraInterval

Syntaxproperty IsNull: boolean;

Remarks
Use the IsNull property to get or set the null interval value flag. When IsNull is True getting© 2019 DevartReference

1080

values via the GetDaySecond and GetYearMonth methods can raise an exception. The
AsString property in this case returns an empty string.

See Also
GetDaySecond
GetYearMonth
AsString© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.2.5 LeadPrecision Property

Used to get or set the leading field precision.

Class
TOraInterval

Syntaxproperty LeadPrecision: byte;

Remarks
Use the LeadPrecision property to get or set the leading field precision (the number of digitsthat are used to represent leading interval part). This property has effect only when reading
the AsString property. The default value of the property is 2.

See Also
AsString© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.18.1.4.2.6 OCIInterval Property

Used to get or set the OCIInterval descriptor handle.

Class
TOraInterval

Syntax© 2019 Devart

Provide Feedback

1081

Oracle Data Access Components

property OCIInterval: pOCIInterval;

Remarks
Use the OCIInterval property to get or set the OCIInterval descriptor handle.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.2.7 OCIIntervalPtr Property

Used to get the OCIInterval type locator.

Class
TOraInterval

Syntaxproperty OCIIntervalPtr: ppOCIInterval;

Remarks
Use the OCIIntervalPtr property to get the OCIInterval type locator.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.3 Methods

Methods of the TOraInterval class.
For a complete list of the TOraInterval class members, see the TOraInterval Members topic.

Protected
Name
AllocInterval
FreeInterval

Description
Allocates the OCIInterval
descriptor handle.
Frees the OCIInterval
descriptor handle.

PublicName
AddRef (inherited from TSharedObject)

Description
Increments the reference© 2019 DevartReference

1082

count for the number ofreferences dependent on theTSharedObject object.
Compares the current
TOraInterval value with theDest value.
Gets the values of the day
and second from an interval.
Gets the values of the year
and month from an interval.
Decrements the reference
count.
Used to set the values of the
day and second from in aninterval.
Sets the values of the year
and month in an interval.

CompareGetDaySecond
GetYearMonth
Release (inherited from TSharedObject)
SetDaySecond
SetYearMonth

See Also
TOraInterval ClassTOraInterval Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.3.1 AllocInterval Method

Allocates the OCIInterval descriptor handle.

Class
TOraInterval

Syntax
procedure AllocInterval;

Remarks
Call the AllocInterval method to allocate the OCIInterval descriptor handle according to the
DescriptorType property.

See Also
DescriptorType© 2019 Devart

1083

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.3.2 Compare Method

Compares the current TOraInterval value with the Dest value.

Class
TOraInterval

Syntaxfunction Compare(Dest: TOraInterval): integer;
Parameters
Dest
Holds the Dest value.
Return Value
the negative value if current interval is shorter than Dest, zero if intervals are equal, andpositive value if the current interval is longer than Dest.

Remarks
Call the Compare method to compare the current TOraInterval value with Dest value.
Returns negative value if current interval is shorter than Dest, zero if intervals are equal andpositive value if current interval is longer than Dest.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.3.3 FreeInterval Method

Frees the OCIInterval descriptor handle.

Class
TOraInterval

Syntax
procedure FreeInterval;

Remarks
Call the FreeInterval procedure frees the OCIInterval descriptor handle. After the FreeInterval© 2019 DevartReference

1084

call the IsNull property is set to True.

See Also
IsNull© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.3.4 GetDaySecond Method

Gets the values of the day and second from an interval.

Class
TOraInterval

Syntax
procedure GetDaySecond(var Day: integer; var Hour: integer; var
Min: integer; var Sec: integer; var FSec: integer);
Parameters
Day
Holds the day value.
Hour
Holds the hour value.
Min
Holds the minute value.
Sec
Holds the second value.
FSec
Holds the fraction second value.

Remarks
Call the GetDaySecond procedure to get the values of the day and second from an interval.

See Also
SetDaySecond© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1085

Oracle Data Access Components

5.18.1.4.3.5 GetYearMonth Method

Gets the values of the year and month from an interval.

Class
TOraInterval

Syntax
procedure GetYearMonth(var Year: integer; var Month: integer);
Parameters
Year
Holds the year value.
Month
Holds the month value.

Remarks
Call the GetYearMonth procedure to get the values of the year and month from an interval.

See Also
SetYearMonth© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.3.6 SetDaySecond Method

Used to set the values of the day and second from in an interval.

Class
TOraInterval

Syntax
procedure SetDaySecond(Day: integer; Hour: integer; Min: integer;
Sec: integer; FSec: integer);
Parameters
Day
Holds the day value.
Hour
Holds the hour value.

© 2019 DevartReference

1086

Min
Holds the minute value.
Sec
Holds the second value.
FSec
Holds the fraction second value.

Remarks
Call the SetDaySecond method to set the values of the day and second from in an interval.

See Also
GetDaySecond© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.4.3.7 SetYearMonth Method

Sets the values of the year and month in an interval.

Class
TOraInterval

Syntax
procedure SetYearMonth(Year: integer; Month: integer);
Parameters
Year
Holds the year value.
Month
Holds the month value.

Remarks
Call the SetYearMonth method to set the values of the year and month in an interval.

See Also
GetYearMonth© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1087

Oracle Data Access Components

5.18.1.5 TOraLob ClassA class holding the value of the BLOB and CLOB fields and parameters.
For a list of all members of this type, see TOraLob members.

Unit
OraClasses

SyntaxTOraLob = class(TCompressedBlob);

Remarks
TOraLob is a descendant of the TBlob class. It holds value of BLOB and CLOB fields andparameters.
Note: You can affect performance of reading/writing LOBs by changing
MemData.DefaultPieceSize variable to a different value. DefaultPieceSize defines the size ofdata portion transferred through network at a single OCI call.

Inheritance Hierarchy
TSharedObject
TBlob
TCompressedBlob
TOraLob

See Also
TBlob
TOraDataSet.GetLob
TOraParam.AsBLOBLocator© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.1 Members

TOraLob class overview.

Properties
Name
AsString (inherited from TBlob)

Description
Used to manipulate BLOB
© 2019 DevartReference

AsWideString (inherited from TBlob)
CachedCompressed (inherited from TCompressedBlob)
CompressedSize (inherited from TCompressedBlob)

IsUnicode (inherited from TBlob)

OCILobLocator
OCILobLocatorPtr
OCISvcCtx
RefCount (inherited from TSharedObject)
Size (inherited from TBlob)

1088

value as string.
Used to manipulate BLOB
value as Unicode string.
Used to indicate where the
LOB data is.
Used to indicate if the Blob
is compressed.
Used to indicatecompressed size of the Blob
data.
Gives choice of making
TBlob store and processdata in Unicode format ornot.
Used to get or set the
OCILobLocator handle.
Used to retrieve the LOB
value type locator.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of the
TBlob value in bytes.

Methods
Name
AddRef (inherited from TSharedObject)

AllocLob
Assign (inherited from TBlob)
Clear (inherited from TBlob)
CreateTemporary
DisableBuffering© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Allocates and initializes the
LOB locator.
Sets BLOB value fromanother TBlob object.
Deletes the current value in
TBlob object.
Allocates and initializes atemporary LOB locator of
the specified type.
Disables the LOB buffering

1089

Oracle Data Access Components

for the LOB locator.
Enables the LOB buffering
for the LOB locator.
Releases the LOB locator
descriptor.
Frees a temporary LOB.
Initializes the
OCILobLocator handle.
Verifies if the LOB locator is
initialized.
Indicates whether the LOB is
temporary.
Returns the number of bytes
contained in the LOB object.
Loads the contents of a file
into a TBlob object.
Copies the contents of a
stream into the TBlob object.
Acquires a raw sequence ofbytes from the data stored in
TBlob.
Reads the LOB content fromthe server.
Decrements the reference
count.
Saves the contents of the
TBlob object to a file.
Copies the contents of a
TBlob object to a stream.
Sets new TBlob size anddiscards all data over it.
Stores a raw sequence ofbytes into a TBlob object.
Writes a LOB value to theserver.

EnableBuffering
FreeLob
FreeTemporary
Init
IsInitIsTemporary
LengthLob
LoadFromFile (inherited from TBlob)
LoadFromStream (inherited from TBlob)
Read (inherited from TBlob)
ReadLob
Release (inherited from TSharedObject)
SaveToFile (inherited from TBlob)
SaveToStream (inherited from TBlob)
Truncate (inherited from TBlob)
Write (inherited from TBlob)
WriteLob© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.2 Properties

Properties of the TOraLob class.
For a complete list of the TOraLob class members, see the TOraLob Members topic.

© 2019 DevartReference

1090

PublicName
AsString (inherited from TBlob)
AsWideString (inherited from TBlob)
CachedCompressed (inherited from TCompressedBlob)
CompressedSize (inherited from TCompressedBlob)

IsUnicode (inherited from TBlob)

OCILobLocator
OCILobLocatorPtr
OCISvcCtx
RefCount (inherited from TSharedObject)
Size (inherited from TBlob)

Description
Used to manipulate BLOB
value as string.
Used to manipulate BLOB
value as Unicode string.
Used to indicate where the
LOB data is.
Used to indicate if the Blob
is compressed.
Used to indicatecompressed size of the Blob
data.
Gives choice of making
TBlob store and processdata in Unicode format ornot.
Used to get or set the
OCILobLocator handle.
Used to retrieve the LOB
value type locator.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of the
TBlob value in bytes.

See Also
TOraLob Class
TOraLob Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.18.1.5.2.1 Cached Property

Used to indicate where the LOB data is.

Class© 2019 Devart

DAC Forum

Provide Feedback

1091

Oracle Data Access Components

TOraLob

Syntaxproperty Cached: boolean;

Remarks
Use the Cached property to indicate whether the LOB data is cached on a client or it isaccessed remotely on the server. In most cases you don't need to set the value of thisproperty directly. To enable or disable LOB caching use the TOraDataSet.Options property.

See Also
TOraDataSet.Options© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.2.2 OCILobLocator Property

Used to get or set the OCILobLocator handle.

Class
TOraLob

Syntaxproperty OCILobLocator: pOCILobLocator;

Remarks
Use the OCILobLocator property to get or set the OCILobLocator handle.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.2.3 OCILobLocatorPtr Property

Used to retrieve the LOB value type locator.

Class
TOraLob

Syntax© 2019 DevartReference

1092

property OCILobLocatorPtr: ppOCILobLocator;

Remarks
Use the OCILobLocatorPtr property to retrieve the LOB value type locator.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.2.4 OCISvcCtx Property

Used to assign a service context handle.

Class
TOraLob

Syntaxproperty OCISvcCtx: TOCISvcCtx;

Remarks
Use the OCISvcCtx property to assign a service context handle. Some operations with LOBs
require service context handle. To get a service context handle use TOraSession.OCISvcCtx.

See Also
TOraSession.OCISvcCtx© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3 Methods

Methods of the TOraLob class.
For a complete list of the TOraLob class members, see the TOraLob Members topic.

PublicName
AddRef (inherited from TSharedObject)

AllocLob© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Allocates and initializes the
LOB locator.

1093

Oracle Data Access Components

Assign (inherited from TBlob)
Clear (inherited from TBlob)
CreateTemporary
DisableBuffering
EnableBuffering
FreeLob
FreeTemporary
Init
IsInitIsTemporary
LengthLob
LoadFromFile (inherited from TBlob)
LoadFromStream (inherited from TBlob)
Read (inherited from TBlob)
ReadLob
Release (inherited from TSharedObject)
SaveToFile (inherited from TBlob)
SaveToStream (inherited from TBlob)
Truncate (inherited from TBlob)
Write (inherited from TBlob)
WriteLob

Sets BLOB value fromanother TBlob object.
Deletes the current value in
TBlob object.
Allocates and initializes atemporary LOB locator of
the specified type.
Disables the LOB buffering
for the LOB locator.
Enables the LOB buffering
for the LOB locator.
Releases the LOB locator
descriptor.
Frees a temporary LOB.
Initializes the
OCILobLocator handle.
Verifies if the LOB locator is
initialized.
Indicates whether the LOB is
temporary.
Returns the number of bytes
contained in the LOB object.
Loads the contents of a file
into a TBlob object.
Copies the contents of a
stream into the TBlob object.
Acquires a raw sequence ofbytes from the data stored in
TBlob.
Reads the LOB content fromthe server.
Decrements the reference
count.
Saves the contents of the
TBlob object to a file.
Copies the contents of a
TBlob object to a stream.
Sets new TBlob size anddiscards all data over it.
Stores a raw sequence ofbytes into a TBlob object.
Writes a LOB value to theserver.
© 2019 DevartReference

1094

See Also
TOraLob Class
TOraLob Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3.1 AllocLob Method

Allocates and initializes the LOB locator.

Class
TOraLob

Syntax
procedure AllocLob; virtual;

Remarks
Call the AllocLob method to allocate and initialize the LOB locator.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3.2 CreateTemporary Method

Allocates and initializes a temporary LOB locator of the specified type.

Class
TOraLob

Syntax
procedure CreateTemporary(LobType: TLobType);
Parameters
LobTypeHolds the type of the temporary LOB locator.

Remarks
Call the CreateTemporary method to allocate and initialize a temporary LOB locator of thespecified type.
© 2019 Devart

1095

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3.3 DisableBuffering Method

Disables the LOB buffering for the LOB locator.

Class
TOraLob

Syntax
procedure DisableBuffering;

Remarks
Call the DisableBuffering method to disable the LOB buffering for the LOB locator. The nexttime data is read from or written to the LOB through the input locator, the LOB buffering
subsystem is not used.

See Also
EnableBuffering© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3.4 EnableBuffering Method

Enables the LOB buffering for the LOB locator.

Class
TOraLob

Syntax
procedure EnableBuffering;

Remarks
Call the EnableBuffering method to enable the LOB buffering for the LOB locator. The nexttime data is read from or written to the LOB through the input locator, the LOB buffering
subsystem is used.

See Also© 2019 DevartReference

1096

DisableBuffering© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3.5 FreeLob Method

Releases the LOB locator descriptor.

Class
TOraLob

Syntax
procedure FreeLob;

Remarks
Call the FreeLob method to release the LOB locator descriptor.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3.6 FreeTemporary Method

Frees a temporary LOB.

Class
TOraLob

Syntax
procedure FreeTemporary;

Remarks
Use the FreeTemporary method to free a temporary LOB.

See Also
FreeLob© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1097

Oracle Data Access Components

5.18.1.5.3.7 Init Method

Initializes the OCILobLocator handle.

Class
TOraLob

Syntax
procedure Init;

Remarks
Call the Init method to initialize the OCILobLocator handle.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3.8 IsInit Method

Verifies if the LOB locator is initialized.

Class
TOraLob

Syntaxfunction IsInit: boolean;
Return Value
True, if the LOB locator is initialized. False otherwise.

Remarks
Call the IsInit method to verify that the LOB locator is initialized.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3.9 IsTemporary Method

Indicates whether the LOB is temporary.

Class
TOraLob© 2019 DevartReference

1098

Syntaxfunction IsTemporary: LongBool;
Return Value
True, if the LOB is temporary. False otherwise.

Remarks
Call the IsTemporary method to indicate whether the LOB is temporary.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3.10 LengthLob Method

Returns the number of bytes contained in the LOB object.

Class
TOraLob

Syntaxfunction LengthLob: Cardinal;
Return Value
the LOB object size in bytes.

Remarks
Call the LengthLob method to return the number of bytes contained in the LOB object.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3.11 ReadLob Method

Reads the LOB content from the server.

Class
TOraLob

Syntax
procedure ReadLob(var SharedPiece: PPieceHeader; PrefetchLobSize:
Integer); overload;procedure ReadLob; overload;© 2019 Devart

1099

Oracle Data Access Components

Remarks
Call the ReadLob method to get the LOB content from the server. When reading suchproperties as AsString or AsWideString this method is called automatically.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.5.3.12 WriteLob Method

Writes a LOB value to the server.

Class
TOraLob

Syntax
procedure WriteLob;

Remarks
Call the WriteLob method to write a LOB value to the server.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.6 TOraNumber ClassA class supporting
For a list of all members of this type, see TOraNumber members.

Unit
OraClasses

SyntaxTOraNumber = class(TSharedObject);Remarks
TOraNumber is used to support the Oracle numbers in native format. Support of the internal
Oracle number format on clients allows to use full number precision without accuracy losses.

Inheritance Hierarchy© 2019 DevartReference

1100

TSharedObject
TOraNumber© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.6.1 Members

TOraNumber class overview.

Properties
Name
AsFloat
AsInteger
AsLargeInt
AsString
IsNullOCINumber
OCINumberPtr
RefCount (inherited from TSharedObject)

Description
Used to get and set the
number value as float.
Used to get and set the
number value as integer.
Used to get and set the
number value as Int64.
Used to get and set the
number value as string.
Used to set the null number
value flag.
Used to get or set the
OCINumber opaquestructure value.
Used to get a pointer to the
OCINumber structure.
Used to return the count ofreference to a
TSharedObject object.

Methods
Name
AddRef (inherited from TSharedObject)

AssignTo© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Copies all properties of thecurrent TOraNumber
instance to the Dest
TOraNumber instance.

1101

Oracle Data Access Components

Compares the current
TOraNumber value with theDest value.
Decrements the reference
count.

CompareRelease (inherited from TSharedObject)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.6.2 Properties

Properties of the TOraNumber class.
For a complete list of the TOraNumber class members, see the TOraNumber Members
topic.

PublicName

Description
Used to get and set the
number value as float.
Used to get and set the
number value as integer.
Used to get and set the
number value as Int64.
Used to get and set the
number value as string.
Used to set the null number
value flag.
Used to get or set the
OCINumber opaquestructure value.
Used to get a pointer to the
OCINumber structure.
Used to return the count ofreference to a
TSharedObject object.

AsFloat
AsInteger
AsLargeInt
AsString
IsNullOCINumber
OCINumberPtr
RefCount (inherited from TSharedObject)

See Also
TOraNumber Class
TOraNumber Class Members© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1102

Reserved.
5.18.1.6.2.1 AsFloat Property

Used to get and set the number value as float.

Class
TOraNumber

Syntaxproperty AsFloat: double;

Remarks
Use the AsFloat property to get and set the number value as float.
Reading AsFloat property when IsNull is True returns 0.

See Also
IsNull© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.6.2.2 AsInteger Property

Used to get and set the number value as integer.

Class
TOraNumber

Syntaxproperty AsInteger: Integer;

Remarks
Use the AsIntegert property to get and set the number value as integer.
Reading AsInteger property when IsNull is True returns 0.

See Also
IsNull© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1103

Oracle Data Access Components

Reserved.
5.18.1.6.2.3 AsLargeInt Property

Used to get and set the number value as Int64.

Class
TOraNumber

Syntaxproperty AsLargeInt: Int64;

Remarks
Use the AsLargeInt property to get and set the number value as Int64.
Reading AsLargeInt property when IsNull is True returns 0.

See Also
IsNull© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.6.2.4 AsString Property

Used to get and set the number value as string.

Class
TOraNumber

Syntaxproperty AsString: string;

Remarks
Use the AsString property to get and set the number value as string.
Reading AsString property when IsNull is True returns empty string.

See Also
IsNull© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1104

Reserved.
5.18.1.6.2.5 IsNull Property

Used to set the null number value flag.

Class
TOraNumber

Syntaxproperty IsNull: boolean;

Remarks
Use the IsNull property to get or set the null number value flag.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.6.2.6 OCINumber Property

Used to get or set the OCINumber opaque structure value.

Class
TOraNumber

Syntaxproperty OCINumber: OCINumber;

Remarks
Use the OCINumber property to get or set the OCINumber opaque structure value.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.18.1.6.2.7 OCINumberPtr Property

Used to get a pointer to the OCINumber structure.

Class
TOraNumber

Syntax© 2019 Devart

Provide Feedback

1105

Oracle Data Access Components

property OCINumberPtr: pOCINumber;

Remarks
Use the OCINumberPtr property to get a pointer to the OCINumber structure.

See Also
OCINumber© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.6.3 Methods

Methods of the TOraNumber class.
For a complete list of the TOraNumber class members, see the TOraNumber Members
topic.

PublicName

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Copies all properties of thecurrent TOraNumber
instance to the Dest
TOraNumber instance.
Compares the current
TOraNumber value with theDest value.
Decrements the reference
count.

AddRef (inherited from TSharedObject)

AssignTo

CompareRelease (inherited from TSharedObject)

See Also
TOraNumber Class
TOraNumber Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1106

5.18.1.6.3.1 AssignTo Method

Copies all properties of the current TOraNumber instance to the Dest TOraNumber instance.

Class
TOraNumber

Syntax
procedure AssignTo(Dest: TOraNumber);Parameters
Dest
Holds a Dest TOraNumber instance.

Remarks
Call AssignTo method to copy all properties of the current TOraNumber instance to the Dest
TOraNumber instance.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.6.3.2 Compare Method

Compares the current TOraNumber value with the Dest value.

Class
TOraNumber

Syntaxfunction Compare(Dest: TOraNumber): integer;
Parameters
Dest
Holds the Dest value to compare the current TOraNumber value with.
Return Valuea negative value if current number is less than Dest, zero if numbers are equal, and apositive value if the current number is greater than Dest.

Remarks
Call the Compare method to compare the current TOraNumber value with the Dest value.
Returns a negative value if current number is less than Dest, zero if numbers are equal, and© 2019 Devart

1107

Oracle Data Access Components

a positive value if the current number is greater than Dest.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7 TOraTimeStamp ClassA class supporting Oracle 9 timestamp datatypes.
For a list of all members of this type, see TOraTimeStamp members.

Unit
OraClasses

SyntaxTOraTimeStamp = class(TSharedObject);Remarks
TOraTimeStamp is used to support Oracle 9 timestamp datatypes. There are threetimestamp datatypes:
TIMESTAMP,TIMESTAMP WITH TIME ZONE,TIMESTAMP WITH LOCAL TIME ZONE.
They can be distinguished by DescriptorType property.

Inheritance Hierarchy
TSharedObject
TOraTimeStamp© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.1 Members

TOraTimeStamp class overview.

Properties
Name
AsDateTime

Description
Used to get and set thetimestamp value as
TDateTime.

© 2019 DevartReference

AsString

DescriptorType

FormatIsNullOCIDateTime
OCIDateTimePtr

Precision

RefCount (inherited from TSharedObject)

TimeZone

1108

Used to get and set thetimestamp value as string.
Defines the type of thedescriptor allocated tooperate with the intervalvalue.
Used to get or set the datetime format model for
operations with the
TOraTimeStamp.AsString
property.
Used to get or set the nulltimestamp value flag.
Used to set the
OCIDateTime descriptor
handle.
Used to provide the
OCIDateTime type locator.
Used to learn or set the
precision with which thefractional seconds are
returned.
Used to return the count ofreference to a
TSharedObject object.
Used to provide a time zone
name portion of the datetime
value.

Methods
Name
AddRef (inherited from TSharedObject)

AllocDateTime

Compare© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Allocates the OCIDateTime
descriptor handle according
to theTOraTimeStamp.Descriptor
Type property.
Compares the current
TOraTimeStamp value with
the Dest value.

1109

Oracle Data Access Components

Constructs datetime
descriptor.
Provides a date portion of
the datetime value.
Provides a time portion of
the datetime value.
Provides a time zone portionof the datetime value.
Decrements the reference
count.
Provides a date portion of
the datetime value.
Sets the time into a datetime
value.
Provides a time zone portionof the datetime value.

Construct
GetDateGetTime
GetTimeZoneOffset
Release (inherited from TSharedObject)
SetDateSetTimeSetTimeZoneOffset© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.2 Properties

Properties of the TOraTimeStamp class.
For a complete list of the TOraTimeStamp class members, see the TOraTimeStamp
Members topic.

PublicName
AsDateTime
AsString

DescriptorType

FormatDescription
Used to get and set thetimestamp value as
TDateTime.
Used to get and set thetimestamp value as string.
Defines the type of thedescriptor allocated tooperate with the intervalvalue.
Used to get or set the datetime format model for
operations with the
TOraTimeStamp.AsString
property.

© 2019 DevartReference

1110

Used to get or set the nulltimestamp value flag.
Used to set the
OCIDateTime descriptor
handle.
Used to provide the
OCIDateTime type locator.
Used to learn or set the
precision with which thefractional seconds are
returned.
Used to return the count ofreference to a
TSharedObject object.
Used to provide a time zone
name portion of the datetime
value.

IsNullOCIDateTime
OCIDateTimePtr

Precision

RefCount (inherited from TSharedObject)

TimeZoneSee Also
TOraTimeStamp Class
TOraTimeStamp Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.2.1 AsDateTime Property

Used to get and set the timestamp value as TDateTime.

Class
TOraTimeStamp

Syntaxproperty AsDateTime: TDateTime;

Remarks
Use the AsDateTime property to get and set the timestamp value as TDateTime.
Reading the AsDateTime property when IsNull is True returns 0.

See Also
IsNull© 2019 Devart

1111

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.2.2 AsString Property

Used to get and set the timestamp value as string.

Class
TOraTimeStamp

Syntaxproperty AsString: string;

Remarks
Use the AsString property to get and set the timestamp value as string. Format of the string is
specified by the Format property.
Reading the AsString property when IsNull is True returns empty string.

See Also
FormatIsNull© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.2.3 DescriptorType Property

Defines the type of the descriptor allocated to operate with the interval value.

Class
TOraTimeStamp

Syntaxproperty DescriptorType: cardinal;

Remarks
Use the DescriptorType property to define the type of the descriptor that is allocated tooperate with the interval value. In most cases you don't need to set this property directly: it isadjusted automatically when working with fields and parameters.

© 2019 DevartReference

1112

Valid values for this property are:
OCI_DTYPE_TIMESTAMP,OCI_DTYPE_TIMESTAMP_TZ,
OCI_DTYPE_TIMESTAMP_LTZ.
They are defined in the OraCall unit.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.2.4 Format Property

Used to get or set the date-time format model for operations with the AsString property.

Class
TOraTimeStamp

Syntaxproperty Format: string;

Remarks
Use the Format property to get or set the date-time format model for operations with the
AsString property. For example, the date format model for string '17:54:23' is 'HH24:MM:SS' .
For complete description of the date-time models refer to the Oracle documentation.

See Also
AsString© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.18.1.7.2.5 IsNull Property

Used to get or set the null timestamp value flag.

Class
TOraTimeStamp

Syntaxproperty IsNull: boolean;

Remarks© 2019 Devart

Provide Feedback

1113

Oracle Data Access Components

Use the IsNull property to get or set the null timestamp value flag. When IsNull is true getting
values via the GetDate, GetTime and SetTimeZoneOffset methods can raise an exception.
The AsString property in this case returns empty string. The AsDateTime property returns 0.

See Also
GetDateGetTimeSetTimeZoneOffset
AsString
AsDateTime© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.2.6 OCIDateTime Property

Used to set the OCIDateTime descriptor handle.

Class
TOraTimeStamp

Syntaxproperty OCIDateTime: pOCIDateTime;

Remarks
Use the OCIDateTime property to get or set the OCIDateTime descriptor handle.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.2.7 OCIDateTimePtr Property

Used to provide the OCIDateTime type locator.

Class
TOraTimeStamp

Syntaxproperty OCIDateTimePtr: ppOCIDateTime;© 2019 DevartReference

1114

Remarks
Use the OCIDateTimePtr property to get the OCIDateTime type locator.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.2.8 Precision Property

Used to learn or set the precision with which the fractional seconds are returned.

Class
TOraTimeStamp

Syntaxproperty Precision: byte;

Remarks
Use the Precision property to get or set the precision in which the fractional seconds are
returned when reading the AsString property. The default value of the property is 6.

See Also
AsString© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.2.9 TimeZone Property

Used to provide a time zone name portion of the datetime value.

Class
TOraTimeStamp

Syntaxproperty TimeZone: string;

Remarks
Use the TimeZone property to get a time zone name portion of the datetime value.

© 1997-2019© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1115

Oracle Data Access Components

Devart. All Rights
Reserved.
5.18.1.7.3 Methods

Methods of the TOraTimeStamp class.
For a complete list of the TOraTimeStamp class members, see the TOraTimeStamp
Members topic.

Protected
Name
AllocDateTime

Description
Allocates the OCIDateTime
descriptor handle according
to theTOraTimeStamp.Descriptor
Type property.

PublicName
AddRef (inherited from TSharedObject)CompareConstruct
GetDateGetTime
GetTimeZoneOffset
Release (inherited from TSharedObject)
SetDateSetTimeSetTimeZoneOffset

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Compares the current
TOraTimeStamp value with
the Dest value.
Constructs datetime
descriptor.
Provides a date portion of
the datetime value.
Provides a time portion of
the datetime value.
Provides a time zone portionof the datetime value.
Decrements the reference
count.
Provides a date portion of
the datetime value.
Sets the time into a datetime
value.
Provides a time zone portionof the datetime value.
© 2019 DevartReference

1116

See Also
TOraTimeStamp Class
TOraTimeStamp Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.3.1 AllocDateTime Method

Allocates the OCIDateTime descriptor handle according to the DescriptorType property.

Class
TOraTimeStamp

Syntax
procedure AllocDateTime;

Remarks
Use the AllocDateTime method to allocate the OCIDateTime descriptor handle according to
the DescriptorType property.

See Also
DescriptorType© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.18.1.7.3.2 Compare Method

Compares the current TOraTimeStamp value with the Dest value.

Class
TOraTimeStamp

Syntaxfunction Compare(Dest: TOraTimeStamp): integer;
Parameters
Dest
Holds the Dest value.
© 2019 Devart

Provide Feedback

1117

Oracle Data Access Components

Return Value
negative value if the current timestamp is less than Dest, zero if timestamp is equal, andpositive value if the current timestamp is greater than Dest.

Remarks
Call the Compare method to compare the current TOraTimeStamp value with the Dest value.
Returns negative value if current timestamp is less than Dest, zero if timestamp are equaland positive value if current timestamp is greater than Dest.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.3.3 Construct Method

Constructs datetime descriptor.

Class
TOraTimeStamp

Syntax
procedure Construct(Year: smallint; Month: byte; Day: byte; Hour:byte; Min: byte; Sec: byte; FSec: cardinal; TimeZone: string);
Parameters
Year
Holds the year.
Month
Holds the month.
Day
Holds the day.
Hour
Holds the hour.
Min
Holds the minute.
Sec
Holds the second.
FSec
Holds the fraction second.
TimeZoneHolds the time zone name.

© 2019 DevartReference

1118

Remarks
Call the Construct method to construct datetime descriptor. When calling the Constructprocedure only relevant fields based on the datetime type are used. For the type with timezone, the date and time fields are assumed to be in the local time of the specified time zone.
If the time zone is not specified, then session default time zone is assumed.

See Also
SetDateSetTimeSetTimeZoneOffset© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.3.4 GetDate Method

Provides a date portion of the datetime value.

Class
TOraTimeStamp

Syntax
procedure GetDate(var Year: smallint; var Month: byte; var Day:byte);
Parameters
Year
Holds the year.
Month
Holds the month.
Day
Holds the day.

Remarks
Call the GetDate method to get a date (year, month, day) portion of the datetime value.

See Also
GetTimeSetTimeZoneOffset© 2019 Devart

1119

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.3.5 GetTime Method

Provides a time portion of the datetime value.

Class
TOraTimeStamp

Syntax
procedure GetTime(var Hour: byte; var Min: byte; var Sec: byte;
var FSec: cardinal);
Parameters
Hour
Holds the hour.
Min
Holds the minute.
Sec
Holds the second.
FSec
Holds the fraction second.

Remarks
Call the GetTime method to get a time (hour, minute, second, fractional second) of thedatetime value.

See Also
GetDateSetTimeZoneOffset
GetTime© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.3.6 GetTimeZoneOffset Method

Provides a time zone portion of the datetime value.

Class© 2019 DevartReference

1120

TOraTimeStamp

Syntax
procedure GetTimeZoneOffset(var TZHour: shortint; var TZMin:
shortint);
Parameters
TZHourTZMinRemarks
Call the GetTimeZoneOffset method to get a time zone (hour, minute) portion of the datetime
value.

See Also
GetDateGetTime© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.3.7 SetDate Method

Provides a date portion of the datetime value.

Class
TOraTimeStamp

Syntax
procedure SetDate(Year: smallint; Month: byte; Day: byte);
Parameters
Year
Holds the year.
Month
Holds the month.
Day
Holds the day.

Remarks© 2019 Devart

1121

Oracle Data Access Components

Call the SetDate method to set a date (year, month, day) portion in a datetime value.

See Also
Construct© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.1.7.3.8 SetTime Method

Sets the time into a datetime value.

Class
TOraTimeStamp

Syntax
procedure SetTime(Hour: byte; Min: byte; Sec: byte; FSec:
cardinal);
Parameters
Hour
Holds the hour.
Min
Holds the minute.
Sec
Holds the second.
FSec
Holds the fraction second.

Remarks
Call the SetTime method to set the time (hour, minute, second, fractional second) into a
datetime value.

See Also
Construct© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference1122

5.18.1.7.3.9 SetTimeZoneOffset Method

Provides a time zone portion of the datetime value.

Class
TOraTimeStamp

Syntax
procedure SetTimeZoneOffset(TZHour: shortint; TZMin: shortint);
Parameters
TZHourHolds the hour.
TZMin
Holds the minute.

Remarks
Call the SetTimeZoneOffset method to set a time zone (hour, minute) portion of the datetime
value.

See Also
Construct© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.2 Enumerations
Enumerations in the OraClasses unit.

Enumerations
Name
TChangeNotifyEventType
TConnectMode

TMessageType
TOptimizerMode© 2019 Devart

Description
Contains the event type.
Specifies the system
privileges used when a user
connects to the server.
Defines the type of the next
message found in thereceived named pipe local
buffer.
Specifies the optimizer

1123

Oracle Data Access Components

mode for connection.
© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.2.1 TChangeNotifyEventType Enumeration

Contains the event type.

Unit
OraClasses

SyntaxTChangeNotifyEventType = (cneNone, cneStartup, cneShutdown,
cneShutdownAny, cneDropDB, cneDereg, cneObjChange, cneQueryChange);

ValuesValue
cneDereg
cneDropDB
cneNonecneObjChange
cneQueryChange
cneShutdown
cneShutdownAny
cneStartup© 1997-2019
Devart. All Rights
Reserved.

Meaning
Registration has been removed.
Database has been dropped.
No event
Object change notification.
Query change notification.
Instance shutdown notification.
Any instance shutdown when running RAC.
Instance startup notification.
Request Support

DAC Forum

Provide Feedback

5.18.2.2 TConnectMode Enumeration

Specifies the system privileges used when a user connects to the server.

Unit
OraClasses

SyntaxTConnectMode = (cmNormal, cmSysOper, cmSysDBA, cmSysASM);© 2019 DevartReference

1124

ValuesValue
cmNormal
cmSysASM
cmSysDBA
cmSysOper

Meaning
Connect as an ordinary user. The default value.
Connect with the SYSASM role.
Connect with the SYSDBA role.
Connect with the SYSOPER role.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.2.3 TMessageType Enumeration

Defines the type of the next message found in the received named pipe local buffer.

Unit
OraClasses

Syntax
TMessageType = (mtNone, mtNumber, mtString, mtDate);

ValuesValue
mtDatemtNonemtNumber
mtString© 1997-2019
Devart. All Rights
Reserved.

Meaning
Indicates that the messages found in the local buffer are of theDate type.
Indicates that no more messages are found in the local buffer.
Indicates that the messages found in the local buffer are of the
Number type.
Indicates that the messages found in the local buffer are of theString type.
Request Support

5.18.2.4 TOptimizerMode Enumeration

Specifies the optimizer mode for connection.

Unit
OraClasses© 2019 Devart

DAC Forum

Provide Feedback

1125

Oracle Data Access Components

Syntax
TOptimizerMode = (omDefault, omFirstRows1000, omFirstRows100,
omFirstRows10, omFirstRows1, omFirstRows, omAllRows, omChoose,
omRule);ValuesValue

Meaning
Explicitly chooses the cost-based approach to optimize aomAllRows
statement block with a goal of best throughput (that is minimum
total resource consumption).
Causes the optimizer to choose between the rule-based andcost-based approaches for a SQL statement. The optimizer
selection is based on the presence of statistics for the tables
accessed by the statement. If the data dictionary has statistics foromChoose
at least one of these tables, then the optimizer uses the costbased approach and optimizes with the goal of the best
throughput. If the data dictionary does not have statistics for thesetables, then it uses the rule-based approach.
omDefault
Session optimizer mode will not be changed.
This mode is retained for backward compatibility and plan
omFirstRows
stability. It optimizes for the best plan to return the first single row.
Instruct Oracle to optimize a SQL statement for fast response. It
instructs Oracle to choose the plan that returns the first row mostomFirstRows1
efficiently. If you use the version server lower than Oracle 9.0,
these values have the same effect as omFirstRows.
Instruct Oracle to optimize an SQL statement for fast response. It
instructs Oracle to choose the plan that returns the first 10 rows
omFirstRows10
most efficiently. If you use the version server lower than Oracle
9.0, these values have the same effect as omFirstRows.
Instruct Oracle to optimize an SQL statement for fast response. It
omFirstRows100 instructs Oracle to choose the plan that returns the first 100 rows
most efficiently. If you use the version server lower than Oracle
9.0, these values have the same effect as omFirstRows.
Instruct Oracle to optimize an SQL statement for fast response. It
omFirstRows1000 instructs Oracle to choose the plan that returns the first 1000 rows
most efficiently. If you use the version server lower than Oracle
9.0, these values have the same effect as omFirstRows.
Chooses rule-based optimization (RBO). Any other value causes
the optimizer to choose cost-based optimization (CBO). The ruleomRule
based optimizer is the archaic optimizer mode from the earliest
releases of Oracle Database.
© 1997-2019
Request Support
DAC Forum
Provide Feedback© 2019 DevartReference

1126

Devart. All Rights
Reserved.
5.18.3 Variables
Variables in the OraClasses unit.

Variables
Name

Description
Set this constant to define
the type of NUMBER fields
with Scale > 0.
Set this constant to define
the type of NUMBER fields
with precision less than orequal to IntegerPrecision as
dtInteger.
Set this constant to define
the type of NUMBER fields
with precision greater thanthe IntegerPresision andless than or equal toLargeIntPrecision as
dtLargeInt.

FloatPrecision

IntegerPrecision

LargeIntPrecision© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.3.1 FloatPrecision Variable

Set this constant to define the type of NUMBER fields with Scale > 0.

Unit
OraClasses

SyntaxFloatPrecision: integer = 15;

Remarks
Set this constant to define the type of NUMBER fields with Scale > 0. If its precision is lessthan or equal to FloatPrecision the field will be defined as TFloatField. Otherwise it will bedefined as TOraNumberField (if TOraSessionOptions.EnableNumbers option is set to True).

© 2019 Devart

1127

Oracle Data Access Components

According to these constants and TOraSessionOptions.EnableIntegers and
TOraSessionOptions.EnableNumbers options, Oracle NUMBER type is mapped to ODAC
field classes in the following way:

Conditions
Precision <= IntegerPrecision, Scale = 0,
TOraSessionOptions.EnableIntegers =True
IntegerPrecision < Precision <=LargeIntPrecision, Scale = 0,
TOraSessionOptions.EnableIntegers =TruePrecision > FloatPrecision, Scale > 0,
TOraSessionOptions.EnableNumbers =True
In other cases

Field class
TIntegerField

TLargeIntField

TOraNumberField
TFloatField

ExampleFloatPrecision: integer = 15;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.3.2 IntegerPrecision Variable

Set this constant to define the type of NUMBER fields with precision less than or equal toIntegerPrecision as dtInteger.

Unit
OraClasses

SyntaxIntegerPrecision: integer = 9;

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.18.3.3 LargeIntPrecision Variable

Set this constant to define the type of NUMBER fields with precision greater than the
IntegerPresision and less than or equal to LargeIntPrecision as dtLargeInt.

Unit© 2019 DevartReference

1128

OraClasses

SyntaxLargeIntPrecision: integer = 0;

© 1997-2019
Devart. All Rights
Reserved.

5.19

Request Support

DAC Forum

Provide Feedback

OraConnectionPool
This unit contains the TOraConnectionPoolManager class for managing connection pool.

Enumerations
Name
TOraPoolingType© 1997-2019
Devart. All Rights
Reserved.

Description
Specifies the pool type.
Request Support

DAC Forum

Provide Feedback

5.19.1 Enumerations
Enumerations in the OraConnectionPool unit.

Enumerations
Name
TOraPoolingType© 1997-2019
Devart. All Rights
Reserved.

Description
Specifies the pool type.
Request Support

DAC Forum

5.19.1.1 TOraPoolingType Enumeration

Specifies the pool type.

Unit
OraConnectionPool

Syntax
TOraPoolingType = (optLocal, optOCI, optMTS);© 2019 Devart

Provide Feedback

1129

Oracle Data Access Components

ValuesValue
optLocal
optMTS
optOCI© 1997-2019
Devart. All Rights
Reserved.

5.20

Meaning
Pool is created and controlled by ODAC.
Pool is created and controlled by MTS.
Pool is created and controlled by OCI.
Request Support

DAC Forum

Provide Feedback

OraErrHand
This unit contains the TOraErrorHandler component.

ClassesName

Description
A component allowing
translating of error
messages.

TOraErrorHandler

Types
Name

Description
This type is used for the
TOraErrorHandler.OnError
event.

TOnOraErrorEvent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.1 Classes
Classes in the OraErrHand unit.

ClassesName

Description
A component allowing
translating of error
messages.

TOraErrorHandler© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1130

Devart. All Rights
Reserved.
5.20.1.1 TOraErrorHandler Class

A component allowing translating of error messages.
For a list of all members of this type, see TOraErrorHandler members.

Unit
OraErrHand

SyntaxTOraErrorHandler = class(TComponent);

Remarks
TOraErrorHandler allows to translate error messages. Messages is stored in error table orcan be got out of OnError event handler.
Structure of the error table must be as following:
ErrorCodeINTEGER
Constraint VARCHAR2
Message
VARCHAR2
SenderName VARCHAR2
ErrorClass VARCHAR2
You can create and edit error table by ErrorHandler Editor in design time.

See Also
EOraError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.1.1.1 Members

TOraErrorHandler class overview.

Properties
Name
ActiveDebug© 2019 Devart

Description
Activates searchingmessages in error table.
Used for an error message
to contain additional
information.

1131

Oracle Data Access Components

Used to specify the sessionin which the dataset will be
executed.
Used to define the error
table name.

SessionTableName

Methods
Name

Description
Sets the Active property of atable to False.
Sets the Active property to
True.

Close
Open

EventsName

Description
Occurs if an appropriate
error can not be found in theerror table or Active isFalse.

OnError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.1.1.2 Properties

Properties of the TOraErrorHandler class.
For a complete list of the TOraErrorHandler class members, see the TOraErrorHandler
Members topic.

Published
Name
ActiveDebug

SessionDescription
Activates searchingmessages in error table.
Used for an error message
to contain additional
information.
Used to specify the sessionin which the dataset will be
executed.

© 2019 DevartReference

1132

Used to define the error
table name.

TableName

See Also
TOraErrorHandler Class
TOraErrorHandler Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.1.1.2.1 Active Property

Activates searching messages in error table.

Class
TOraErrorHandler

Syntaxproperty Active: boolean default False;

Remarks
When the Active property is True, ErrorHandler searches messages in error table.

See AlsoOpen© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.20.1.1.2.2 Debug Property

Used for an error message to contain additional information.

Class
TOraErrorHandler

Syntaxproperty Debug: boolean default False;

Remarks© 2019 Devart

Provide Feedback

1133

Oracle Data Access Components

When the Debug property is True, error message contains additional information: sender
name, constraint name and error code.
Note: To use this property you should explicitly include OdacVcl (OdacClx under Linux) unit
to your project.
If TOraSQLMonitor is used in the project and the TOraSQLMonitor.Active property is set to
False, the debug window is not displayed.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.1.1.2.3 Session Property

Used to specify the session in which the dataset will be executed.

Class
TOraErrorHandler

Syntaxproperty Session: TOraSession;

Remarks
Use the Session property to specify the session in which the dataset will be executed. If
Session is not connected, the Open method calls Session.Connect.

See Also
TOraSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.1.1.2.4 TableName Property

Used to define the error table name.

Class
TOraErrorHandler

Syntaxproperty TableName: string;© 2019 DevartReference

1134

Remarks
Use the TableName property to determine the error table name. The error table must exist.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.1.1.3 Methods

Methods of the TOraErrorHandler class.
For a complete list of the TOraErrorHandler class members, see the TOraErrorHandler
Members topic.

PublicName

Description
Sets the Active property of atable to False.
Sets the Active property to
True.

Close
Open

See Also
TOraErrorHandler Class
TOraErrorHandler Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.1.1.3.1 Close Method

Sets the Active property of a table to False.

Class
TOraErrorHandler

Syntax
procedure Close;

Remarks
Call the Close method to set the Active property of a table to False. When Active is False, thetable is closed; the table cannot read data from or write data to the database.

© 2019 Devart

1135

Oracle Data Access Components

See AlsoOpen© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.1.1.3.2 Open Method

Sets the Active property to True.

Class
TOraErrorHandler

Syntax
procedure Open;

Remarks
Call the Open method to set the Active property for the table to True. When Active is True,
data can be read from and written to the database.

See Also
Close
Active© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.1.1.4 Events

Events of the TOraErrorHandler class.
For a complete list of the TOraErrorHandler class members, see the TOraErrorHandler
Members topic.

Published
Name
OnErrorDescription
Occurs if an appropriate
error can not be found in theerror table or Active isFalse.

© 2019 DevartReference

1136

See Also
TOraErrorHandler Class
TOraErrorHandler Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.1.1.4.1 OnError Event

Occurs if an appropriate error can not be found in the error table or Active is False.

Class
TOraErrorHandler

Syntaxproperty OnError: TOnOraErrorEvent;Remarks
Occurs when ErrorHandler can not find an appropriate error in the error table or Active isFalse.

See Also
TCustomDAConnection.OnError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.20.2 Types
Types in the OraErrHand unit.

Types
Name

Description
This type is used for the
TOraErrorHandler.OnError
event.

TOnOraErrorEvent© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1137

Oracle Data Access Components

5.20.2.1 TOnOraErrorEvent Procedure ReferenceThis type is used for the TOraErrorHandler.OnError event.

Unit
OraErrHand

SyntaxTOnOraErrorEvent = procedure (Sender: TObject; E: Exception;
ErrorCode: integer; const ConstraintName: string; var Msg:
string) of object;Parameters
SenderAn object that raised the event.
E
Holds the reference to an exception object.
ErrorCodeThe code of an error.
ConstraintName
Holds the name of the constraint that raised the error.
Msg
Holds the error message (can be set individually).

© 1997-2019
Devart. All Rights
Reserved.

5.21

Request Support

DAC Forum

Provide Feedback

OraErrorThis unit contains the EOraError exception class.

ClassesName

Description
Raised when a component
detects Oracle error.

EOraError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1138

5.21.1 Classes
Classes in the OraError unit.

ClassesName

Description
Raised when a component
detects Oracle error.

EOraError© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.21.1.1 EOraError Class

Raised when a component detects Oracle error.
For a list of all members of this type, see EOraError members.

Unit
OraError

SyntaxEOraError = class(EDAError);

Remarks
EOraError is raised when a component detects Oracle error. Use EOraError in an exception
handling block.

Inheritance Hierarchy
EDAError
EOraError

See Also
TOraErrorHandler© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1139

Oracle Data Access Components

5.21.1.1.1 Members

EOraError class overview.

Properties
Name

Description
Contains the component thatcaused the error.
Determines the error code
returned by the server.
Holds reference to thesender if exception is raisedby the TComponent
instance.

Component (inherited from EDAError)
ErrorCode (inherited from EDAError)

Sender© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.21.1.1.2 Properties

Properties of the EOraError class.
For a complete list of the EOraError class members, see the EOraError Members topic.

PublicName

Description
Contains the component thatcaused the error.
Determines the error code
returned by the server.
Holds reference to thesender if exception is raisedby the TComponent
instance.

Component (inherited from EDAError)
ErrorCode (inherited from EDAError)

SenderSee Also
EOraError ClassEOraError Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1140

5.21.1.1.2.1 Sender Property

Holds reference to the sender if exception is raised by the TComponent instance.

Class
EOraError

Syntaxproperty Sender: TComponent;

Remarks
The Sender property holds reference to the sender if exception is raised by the TComponent
instance.

© 1997-2019
Devart. All Rights
Reserved.

5.22

Request Support

DAC Forum

Provide Feedback

OraLoaderThis unit contains implementation of the TOraLoader component.

ClassesName
TDPColumn

TOraLoader

Description
A base class holding acollection of TDPColumn
objects.
TOraLoader allows to load
external data into the server
database.

Types
Name
TDPErrorEvent
TDPGetColumnDataEvent

TDPPutDataEvent© 2019 Devart

Description
This type is used for the
TOraLoader.OnError event.
This type is used for the
TOraLoader.OnGetColumn
Data event.
This type is used for the
TOraLoader.OnPutData
event.

1141

Oracle Data Access Components

Enumerations
Name

Description
Specifies the action for
TOraLoader to take toprocess errors that occur
during loading.
Specifies the access mode
to use for a TOraLoader
object when a databasetable is being modified.

TDPErrorAction

TLoadMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.1 Classes
Classes in the OraLoader unit.

ClassesName

Description
A base class holding acollection of TDPColumn
objects.
TOraLoader allows to load
external data into the server
database.

TDPColumn

TOraLoader© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.1.1 TDPColumn ClassA base class holding a collection of TDPColumn objects.
For a list of all members of this type, see TDPColumn members.

Unit
OraLoader

SyntaxTDPColumn = class(TDAColumn);© 2019 DevartReference

1142

Remarks
Each TOraLoader uses TDPColumns to maintain a collection of TDPColumn objects.
TDPColumn object represents the attributes for column loading. Every TDPColumn object
corresponds to one of the table fields with the same name as its Name property.
To create columns at design time use column editor of TOraLoader component.

Inheritance Hierarchy
TDAColumn
TDPColumn

See Also
TOraLoader
TQueueAgents© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.1.1.1 Members

TDPColumn class overview.

Properties
Name

Description
Used to specify aconversion mask for acolumn.
Used to specify the types ofvalues that will be loaded.
Used to specify the fieldname of loading table.
Used to set the precision of
number columns.
Used to set the precision of
number columns.
Used to set the maximum
size in bytes of data for acolumn.

DateFormat
FieldType (inherited from TDAColumn)
Name (inherited from TDAColumn)
Precision
Scale
Size
© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1143

Oracle Data Access Components

5.22.1.1.2 Properties

Properties of the TDPColumn class.
For a complete list of the TDPColumn class members, see the TDPColumn Members topic.

Published
Name

Description
Used to specify aconversion mask for acolumn.
Used to specify the types ofvalues that will be loaded.
Used to specify the fieldname of loading table.
Used to set the precision of
number columns.
Used to set the precision of
number columns.
Used to set the maximum
size in bytes of data for acolumn.

DateFormat
FieldType (inherited from TDAColumn)
Name (inherited from TDAColumn)
Precision
Scale
Size

See Also
TDPColumn Class
TDPColumn Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.1.1.2.1 DateFormat Property

Used to specify a conversion mask for a column.

Class
TDPColumn

Syntaxproperty DateFormat: string;

Remarks
Set DateFormat to specify a conversion mask for a column. TOraLoader uses DateFormat to© 2019 DevartReference

1144

convert string representation of date to its internal representation. If not set, the date format
defaults to the date conversion mask set in the direct path context.

See Also
TDAColumn.Name© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.1.1.2.2 Precision Property

Used to set the precision of number columns.

Class
TDPColumn

Syntaxproperty Precision: integer default 0;

Remarks
Use Precision property to set the precision of number columns.

See Also
TDAColumn.FieldType© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.22.1.1.2.3 Scale Property

Used to set the precision of number columns.

Class
TDPColumn

Syntaxproperty Scale: integer default 0;

Remarks
Use Scale property to set the scale of number columns.

© 2019 Devart

Provide Feedback

1145

Oracle Data Access Components

See Also
TDAColumn.FieldType© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.1.1.2.4 Size Property

Used to set the maximum size in bytes of data for a column.

Class
TDPColumn

Syntaxproperty Size: integer default 0;

Remarks
Use Size property to set the maximum size in bytes of data for a column. Size is used only
for string columns.

See Also
TDAColumn.FieldType© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.1.2 TOraLoader Class

TOraLoader allows to load external data into the server database.
For a list of all members of this type, see TOraLoader members.

Unit
OraLoader

SyntaxTOraLoader = class(TDALoader);Remarks
TOraLoader serves for fast loading of data to the server. It uses direct path load interface tospeed up loading. To specify the name of the loading table set TDALoader.TableName© 2019 DevartReference

1146

property. Use TDALoader.Columns property to access individual columns. Write
TDALoader.OnGetColumnData or TDALoader.OnPutData event handlers to read external
data and pass it to the database. Call TDALoader.Load method to start loading data.
Limitations and Restrictions
TOraLoader has the following limitations similar to those of SQL*Loader:
triggers are not supported
check constraints are not supported
referential integrity constraints are not supported
clustered tables are not supported
loading of remote objects is not supported
user-defined types are not supported
LOBs must be specified after all scalar columns
LONGs must be specified last
You cannot use TOraLoader in a threaded OCI environment in direct mode with Oracle
client 8.17 or lower.
ODAC sets T:Devart.Odac.Units.OraCall := False when you use OraLoader unit in yourapplication. You can set it to True for Oracle client 9.2 or higher.

Inheritance Hierarchy
TDALoader
TOraLoader

See Also
TOraLoader Component
TDALoader
TQueueAgents
TOraSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.1.2.1 Members

TOraLoader class overview.

Properties
Name© 2019 Devart

Description

1147

Oracle Data Access Components

Columns (inherited from TDALoader)
Connection (inherited from TDALoader)

LoadMode

SessionTableName (inherited from TDALoader)

Used to add a TDAColumn
object for each field that will
be loaded.
See TOraLoader.Session
Used to specify whichaccess mode to use for a
TOraLoader object when adatabase table is being
modified.
Used to specify the sessionin which TOraLoader will be
executed.
Used to specify the name of
the table to which data will
be loaded.

Methods
Name
CreateColumns (inherited from TDALoader)

Description
Creates TDAColumn
objects for all fields of thetable with the same nameas TDALoader.TableName.

Load (inherited from TDALoader)Starts loading data.

LoadFromDataSet (inherited from TDALoader)Loads data from thespecified dataset.
Overloaded. Puts the valueof individual columns.

PutColumnData (inherited from TDALoader)

EventsName
OnError
OnGetColumnData
OnProgress (inherited from TDALoader)

Description
Occurs when processing
errors that are raised duringloading is needed.
Occurs when it is needed toput column values.
Occurs if handling dataloading progress of the
TDALoader.LoadFromData
Set method is needed.

© 2019 DevartReferenceOccurs when putting loading
data by rows is needed.

OnPutData© 1997-2019
Devart. All Rights
Reserved.

1148

Request Support

DAC Forum

Provide Feedback

5.22.1.2.2 Properties

Properties of the TOraLoader class.
For a complete list of the TOraLoader class members, see the TOraLoader Members topic.

PublicName
Columns (inherited from TDALoader)

Description
Used to add a TDAColumn
object for each field that will
be loaded.

Connection (inherited from TDALoader)

See TOraLoader.Session
Used to specify whichaccess mode to use for a
TOraLoader object when adatabase table is being
modified.
Used to specify the name of
the table to which data will
be loaded.

LoadMode

TableName (inherited from TDALoader)

Published
Name

Description
Used to specify the sessionin which TOraLoader will be
executed.

SessionSee Also
TOraLoader Class
TOraLoader Class Members© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1149

Oracle Data Access Components

5.22.1.2.2.1 LoadMode Property

Used to specify which access mode to use for a TOraLoader object when a database table isbeing modified.

Class
TOraLoader

Syntaxproperty LoadMode: TLoadMode;

Remarks
Use the LoadMode property to specify which access mode to use for a TOraLoader object
when a database table is being modified.
Set this property to lmDirect to make all modifications pass through internal data buffers or
set it to lmDML to construct relevant DML statement which applies updates to the databasetable.

See Also
TOraLoader Component© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.1.2.2.2 Session Property

Used to specify the session in which TOraLoader will be executed.

Class
TOraLoader

Syntaxproperty Session: TOraSession;

Remarks
Use the Session property to specify the session in which TOraLoader will be executed. If
Session is not connected, Load method calls Session.Connect.

See Also
TOraSession© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

1150

Provide Feedback

5.22.1.2.3 Events

Events of the TOraLoader class.
For a complete list of the TOraLoader class members, see the TOraLoader Members topic.

PublicName

Description
Occurs if handling dataloading progress of the
TDALoader.LoadFromData
Set method is needed.

OnProgress (inherited from TDALoader)

Published
Name

Description
Occurs when processing
errors that are raised duringloading is needed.
Occurs when it is needed toput column values.
Occurs when putting loading
data by rows is needed.

OnError
OnGetColumnData
OnPutData

See Also
TOraLoader Class
TOraLoader Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.1.2.3.1 OnError Event

Occurs when processing errors that are raised during loading is needed.

Class
TOraLoader

Syntax© 2019 Devart

1151

Oracle Data Access Components

property OnError: TDPErrorEvent;Remarks
Write the OnError event handler to process errors that occur during loading. Handler is used
only if LoadMode = lmDirect, i.e. when using Oracle Direct Path interface. E parameter is an
exception that was raised. Col and Row parameters are appropriate column and row values
for data that loader failed to write to a table.

See Also
LoadMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.1.2.3.2 OnGetColumnData Event

Occurs when it is needed to put column values.

Class
TOraLoader

Syntaxproperty OnGetColumnData: TDPGetColumnDataEvent;Remarks
Write OnGetColumnData event handler to put column values. TOraLoader calls
OnGetColumnData event handler for each column in the loop. Column points to TDAColumn
object that corresponds to the current loading column. Use its Name or Index property toidentify what column is loading. The Row parameter indicates the current loading record.
TDALoader increments Row parameter when all the columns of the current record areloaded. The first row is 1. Set EOF to True to stop data loading. Fill Value parameter bycolumn values. To start loading call the TDALoader.Load method.
Another way to load data is using OnPutData event.

See Also
TDALoader.OnPutData
TDALoader.Load
OnPutData© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1152

Devart. All Rights
Reserved.
5.22.1.2.3.3 OnPutData Event

Occurs when putting loading data by rows is needed.

Class
TOraLoader

Syntaxproperty OnPutData: TDPPutDataEvent;Remarks
Note that rows should be loaded from the first in ascending order. To start loading, call
TDALoader.Load method.
To start loading, call the TDALoader.Load method.

See Also
TDALoader.PutColumnData
TDALoader.Load
TDALoader.OnGetColumnData
OnGetColumnData© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.2 Types
Types in the OraLoader unit.

Types
Name
TDPErrorEvent
TDPGetColumnDataEvent

TDPPutDataEvent© 2019 Devart

Description
This type is used for the
TOraLoader.OnError event.
This type is used for the
TOraLoader.OnGetColumn
Data event.
This type is used for the
TOraLoader.OnPutData
event.

1153

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.2.1 TDPErrorEvent Procedure ReferenceThis type is used for the TOraLoader.OnError event.

Unit
OraLoader

Syntax
TDPErrorEvent = procedure (Sender: TOraLoader; E: Exception; Col:
integer; Row: integer; var Action: TDPErrorAction) of object;Parameters
SenderAn object that raised the event.
E
The exception that was raised.
Col
The column value for data that loader failed to write to a table.
Row
The row value for data that loader failed to write to a table.
ActionThe action to take when an exception is raised.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.2.2 TDPGetColumnDataEvent Procedure ReferenceThis type is used for the TOraLoader.OnGetColumnData event.

Unit
OraLoader

SyntaxTDPGetColumnDataEvent = procedure (Sender: TObject; Column:
TDPColumn; Row: integer; var Value: variant; var IsEOF: boolean)of object;Parameters© 2019 DevartReference

1154

SenderAn object that raised the event.
ColumnPoints to TDAColumn object that corresponds to the current loading column.
Row
Indicates the current loading record.
Value
The column values.
IsEOF
True, if data loading needs to be stopped.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.2.3 TDPPutDataEvent Procedure ReferenceThis type is used for the TOraLoader.OnPutData event.

Unit
OraLoader

Syntax
TDPPutDataEvent = procedure (Sender: TOraLoader) of object;Parameters
SenderAn object that raised the event.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.3 Enumerations
Enumerations in the OraLoader unit.

Enumerations
Name
TDPErrorAction© 2019 Devart

Description
Specifies the action for
TOraLoader to take toprocess errors that occur
during loading.

1155

Oracle Data Access Components

Specifies the access mode
to use for a TOraLoader
object when a databasetable is being modified.

TLoadMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.22.3.1 TDPErrorAction Enumeration

Specifies the action for TOraLoader to take to process errors that occur during loading.

Unit
OraLoader

Syntax
TDPErrorAction = (dpAbort, dpFail, dpIgnore);

ValuesValue
dpAbortdpFaildpIgnore© 1997-2019
Devart. All Rights
Reserved.

Meaning
TOraLoader silently interrupts the current operation.
TOraLoader reraises the exception passed as E parameter.
TOraLoader skips the current row and continues execution.
Request Support

DAC Forum

Provide Feedback

5.22.3.2 TLoadMode Enumeration

Specifies the access mode to use for a TOraLoader object when a database table is being
modified.

Unit
OraLoader

SyntaxTLoadMode = (lmDirect, lmDML);

Values© 2019 DevartReference

Value
lmDirect
lmDML

1156

Meaning
All modifications are passed through internal data buffers.
Constructs relevant DML statement which applies updates to the
database table.

Remarks
Use the LoadMode property to specify which access mode to use for a TOraLoader object
when a database table is being modified.
Set this property to lmDirect to make all modifications pass through internal data buffers or
set it to lmDML to construct relevant DML statement which applies updates to the databasetable.

© 1997-2019
Devart. All Rights
Reserved.

5.23

Request Support

DAC Forum

Provide Feedback

OraNetThis unit implements the Direct Mode in ODAC.

Enumerations
Name

Description
Used to turn on the Oracle
Advanced Security
encryption and integrity.

TSecurityLevel

Variables
Name

Description
Use this variable to prevent
unauthorized data
modification when it ispassed over the network.
Use this variable to prevent
unauthorized data viewing
when it is passed over the
network.
Use this constant to specify
the size of transferredpackets.

DataIntegrityLevel

EncryptionLevel

PacketSize© 1997-2019© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1157

Oracle Data Access Components

Devart. All Rights
Reserved.
5.23.1 Enumerations
Enumerations in the OraNet unit.

Enumerations
Name

Description
Used to turn on the Oracle
Advanced Security
encryption and integrity.

TSecurityLevel© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.23.1.1 TSecurityLevel Enumeration

Used to turn on the Oracle Advanced Security encryption and integrity.

Unit
OraNetSyntaxTSecurityLevel = (slAccepted = 0, slRejected = 1, slRequested = 2,
slRequired = 3);

ValuesValue
slAccepted
slRejected
slRequested
slRequired© 1997-2019
Devart. All Rights
Reserved.

Meaning
Select this value to enable the security service if required orrequested by the other side.
Select this value if you do not elect to enable the security service,even if required by the other side.
Select this value to enable the security service if the other side
permits it.
Select this value to enable the security service or preclude theconnection.
Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1158

5.23.2 Variables
Variables in the OraNet unit.

Variables
Name

Description
Use this variable to prevent
unauthorized data
modification when it ispassed over the network.
Use this variable to prevent
unauthorized data viewing
when it is passed over the
network.
Use this constant to specify
the size of transferredpackets.

DataIntegrityLevel

EncryptionLevel

PacketSize© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.23.2.1 DataIntegrityLevel Variable

Use this variable to prevent unauthorized data modification when it is passed over the
network.

Unit
OraNetSyntax
DataIntegrityLevel: TSecurityLevel;

Remarks
Use the DataIntegrityLevel variable to prevent unauthorized data modification when it ispassed over the network. To select the data integrity level, specify one of the possible valuesof the TSecurityLevel variable. The default value is Accepted.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1159

Oracle Data Access Components

5.23.2.2 EncryptionLevel Variable

Use this variable to prevent unauthorized data viewing when it is passed over the network.

Unit
OraNetSyntax
EncryptionLevel: TSecurityLevel;

Remarks
Use the EncryptionLevel variable to prevent unauthorized data viewing when it is passed overthe network. To select the data encryption level, specify one of the existing values of theTSecurityLevel variable. The default value is Accepted.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.23.2.3 PacketSize Variable

Use this constant to specify the size of transferred packets.

Unit
OraNetSyntaxPacketSize: Integer;

Remarks
Use this constant to specify the size of transferred packets. If you set this variable to an
optimal value (that depends on the network you are working in), this can significantly increase
performance for VPN, Wireless and other networks.
Allowed values are within the range from 512 to 65535 bytes. The default value is 8192 bytes.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

5.24

1160

OraObjects
This unit contains classes for Oracle OBJECT, ARRAY, TABLE and XMLTYPE data types.

ClassesName

Description
A class representing thevalue of the Oracle arraydata type.
A class representing a valueof the Oracle nested tabledata type.
A class representing the
Oracle object data typevalue.
A class representing the
Oracle reference data typevalue.
A class holding information
about Oracle type required
for TOraObject objects.
A class representing a valueof the Oracle
SYS.XMLTYPE type.

TOraArray

TOraNestTable

TOraObject

TOraRef

TOraType

TOraXML© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1 Classes
Classes in the OraObjects unit.

ClassesName
TOraArray

TOraNestTable

TOraObject© 2019 Devart

Description
A class representing thevalue of the Oracle arraydata type.
A class representing a valueof the Oracle nested tabledata type.
A class representing the
Oracle object data typevalue.

1161

Oracle Data Access Components

A class representing the
Oracle reference data typevalue.
A class holding information
about Oracle type required
for TOraObject objects.
A class representing a valueof the Oracle
SYS.XMLTYPE type.

TOraRef

TOraType

TOraXML© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1 TOraArray ClassA class representing the value of the Oracle array data type.
For a list of all members of this type, see TOraArray members.

Unit
OraObjects

SyntaxTOraArray = class(TOraObject);Remarks
TOraArray represents the value of the Oracle array data type. TOraArray is inherited from
TOraObject. You can get a TOraArray object by the TOraDataSet.GetArray method after
fetching rows containing array field.

Inheritance Hierarchy
TSharedObject
TDBObject
TOraObject
TOraArraySee Also
TOraObject
TOraDataSet.GetArray
TOraParam.AsArray© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

1162

Provide Feedback

5.24.1.1.1 Members

TOraArray class overview.

Properties
Name
AttrAsArray (inherited from TOraObject)

AttrAsDateTime (inherited from TOraObject)

AttrAsFloat (inherited from TOraObject)

AttrAsInteger (inherited from TOraObject)

AttrAsLob (inherited from TOraObject)

AttrAsObject (inherited from TOraObject)

AttrAsOCIDate (inherited from TOraObject)

AttrAsOCINumber (inherited from TOraObject)

AttrAsOCIString (inherited from TOraObject)© 2019 Devart

Description
Used to get the TOraArraytype attribute value.
Used to read the attribute's
data value into TDateTime,or to assign a TDateTime
value to the contents of an
attribute.
Used to read the attribute's
data value into a double, or
to assign a double value tothe contents of an attribute.
Used to read the attribute's
data value as integer, or toassign an integer value tothe contents of an attribute.
Used to get reference to the
TOraLob object that
represents the LOBAttributevalue.
Used to read the attribute's
data value as TOraObject, or
to assign a TOraObject
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIDate, or toassign an OCIDate value tothe contents of an attribute.
Used to read the attribute's
data value into OCINumber,or to assign an OCINumber
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIString, or1163

Oracle Data Access Components

AttrAsString (inherited from TOraObject)

AttrIsNull (inherited from TOraObject)
Indicator (inherited from TOraObject)

Instance (inherited from TOraObject)
IsNull (inherited from TOraObject)

ItemAsDateTime

ItemAsFloat

ItemAsInteger

ItemAsObject

ItemAsOCIString

ItemAsString

to assign an OCIString value
to the contents of an
attribute.
Used to read the attribute's
data value as string, or toassign a string value to thecontents of an attribute.
Used to indicate if theattribute value is NULL.
Used to get a pointer to theindicator structure of an
object.
Used to get a pointer to theinternal representation of an
object.
Used to verify if an object isempty.
Used to read the value of thearray's data into a
TDateTime object orvariable, or to assign a
TDateTime value to thecontents of the array's value.
Used to read the value of thearray's data into a Double,
or to assign a Double value
to the contents of the array's
item.
Used to read the value of the
Item's data into an integer,or to assign an integer value
to the contents of the item.
Used to read the value of the
Item's data into a
TOraObject, or to assign a
TOraObject value to thecontents of the item.
Used to get the value of the
Item's data as a generic OCI
string pointer, or to assign
the OCI string value to thecontent of the item.
Used to read the value of the
Item's data into a string, or toassign a string value to the© 2019 DevartReference

ItemExists
ItemIsNull
ItemType
MaxSize
ObjectType (inherited from TOraObject)
OCISvcCtx (inherited from TOraObject)
RefCount (inherited from TSharedObject)
Size

1164

content of the item.
Indicates whether the itemwith Index exists.
Indicates whether the item
contains a value.
Indicates the type of an arrayelement.
Defines the maximum
number of elements that anarray object may hold.
Used to indicate the object
type.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.
Holds the size of an array.

Methods
Name
AddRef (inherited from TSharedObject)

AllocObject (inherited from TOraObject)
AppendItem
Assign (inherited from TOraObject)
Clear
CreateObject (inherited from TOraObject)
Exists (inherited from TOraObject)
Flush (inherited from TOraObject)
FreeObject (inherited from TOraObject)© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Overloaded. Allocates anobject instance.
Appends an item to the endof an array.
Copies properties or otherattributes from anotherobject.
Removes all items from anarray.
Creates an object.
Verifies if an object instanceexists in a database.
Places modifications madeto the object to the
database.
Deallocates and frees an1165

Oracle Data Access Components

object instance.
Inserts an item to the Index
position.
Verifies if an object instanceis marked as dirty.
Verifies if an object instanceis marked as locked.
Marks an object as locked
for update.
Marks an object as being
deleted.
Marks an object as being
updated.
Retrieves the latest
database image for theobject.
Decrements the reference
count.
Marks an object as not
being dirty.

InsertItem
IsDirty (inherited from TOraObject)
IsLocked (inherited from TOraObject)
Lock (inherited from TOraObject)
MarkDelete (inherited from TOraObject)
MarkUpdate (inherited from TOraObject)
Refresh (inherited from TOraObject)
Release (inherited from TSharedObject)
Unmark (inherited from TOraObject)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.2 Properties

Properties of the TOraArray class.
For a complete list of the TOraArray class members, see the TOraArray Members topic.

PublicName
AttrAsArray (inherited from TOraObject)

AttrAsDateTime (inherited from TOraObject)

AttrAsFloat (inherited from TOraObject)

Description
Used to get the TOraArraytype attribute value.
Used to read the attribute's
data value into TDateTime,or to assign a TDateTime
value to the contents of an
attribute.
Used to read the attribute's
data value into a double, or
to assign a double value tothe contents of an attribute.

© 2019 DevartReference

AttrAsInteger (inherited from TOraObject)

AttrAsLob (inherited from TOraObject)

AttrAsObject (inherited from TOraObject)

AttrAsOCIDate (inherited from TOraObject)

AttrAsOCINumber (inherited from TOraObject)

AttrAsOCIString (inherited from TOraObject)

AttrAsString (inherited from TOraObject)

AttrIsNull (inherited from TOraObject)
Indicator (inherited from TOraObject)

Instance (inherited from TOraObject)
IsNull (inherited from TOraObject)

ItemAsDateTime© 2019 Devart

1166

Used to read the attribute's
data value as integer, or toassign an integer value tothe contents of an attribute.
Used to get reference to the
TOraLob object that
represents the LOBAttributevalue.
Used to read the attribute's
data value as TOraObject, or
to assign a TOraObject
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIDate, or toassign an OCIDate value tothe contents of an attribute.
Used to read the attribute's
data value into OCINumber,or to assign an OCINumber
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIString, or
to assign an OCIString value
to the contents of an
attribute.
Used to read the attribute's
data value as string, or toassign a string value to thecontents of an attribute.
Used to indicate if theattribute value is NULL.
Used to get a pointer to theindicator structure of an
object.
Used to get a pointer to theinternal representation of an
object.
Used to verify if an object isempty.
Used to read the value of thearray's data into a
TDateTime object orvariable, or to assign a1167

Oracle Data Access Components

ItemAsFloat

ItemAsInteger

ItemAsObject

ItemAsOCIString

ItemAsString

ItemExists
ItemIsNull
ItemType
MaxSize
ObjectType (inherited from TOraObject)
OCISvcCtx (inherited from TOraObject)
RefCount (inherited from TSharedObject)
Size

TDateTime value to thecontents of the array's value.
Used to read the value of thearray's data into a Double,
or to assign a Double value
to the contents of the array's
item.
Used to read the value of the
Item's data into an integer,or to assign an integer value
to the contents of the item.
Used to read the value of the
Item's data into a
TOraObject, or to assign a
TOraObject value to thecontents of the item.
Used to get the value of the
Item's data as a generic OCI
string pointer, or to assign
the OCI string value to thecontent of the item.
Used to read the value of the
Item's data into a string, or toassign a string value to thecontent of the item.
Indicates whether the itemwith Index exists.
Indicates whether the item
contains a value.
Indicates the type of an arrayelement.
Defines the maximum
number of elements that anarray object may hold.
Used to indicate the object
type.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.
Holds the size of an array.

See Also© 2019 DevartReference

1168

TOraArray ClassTOraArray Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.2.1 ItemAsDateTime Property(Indexer)

Used to read the value of the array's data into a TDateTime object or variable, or to assign a
TDateTime value to the contents of the array's value.

Class
TOraArray

Syntaxproperty ItemAsDateTime[Index: integer]: TDateTime;Parameters
Index
Holds the index. ???

Remarks
Use the ItemAsDateTime property to read the value of the array's data into an object orvariable of type TDateTime, or to assign a TDateTime value to the contents of the array's
value.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.2.2 ItemAsFloat Property(Indexer)

Used to read the value of the array's data into a Double, or to assign a Double value to thecontents of the array's item.

Class
TOraArray

Syntaxproperty ItemAsFloat[Index: integer]: double;
Parameters
Index© 2019 Devart1169

Oracle Data Access Components

Holds the index of the array item.

Remarks
Use the ItemAsFloat property to read the value of the array's data into a Double, or to assign a
Double value to the contents of the array's item.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.2.3 ItemAsInteger Property(Indexer)

Used to read the value of the Item's data into an integer, or to assign an integer value to thecontents of the item.

Class
TOraArray

Syntaxproperty ItemAsInteger[Index: integer]: integer;
Parameters
Index
Holds the index of the item.

Remarks
Use the ItemAsInteger property to read the value of the Item's data into an integer, or to assign
an integer value to the contents of the item.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.2.4 ItemAsObject Property(Indexer)

Used to read the value of the Item's data into a TOraObject, or to assign a TOraObject value
to the contents of the item.

Class
TOraArray

Syntaxproperty ItemAsObject[Index: integer]: TOraObject;© 2019 DevartReference

1170

Parameters
Index
Holds the index of the item.

Remarks
Use the ItemAsObject property to read the value of the Item's data into an TOraObject, or toassign an TOraObject value to the contents of the item.

See Also
TOraObject© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.2.5 ItemAsOCIString Property(Indexer)

Used to get the value of the Item's data as a generic OCI string pointer, or to assign the OCI
string value to the content of the item.

Class
TOraArray

Syntaxproperty ItemAsOCIString[Index: integer]: pOCIString;Parameters
Index
Holds the index of the item.

Remarks
Use the ItemAsOCIString property to get the value of the Item's data as a generic OCI string
pointer, or to assign the OCI string value to the content of the item.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.2.6 ItemAsString Property(Indexer)

Used to read the value of the Item's data into a string, or to assign a string value to the content
of the item.

© 2019 Devart

1171

Oracle Data Access Components

Class
TOraArray

Syntaxproperty ItemAsString[Index: integer]: string;Parameters
Index
Holds the index of the item.

Remarks
Use ItemAsString property to read the value of the Item's data into a string, or to assign astring value to the content of the item.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.2.7 ItemExists Property(Indexer)

Indicates whether the item with Index exists.

Class
TOraArray

Syntaxproperty ItemExists[Index: integer]: boolean;
Parameters
Index
Holds the index of the item.

Remarks
Check ItemExists property to learn whether the item with Index exists.

See Also
Size© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1172

5.24.1.1.2.8 ItemIsNull Property(Indexer)

Indicates whether the item contains a value.

Class
TOraArray

Syntaxproperty ItemIsNull[Index: integer]: boolean;
Parameters
Index
Holds the index of the item.

Remarks
Use IsNull to determine if the Item contains a value. If IsNull is True, the Item is blank. If IsNull
is False, the Item has a value.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.2.9 ItemType Property

Indicates the type of an array element.

Class
TOraArray

Syntaxproperty ItemType: word;

Remarks
Read the ItemType property to return the type of an array element.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.2.10 MaxSize Property

Defines the maximum number of elements that an array object may hold.

Class© 2019 Devart1173

Oracle Data Access Components

TOraArray

Syntaxproperty MaxSize: integer;

Remarks
Use the MaxSize property to get the maximum number of elements that an array object may
hold.

See Also
Size© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.2.11 Size Property

Holds the size of an array.

Class
TOraArray

Syntaxproperty Size: integer;

Remarks
Use the Size property to learn the length of an array.

See Also
ItemExists© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.3 Methods

Methods of the TOraArray class.
For a complete list of the TOraArray class members, see the TOraArray Members topic.

Public© 2019 DevartReference

Name
AddRef (inherited from TSharedObject)

AllocObject (inherited from TOraObject)
AppendItem
Assign (inherited from TOraObject)
Clear
CreateObject (inherited from TOraObject)
Exists (inherited from TOraObject)
Flush (inherited from TOraObject)
FreeObject (inherited from TOraObject)
InsertItem
IsDirty (inherited from TOraObject)
IsLocked (inherited from TOraObject)
Lock (inherited from TOraObject)
MarkDelete (inherited from TOraObject)
MarkUpdate (inherited from TOraObject)
Refresh (inherited from TOraObject)
Release (inherited from TSharedObject)
Unmark (inherited from TOraObject)

See Also© 2019 Devart

1174

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Overloaded. Allocates anobject instance.
Appends an item to the endof an array.
Copies properties or otherattributes from anotherobject.
Removes all items from anarray.
Creates an object.
Verifies if an object instanceexists in a database.
Places modifications madeto the object to the
database.
Deallocates and frees anobject instance.
Inserts an item to the Index
position.
Verifies if an object instanceis marked as dirty.
Verifies if an object instanceis marked as locked.
Marks an object as locked
for update.
Marks an object as being
deleted.
Marks an object as being
updated.
Retrieves the latest
database image for theobject.
Decrements the reference
count.
Marks an object as not
being dirty.

1175

Oracle Data Access Components

TOraArray ClassTOraArray Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.3.1 AppendItem Method

Appends an item to the end of an array.

Class
TOraArray

Syntaxfunction AppendItem: integer;
Return Valuethe index of an appended item.

Remarks
Call the AppendItem function to append an item to the end of an array. Returns the index of an
appended item.

See Also
InsertItem© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.1.3.2 Clear Method

Removes all items from an array.

Class
TOraArray

Syntax
procedure Clear;

Remarks
Call this method to remove all items from an array.

© 2019 DevartReference© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

1176

Provide Feedback

5.24.1.1.3.3 InsertItem Method

Inserts an item to the Index position.

Class
TOraArray

Syntax
procedure InsertItem(Index: integer);
Parameters
Index
Holds the index position.

Remarks
Call the InsertItem procedure to insert an item to the Index position.

See Also
AppendItem© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.2 TOraNestTable ClassA class representing a value of the Oracle nested table data type.
For a list of all members of this type, see TOraNestTable members.

Unit
OraObjects

SyntaxTOraNestTable = class(TOraArray);Remarks
TOraNestTable represents a value of the Oracle nested table data type. TOraNestTable isinherited from TOraArray. You can get a TOraNestTable object using the© 2019 Devart1177

Oracle Data Access Components

TOraDataSet.GetTable method after fetching rows containing array field. Also you can get it
using the TOraParam.AsTable method.

Inheritance Hierarchy
TSharedObject
TDBObject
TOraObject
TOraArray
TOraNestTable

See Also
TOraArray
TOraNestedTable
TOraDataSet.GetTable
TOraParam.AsTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.2.1 Members

TOraNestTable class overview.

Properties
Name
AttrAsArray (inherited from TOraObject)

AttrAsDateTime (inherited from TOraObject)

AttrAsFloat (inherited from TOraObject)

AttrAsInteger (inherited from TOraObject)
AttrAsLob (inherited from TOraObject)

Description
Used to get the TOraArraytype attribute value.
Used to read the attribute's
data value into TDateTime,or to assign a TDateTime
value to the contents of an
attribute.
Used to read the attribute's
data value into a double, or
to assign a double value tothe contents of an attribute.
Used to read the attribute's
data value as integer, or toassign an integer value tothe contents of an attribute.
Used to get reference to the© 2019 DevartReference

AttrAsObject (inherited from TOraObject)

AttrAsOCIDate (inherited from TOraObject)

AttrAsOCINumber (inherited from TOraObject)

AttrAsOCIString (inherited from TOraObject)

AttrAsString (inherited from TOraObject)

AttrIsNull (inherited from TOraObject)
Indicator (inherited from TOraObject)

Instance (inherited from TOraObject)
IsNull (inherited from TOraObject)

ItemAsDateTime (inherited from TOraArray)

ItemAsFloat (inherited from TOraArray)© 2019 Devart

1178

TOraLob object that
represents the LOBAttributevalue.
Used to read the attribute's
data value as TOraObject, or
to assign a TOraObject
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIDate, or toassign an OCIDate value tothe contents of an attribute.
Used to read the attribute's
data value into OCINumber,or to assign an OCINumber
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIString, or
to assign an OCIString value
to the contents of an
attribute.
Used to read the attribute's
data value as string, or toassign a string value to thecontents of an attribute.
Used to indicate if theattribute value is NULL.
Used to get a pointer to theindicator structure of an
object.
Used to get a pointer to theinternal representation of an
object.
Used to verify if an object isempty.
Used to read the value of thearray's data into a
TDateTime object orvariable, or to assign a
TDateTime value to thecontents of the array's value.
Used to read the value of thearray's data into a Double,
or to assign a Double value

1179

Oracle Data Access Components

ItemAsInteger (inherited from TOraArray)

ItemAsObject (inherited from TOraArray)

ItemAsOCIString (inherited from TOraArray)

ItemAsString (inherited from TOraArray)

ItemExists (inherited from TOraArray)
ItemIsNull (inherited from TOraArray)
ItemType (inherited from TOraArray)
MaxSize (inherited from TOraArray)
ObjectType (inherited from TOraObject)
OCISvcCtx (inherited from TOraObject)
RefCount (inherited from TSharedObject)
Size (inherited from TOraArray)to the contents of the array's
item.
Used to read the value of the
Item's data into an integer,or to assign an integer value
to the contents of the item.
Used to read the value of the
Item's data into a
TOraObject, or to assign a
TOraObject value to thecontents of the item.
Used to get the value of the
Item's data as a generic OCI
string pointer, or to assign
the OCI string value to thecontent of the item.
Used to read the value of the
Item's data into a string, or toassign a string value to thecontent of the item.
Indicates whether the itemwith Index exists.
Indicates whether the item
contains a value.
Indicates the type of an arrayelement.
Defines the maximum
number of elements that anarray object may hold.
Used to indicate the object
type.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.
Holds the size of an array.

Methods
Name

Description

AddRef (inherited from TSharedObject)

Increments the reference
count for the number of© 2019 DevartReference

references dependent on theTSharedObject object.
Overloaded. Allocates anobject instance.
Appends an item to the endof an array.
Copies properties or otherattributes from anotherobject.
Removes all items from anarray.
Creates an object.

AllocObject (inherited from TOraObject)
AppendItem (inherited from TOraArray)
Assign (inherited from TOraObject)
Clear (inherited from TOraArray)
CreateObject (inherited from TOraObject)

Deletes an item pointed by
its index.
Verifies if an object instanceexists in a database.
Places modifications madeto the object to the
database.
Deallocates and frees anobject instance.
Inserts an item to the Index
position.
Verifies if an object instanceis marked as dirty.
Verifies if an object instanceis marked as locked.
Marks an object as locked
for update.
Marks an object as being
deleted.
Marks an object as being
updated.
Retrieves the latest
database image for theobject.
Decrements the reference
count.
Marks an object as not
being dirty.

DeleteItem
Exists (inherited from TOraObject)
Flush (inherited from TOraObject)
FreeObject (inherited from TOraObject)
InsertItem (inherited from TOraArray)
IsDirty (inherited from TOraObject)
IsLocked (inherited from TOraObject)
Lock (inherited from TOraObject)
MarkDelete (inherited from TOraObject)
MarkUpdate (inherited from TOraObject)
Refresh (inherited from TOraObject)
Release (inherited from TSharedObject)
Unmark (inherited from TOraObject)© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

1180

DAC Forum

Provide Feedback

1181

Oracle Data Access Components

5.24.1.2.2 Methods

Methods of the TOraNestTable class.
For a complete list of the TOraNestTable class members, see the TOraNestTable Members
topic.

PublicName
AddRef (inherited from TSharedObject)

AllocObject (inherited from TOraObject)
AppendItem (inherited from TOraArray)
Assign (inherited from TOraObject)
Clear (inherited from TOraArray)
CreateObject (inherited from TOraObject)
DeleteItem
Exists (inherited from TOraObject)
Flush (inherited from TOraObject)
FreeObject (inherited from TOraObject)
InsertItem (inherited from TOraArray)
IsDirty (inherited from TOraObject)
IsLocked (inherited from TOraObject)
Lock (inherited from TOraObject)
MarkDelete (inherited from TOraObject)
MarkUpdate (inherited from TOraObject)

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Overloaded. Allocates anobject instance.
Appends an item to the endof an array.
Copies properties or otherattributes from anotherobject.
Removes all items from anarray.
Creates an object.
Deletes an item pointed by
its index.
Verifies if an object instanceexists in a database.
Places modifications madeto the object to the
database.
Deallocates and frees anobject instance.
Inserts an item to the Index
position.
Verifies if an object instanceis marked as dirty.
Verifies if an object instanceis marked as locked.
Marks an object as locked
for update.
Marks an object as being
deleted.
Marks an object as being
updated.
© 2019 DevartReference

1182

Retrieves the latest
database image for theobject.
Decrements the reference
count.
Marks an object as not
being dirty.

Refresh (inherited from TOraObject)
Release (inherited from TSharedObject)
Unmark (inherited from TOraObject)

See Also
TOraNestTable Class
TOraNestTable Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.2.2.1 DeleteItem Method

Deletes an item pointed by its index.

Class
TOraNestTable

Syntax
procedure DeleteItem(Index: integer);
Parameters
Index
Holds the index of the item to delete.

Remarks
Call the DeleteItem method to delete an item pointed by Index.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.24.1.3 TOraObject ClassA class representing the Oracle object data type value.
For a list of all members of this type, see TOraObject members.

Unit© 2019 Devart

Provide Feedback

1183

Oracle Data Access Components

OraObjects

SyntaxTOraObject = class(TDBObject);Remarks
TOraObject represents a value of the Oracle object data type. You can get the description of
the object type using the ObjectType method. Use the AllocObject method to create an objectof a certain type. To access the attribute value use AttrAsInteger, AttrAsString, etc. You can
get a TOraObject object using TOraDataSet.GetObject method after fetching rows containing
an array field. Also you can get it using the TOraParam.AsObject method.

Examplevar
MyType : TOraType;MyObject : TOraObject;. . .
MyType := TOraType.Create;
MyType.Describe('SCOTT.PERSON');
MyObject := TOraObject.Create(Obj.ObjectType);
MyObject.AttrAsString('Name') := 'Ja';. . .

Inheritance Hierarchy
TSharedObject
TDBObject
TOraObject

See Also
TOraType
TOraDataSet.GetObject
TOraParam.AsObject
TOraRef
TOraArray
TOraNestTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference1184

5.24.1.3.1 Members

TOraObject class overview.

Properties
Name
AttrAsArray

AttrAsDateTime

AttrAsFloat

AttrAsInteger

AttrAsLob

AttrAsObject

AttrAsOCIDate

AttrAsOCINumber

AttrAsOCIString© 2019 Devart

Description
Used to get the TOraArraytype attribute value.
Used to read the attribute's
data value into TDateTime,or to assign a TDateTime
value to the contents of an
attribute.
Used to read the attribute's
data value into a double, or
to assign a double value tothe contents of an attribute.
Used to read the attribute's
data value as integer, or toassign an integer value tothe contents of an attribute.
Used to get reference to the
TOraLob object that
represents the LOBAttributevalue.
Used to read the attribute's
data value as TOraObject, or
to assign a TOraObject
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIDate, or toassign an OCIDate value tothe contents of an attribute.
Used to read the attribute's
data value into OCINumber,or to assign an OCINumber
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIString, or
to assign an OCIString value
to the contents of an
attribute.

1185

Oracle Data Access Components

AttrAsString

AttrIsNull
Indicator

Instance
IsNullObjectType
OCISvcCtx
RefCount (inherited from TSharedObject)

Used to read the attribute's
data value as string, or toassign a string value to thecontents of an attribute.
Used to indicate if theattribute value is NULL.
Used to get a pointer to theindicator structure of an
object.
Used to get a pointer to theinternal representation of an
object.
Used to verify if an object isempty.
Used to indicate the object
type.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.

Methods
Name
AddRef (inherited from TSharedObject)

AllocObject
AssignCreateObject
ExistsFlush
FreeObject
IsDirty

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Overloaded. Allocates anobject instance.
Copies properties or otherattributes from anotherobject.
Creates an object.
Verifies if an object instanceexists in a database.
Places modifications madeto the object to the
database.
Deallocates and frees anobject instance.
Verifies if an object instance© 2019 DevartReference

is marked as dirty.
Verifies if an object instanceis marked as locked.
Marks an object as locked
for update.
Marks an object as being
deleted.
Marks an object as being
updated.
Retrieves the latest
database image for theobject.
Decrements the reference
count.
Marks an object as not
being dirty.

IsLocked
Lock
MarkDelete
MarkUpdate
RefreshRelease (inherited from TSharedObject)
Unmark© 1997-2019
Devart. All Rights
Reserved.

Request Support

1186

DAC Forum

Provide Feedback

5.24.1.3.2 Properties

Properties of the TOraObject class.
For a complete list of the TOraObject class members, see the TOraObject Members topic.

PublicName
AttrAsArray

AttrAsDateTime

AttrAsFloat

AttrAsInteger© 2019 Devart

Description
Used to get the TOraArraytype attribute value.
Used to read the attribute's
data value into TDateTime,or to assign a TDateTime
value to the contents of an
attribute.
Used to read the attribute's
data value into a double, or
to assign a double value tothe contents of an attribute.
Used to read the attribute's
data value as integer, or toassign an integer value tothe contents of an attribute.

1187

Oracle Data Access Components

AttrAsLob

AttrAsObject

AttrAsOCIDate

AttrAsOCINumber

AttrAsOCIString

AttrAsString

AttrIsNull
Indicator

Instance
IsNullObjectType
OCISvcCtx
RefCount (inherited from TSharedObject)

Used to get reference to the
TOraLob object that
represents the LOBAttributevalue.
Used to read the attribute's
data value as TOraObject, or
to assign a TOraObject
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIDate, or toassign an OCIDate value tothe contents of an attribute.
Used to read the attribute's
data value into OCINumber,or to assign an OCINumber
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIString, or
to assign an OCIString value
to the contents of an
attribute.
Used to read the attribute's
data value as string, or toassign a string value to thecontents of an attribute.
Used to indicate if theattribute value is NULL.
Used to get a pointer to theindicator structure of an
object.
Used to get a pointer to theinternal representation of an
object.
Used to verify if an object isempty.
Used to indicate the object
type.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.

© 2019 DevartReference

1188

See Also
TOraObject Class
TOraObject Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.1 AttrAsArray Property(Indexer)

Used to get the TOraArray type attribute value.

Class
TOraObject

Syntaxproperty AttrAsArray[const Name: string]: TOraArray;
Parameters
Name
Holds an attribute name.

Remarks
Use the AttrAsArray property to get the value of an attribute of the TOraArray type.
Provide an attribute name in the Name index parameter.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.2 AttrAsDateTime Property(Indexer)

Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to thecontents of an attribute.

Class
TOraObject

Syntaxproperty AttrAsDateTime[const Name: string]: TDateTime;ParametersName© 2019 Devart

1189

Oracle Data Access Components

Holds an attribute name.

Remarks
Use the AttrAsDateTime property to read the attribute's data value into TDateTime, or toassign a TDateTime value to the contents of an attribute.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.3 AttrAsFloat Property(Indexer)

Used to read the attribute's data value into a double, or to assign a double value to thecontents of an attribute.

Class
TOraObject

Syntaxproperty AttrAsFloat[const Name: string]: double;
Parameters
Name
Holds an attribute name.

Remarks
Use the AttrAsFloat property to read the attribute's data value into a double, or to assign adouble value to the contents of an attribute.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.4 AttrAsInteger Property(Indexer)

Used to read the attribute's data value as integer, or to assign an integer value to the contentsof an attribute.

Class
TOraObject

Syntaxproperty AttrAsInteger[const Name: string]: integer;© 2019 DevartReference

1190

Parameters
Name
Holds an attribute name.

Remarks
Use the AttrAsInteger property to read the attribute's data value as integer, or to assign an
integer value to the contents of an attribute.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.5 AttrAsLob Property(Indexer)

Used to get reference to the TOraLob object that represents the LOBAttribute value.

Class
TOraObject

Syntaxproperty AttrAsLob[const Name: string]: TOraLob;
Parameters
Name
Holds an attribute name.

Remarks
Use the AttrAsLob property to get reference to the TOraLob object that represents the
LOBAttribute value.

See Also
TOraLob© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.6 AttrAsObject Property(Indexer)

Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to thecontents of an attribute.

Class© 2019 Devart

1191

Oracle Data Access Components

TOraObject

Syntaxproperty AttrAsObject[const Name: string]: TOraObject;Parameters
Name
Holds an attribute name.

Remarks
Use the AttrAsObject property to read the attribute's data value as TOraObject, or to assign a
TOraObject value to the contents of an attribute. Type of an attribute specified by the Name
parameter must be Object. You can use AttrAs... properties to access its attributes after.
Another way to get an attribute value of a nested object is using of the name path.

ExampleExample 1.
Street1 := MyObject.AttrAsObject('Address').AsString('Street');Example 1.
Street2 := MyObject.AttrAsString('Address.Street');See Also
TOraObject© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.7 AttrAsOCIDate Property(Indexer)

Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to thecontents of an attribute.

Class
TOraObject

Syntaxproperty AttrAsOCIDate[const Name: string]: OCIDate;
Parameters
Name
Holds an attribute name.
© 2019 DevartReference

1192

Remarks
Use the AttrAsOCIDate property to read the attribute's data value as OCIDate, or to assign an
OCIDate value to the contents of an attribute.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.8 AttrAsOCINumber Property(Indexer)

Used to read the attribute's data value into OCINumber, or to assign an OCINumber value tothe contents of an attribute.

Class
TOraObject

Syntaxproperty AttrAsOCINumber[const Name: string]: OCINumber;
Parameters
Name
Holds an attribute name.

Remarks
Use the AttrAsOCINumber property to read the attribute's data value into OCINumber, or toassign an OCINumber value to the contents of an attribute.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.9 AttrAsOCIString Property(Indexer)

Used to read the attribute's data value as OCIString, or to assign an OCIString value to thecontents of an attribute.

Class
TOraObject

Syntaxproperty AttrAsOCIString[const Name: string]: pOCIString;Parameters© 2019 Devart

1193

Oracle Data Access Components

Name
Holds an attribute name.

Remarks
Use AttrAsOCIString property to read the attribute's data value as OCIString, or to assign an
OCIString value to the contents of an attribute.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.10 AttrAsString Property(Indexer)

Used to read the attribute's data value as string, or to assign a string value to the contents ofan attribute.

Class
TOraObject

Syntaxproperty AttrAsString[const Name: string]: string;Parameters
Name
Holds an attribute name.

Remarks
Use the AttrAsString property to read the attribute's data value as string, or to assign a stringvalue to the contents of an attribute.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.11 AttrIsNull Property(Indexer)

Used to indicate if the attribute value is NULL.

ClassTOraObject

Syntaxproperty AttrIsNull[const Name: string]: boolean;© 2019 DevartReference

1194

Parameters
Name
Holds an attribute name.

Remarks
Check the AttrIsNull property to learn whether the attribute value is NULL.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.12 Indicator Property

Used to get a pointer to the indicator structure of an object.

Class
TOraObject

Syntaxproperty Indicator: IntPtr;

Remarks
Use the Indicator property to get a pointer to the indicator structure of an object.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.13 Instance Property

Used to get a pointer to the internal representation of an object.

Class
TOraObject

Syntaxproperty Instance: IntPtr;

Remarks
Use the Instance property to get a pointer to the internal representation of an object.

© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1195

Oracle Data Access Components

Reserved.
5.24.1.3.2.14 IsNull Property

Used to verify if an object is empty.

Class
TOraObject

Syntaxproperty IsNull: boolean;

Remarks
Use the IsNull property to verify whether this object is empty. Assign a value to this property to
set the object to Null or not Null.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.2.15 ObjectType Property

Used to indicate the object type.

Class
TOraObject

Syntaxproperty ObjectType: TOraType;

Remarks
Read the ObjectType property to learn the type of an object.

See Also
TOraType© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1196

5.24.1.3.2.16 OCISvcCtx Property

Used to assign a service context handle.

Class
TOraObject

Syntaxproperty OCISvcCtx: TOCISvcCtx;

Remarks
Use the OCISvcCtx property to assign a service context handle. Some operations with
objects require a service context handle. To get a service context handle use
TOraSession.OCISvcCtx.

See Also
TOraSession.OCISvcCtx© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.3 Methods

Methods of the TOraObject class.
For a complete list of the TOraObject class members, see the TOraObject Members topic.

PublicName
AddRef (inherited from TSharedObject)

AllocObject
AssignCreateObject
ExistsFlush© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Overloaded. Allocates anobject instance.
Copies properties or otherattributes from anotherobject.
Creates an object.
Verifies if an object instanceexists in a database.
Places modifications made

1197

Oracle Data Access Components

to the object to the
database.
Deallocates and frees anobject instance.
Verifies if an object instanceis marked as dirty.
Verifies if an object instanceis marked as locked.
Marks an object as locked
for update.
Marks an object as being
deleted.
Marks an object as being
updated.
Retrieves the latest
database image for theobject.
Decrements the reference
count.
Marks an object as not
being dirty.

FreeObject
IsDirty
IsLocked
Lock
MarkDelete
MarkUpdate
RefreshRelease (inherited from TSharedObject)
UnmarkSee Also
TOraObject Class
TOraObject Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.3.1 AllocObject Method

Allocates an object instance.

Class
TOraObject

Overload List
Name
AllocObject
AllocObject
AllocObject

Description
Allocates an object instance.
Allocates an object instance.
Allocates an object instance.
© 2019 DevartReference

AllocObject(const TypeName: string)© 1997-2019
Request Support
Devart. All Rights
Reserved.

1198

Allocates an object instance.
DAC Forum

Provide Feedback

Allocates an object instance.

Class
TOraObject

Syntax
procedure AllocObject; overload; virtual;

Remarks
Call the AllocObject method to allocate an object instance. Overloaded procedures withparameters modify either service context handle or object type properties before allocating theobject.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

Allocates an object instance.

Unit
Syntax© 1997-2019
Devart. All Rights
Reserved.

Request Support

Allocates an object instance.

Unit
Syntax© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

1199

Oracle Data Access Components

Allocates an object instance.

Class
TOraObject

Syntax
procedure AllocObject(const TypeName: string); overload;
virtual;Parameters
TypeName
Holds the type of a TOraObject.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.3.2 Assign Method

Copies properties or other attributes from another object.

Class
TOraObject

Syntax
procedure Assign(Source: TOraObject); virtual;Parameters
SourceHolds the source object to copy properties or other attributes from.

Remarks
Call the Assign method to copy the properties or other attributes from another object.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.3.3 CreateObject Method

Creates an object.

Class
TOraObject© 2019 DevartReference

1200

Syntax
procedure CreateObject(OCISvcCtx: TOCISvcCtx; const TypeName:string); deprecated;
Parameters
SvcCtxHolds an OCI service context handle.
TypeName
Holds the type of the object to create.

Remarks
Call the CreateObject method to create an object.
Note: This method is obsolete, so it's better to use the AllocObject method instead.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.3.4 Exists Method

Verifies if an object instance exists in a database.

Class
TOraObject

Syntaxfunction Exists: boolean;

Remarks
Call the Exists method to verify whether an instance of an object exists in the database.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.24.1.3.3.5 Flush Method

Places modifications made to the object to the database.

Class
TOraObject© 2019 Devart

Provide Feedback

1201

Oracle Data Access Components

Syntax
procedure Flush;

Remarks
Call the Flush method to place modifications made to the object into the database.
See the OCIObjectFlush function description in Oracle references for more detailed
description of this method.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.3.6 FreeObject Method

Deallocates and frees an object instance.

Class
TOraObject

Syntax
procedure FreeObject(FreeChild: boolean = True); virtual;Parameters
FreeChildHolds True, if there is an object to be deallocated and freed.

Remarks
Call the FreeObject method to deallocate and free an object instance.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.3.7 IsDirty Method

Verifies if an object instance is marked as dirty.

Class
TOraObject

Syntaxfunction IsDirty: boolean;© 2019 DevartReference

1202

Return Value
True, if the instance is marked as dirty.

Remarks
Call the IsDirty method to verify whether the object instance is marked as dirty.
The return value is True if the instance is dirty.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.3.8 IsLocked Method

Verifies if an object instance is marked as locked.

Class
TOraObject

Syntaxfunction IsLocked: boolean;
Return Value
True, if the instance is locked.

Remarks
Call the IsLocked method to verify whether the object instance is marked as locked.
The return value is True if the instance is locked.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

5.24.1.3.3.9 Lock Method

Marks an object as locked for update.

Class
TOraObject

Syntax
procedure Lock;

Remarks© 2019 Devart

DAC Forum

Provide Feedback

1203

Oracle Data Access Components

Call the Lock method to mark an object as locked for update.
See the OCIObjectLock function description in the Oracle references for more detailed
description of this method.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.3.10 MarkDelete Method

Marks an object as being deleted.

Class
TOraObject

Syntax
procedure MarkDelete;

Remarks
Call the MarkDelete method to mark an object as being deleted.
See the OCIObjectMarkDelete function description in the Oracle references for more detailed
description of this method.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.3.11 MarkUpdate Method

Marks an object as being updated.

Class
TOraObject

Syntax
procedure MarkUpdate;

Remarks
Call MarkUpdate method to mark this object as being updated.
See the OCIObjectMarkUpdate function description in the Oracle references for more detailed
description of this method.

© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1204

Devart. All Rights
Reserved.
5.24.1.3.3.12 Refresh Method

Retrieves the latest database image for the object.

Class
TOraObject

Syntax
procedure Refresh;

Remarks
Call the Refresh method to retrieve the latest database image for the object.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.3.3.13 Unmark Method

Marks an object as not being dirty.

Class
TOraObject

Syntax
procedure Unmark;Remarks
Call the Unmark method to mark an object as not being dirty.
See the OCIObjectUnmark function description in the Oracle references for more detailed
description of this method.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.24.1.4 TOraRef ClassA class representing the Oracle reference data type value.
For a list of all members of this type, see TOraRef members.

© 2019 Devart

Provide Feedback

1205

Oracle Data Access Components

Unit
OraObjects

SyntaxTOraRef = class(TOraObject);Remarks
TOraRef represents a value of Oracle reference data type. TOraRef is inherited from
TOraObject. You can get TOraRef object by TOraDataSet.GetRef method after fetching rows
containing array field. Also you can get it using TOraParam.AsRef method.

Inheritance Hierarchy
TSharedObject
TDBObject
TOraObject
TOraRef

See Also
TOraObject
TOraType
TOraDataSet.GetRef
TOraParam.AsRef© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.4.1 Members

TOraRef class overview.

Properties
Name
AsHex
AttrAsArray (inherited from TOraObject)
AttrAsDateTime (inherited from TOraObject)

Description
Used to convert the REF
value converted to thehexadecimal string.
Used to get the TOraArraytype attribute value.
Used to read the attribute's© 2019 DevartReference

AttrAsFloat (inherited from TOraObject)

AttrAsInteger (inherited from TOraObject)

AttrAsLob (inherited from TOraObject)

AttrAsObject (inherited from TOraObject)

AttrAsOCIDate (inherited from TOraObject)

AttrAsOCINumber (inherited from TOraObject)

AttrAsOCIString (inherited from TOraObject)

AttrAsString (inherited from TOraObject)

AttrIsNull (inherited from TOraObject)
Indicator (inherited from TOraObject)© 2019 Devart

1206

data value into TDateTime,or to assign a TDateTime
value to the contents of an
attribute.
Used to read the attribute's
data value into a double, or
to assign a double value tothe contents of an attribute.
Used to read the attribute's
data value as integer, or toassign an integer value tothe contents of an attribute.
Used to get reference to the
TOraLob object that
represents the LOBAttributevalue.
Used to read the attribute's
data value as TOraObject, or
to assign a TOraObject
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIDate, or toassign an OCIDate value tothe contents of an attribute.
Used to read the attribute's
data value into OCINumber,or to assign an OCINumber
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIString, or
to assign an OCIString value
to the contents of an
attribute.
Used to read the attribute's
data value as string, or toassign a string value to thecontents of an attribute.
Used to indicate if theattribute value is NULL.
Used to get a pointer to theindicator structure of an
object.

1207

Oracle Data Access Components

Instance (inherited from TOraObject)
IsNull (inherited from TOraObject)
ObjectType (inherited from TOraObject)
OCIRef
OCIRefPtr
OCISvcCtx (inherited from TOraObject)
RefCount (inherited from TSharedObject)

Used to get a pointer to theinternal representation of an
object.
Used to verify if an object isempty.
Used to indicate the object
type.
Used to get or set the
OCIRef handle of reference.
Provides reference to
OCIRef handle.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.

Methods
Name
AddRef (inherited from TSharedObject)

AllocObject (inherited from TOraObject)
Assign (inherited from TOraObject)

Clear
CreateObject (inherited from TOraObject)
Exists (inherited from TOraObject)
Flush (inherited from TOraObject)
FreeObject (inherited from TOraObject)
IsDirty (inherited from TOraObject)

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Overloaded. Allocates anobject instance.
Copies properties or otherattributes from anotherobject.
Invalidates reference so that
it would no longer point to an
object.
Creates an object.
Verifies if an object instanceexists in a database.
Places modifications madeto the object to the
database.
Deallocates and frees anobject instance.
Verifies if an object instanceis marked as dirty.

© 2019 DevartReference

Verifies if an object instanceis marked as locked.
Marks an object as locked
for update.
Marks an object as being
deleted.
Marks an object as being
updated.
Pins reference.
Verifies whether reference isassociated with an object
and the identifier of that
object is currently Null.
Retrieves the latest
database image for theobject.
Decrements the reference
count.
Marks an object as not
being dirty.
Unpins reference.

IsLocked (inherited from TOraObject)
Lock (inherited from TOraObject)
MarkDelete (inherited from TOraObject)
MarkUpdate (inherited from TOraObject)
Pin
RefIsNull

Refresh (inherited from TOraObject)
Release (inherited from TSharedObject)
Unmark (inherited from TOraObject)
Unpin© 1997-2019
Devart. All Rights
Reserved.

Request Support

1208

DAC Forum

Provide Feedback

5.24.1.4.2 Properties

Properties of the TOraRef class.
For a complete list of the TOraRef class members, see the TOraRef Members topic.

PublicName
AsHex
AttrAsArray (inherited from TOraObject)

AttrAsDateTime (inherited from TOraObject)© 2019 Devart

Description
Used to convert the REF
value converted to thehexadecimal string.
Used to get the TOraArraytype attribute value.
Used to read the attribute's
data value into TDateTime,or to assign a TDateTime
value to the contents of an
attribute.

1209

Oracle Data Access Components

AttrAsFloat (inherited from TOraObject)

AttrAsInteger (inherited from TOraObject)

AttrAsLob (inherited from TOraObject)

AttrAsObject (inherited from TOraObject)

AttrAsOCIDate (inherited from TOraObject)

AttrAsOCINumber (inherited from TOraObject)

AttrAsOCIString (inherited from TOraObject)

AttrAsString (inherited from TOraObject)

AttrIsNull (inherited from TOraObject)
Indicator (inherited from TOraObject)

Instance (inherited from TOraObject)
IsNull (inherited from TOraObject)

Used to read the attribute's
data value into a double, or
to assign a double value tothe contents of an attribute.
Used to read the attribute's
data value as integer, or toassign an integer value tothe contents of an attribute.
Used to get reference to the
TOraLob object that
represents the LOBAttributevalue.
Used to read the attribute's
data value as TOraObject, or
to assign a TOraObject
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIDate, or toassign an OCIDate value tothe contents of an attribute.
Used to read the attribute's
data value into OCINumber,or to assign an OCINumber
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIString, or
to assign an OCIString value
to the contents of an
attribute.
Used to read the attribute's
data value as string, or toassign a string value to thecontents of an attribute.
Used to indicate if theattribute value is NULL.
Used to get a pointer to theindicator structure of an
object.
Used to get a pointer to theinternal representation of an
object.
Used to verify if an object isempty.
© 2019 DevartReference

1210

Used to indicate the object
type.
Used to get or set the
OCIRef handle of reference.
Provides reference to
OCIRef handle.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.

ObjectType (inherited from TOraObject)
OCIRef
OCIRefPtr
OCISvcCtx (inherited from TOraObject)
RefCount (inherited from TSharedObject)

See Also
TOraRef Class
TOraRef Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.4.2.1 AsHex Property

Used to convert the REF value converted to the hexadecimal string.

Class
TOraRef

Syntaxproperty AsHex: string;

Remarks
Use the AsHex property to get the REF value converted to hexadecimal string.

See Also
TOraRef© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1211

Oracle Data Access Components

5.24.1.4.2.2 OCIRef Property

Used to get or set the OCIRef handle of reference.

Class
TOraRef

Syntaxproperty OCIRef: pOCIRef;

Remarks
Use the OCIRef property to get or set the OCIRef handle of reference.

See Also
TOraRef© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.4.2.3 OCIRefPtr Property

Provides reference to OCIRef handle.

Class
TOraRef

Syntaxproperty OCIRefPtr: ppOCIRef;

Remarks
Use the OCIRefPtr property to get reference to OCIRef handle.

See Also
TOraRef© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference1212

5.24.1.4.3 Methods

Methods of the TOraRef class.
For a complete list of the TOraRef class members, see the TOraRef Members topic.

PublicName
AddRef (inherited from TSharedObject)

AllocObject (inherited from TOraObject)
Assign (inherited from TOraObject)

Clear
CreateObject (inherited from TOraObject)
Exists (inherited from TOraObject)
Flush (inherited from TOraObject)
FreeObject (inherited from TOraObject)
IsDirty (inherited from TOraObject)
IsLocked (inherited from TOraObject)
Lock (inherited from TOraObject)
MarkDelete (inherited from TOraObject)
MarkUpdate (inherited from TOraObject)
Pin
RefIsNull© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Overloaded. Allocates anobject instance.
Copies properties or otherattributes from anotherobject.
Invalidates reference so that
it would no longer point to an
object.
Creates an object.
Verifies if an object instanceexists in a database.
Places modifications madeto the object to the
database.
Deallocates and frees anobject instance.
Verifies if an object instanceis marked as dirty.
Verifies if an object instanceis marked as locked.
Marks an object as locked
for update.
Marks an object as being
deleted.
Marks an object as being
updated.
Pins reference.
Verifies whether reference isassociated with an object
and the identifier of that
object is currently Null.

1213

Oracle Data Access Components

Retrieves the latest
database image for theobject.
Decrements the reference
count.
Marks an object as not
being dirty.
Unpins reference.

Refresh (inherited from TOraObject)
Release (inherited from TSharedObject)
Unmark (inherited from TOraObject)
Unpin

See Also
TOraRef Class
TOraRef Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.4.3.1 Clear Method

Invalidates reference so that it would no longer point to an object.

Class
TOraRef

Syntax
procedure Clear;

Remarks
Call the Clear method to invalidate reference so that it would no longer point to an object.

See Also
TOraRef© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.4.3.2 Pin Method

Pins reference.

Class
TOraRef© 2019 DevartReference

1214

Syntax
procedure Pin;

Remarks
Call the Pin method to pin reference.

See Also
TOraRef© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.4.3.3 RefIsNull Method

Verifies whether reference is associated with an object and the identifier of that object iscurrently Null.

Class
TOraRef

Syntaxfunction RefIsNull: boolean;
Return Value
True, if object identifier is Null. False otherwise.

Remarks
Call the RefIsNull method to verify whether reference is associated with an object and theidentifier of that object is currently Null.
The return value is True if object's identifier is Null.

See Also
TOraRef© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1215

Oracle Data Access Components

5.24.1.4.3.4 Unpin Method

Unpins reference.

Class
TOraRef

Syntax
procedure Unpin;

Remarks
Call the Unpin method to unpin reference.

See Also
TOraRef© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.5 TOraType ClassA class holding information about Oracle type required for TOraObject objects.
For a list of all members of this type, see TOraType members.

Unit
OraObjects

SyntaxTOraType = class(TObjectType);

Remarks
The TOraType class represents Oracle type and holds information about type required for
TOraObject objects.

Inheritance Hierarchy
TSharedObject
TObjectType
TOraType

See Also© 2019 DevartReference

1216

TObjectType
TOraObject© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.5.1 Members

TOraType class overview.

Properties
Name
AttributeCount (inherited from TObjectType)
Attributes (inherited from TObjectType)
DataSize

DataType (inherited from TObjectType)

IndicatorSize

RefCount (inherited from TSharedObject)
Size (inherited from TObjectType)
TDO

Description
Used to indicate the numberof attributes of type.
Used to access separate
attributes.
Used to specify the size forallocating an Oracle object
in the memory.
Used to indicate the type ofobject dtObject, dtArray or
dtTable.
Contains the size of theindicator structure for Oracle
object.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of an
object instance.
Used to retrieve the typedescriptor object for type.

Methods
Name
AddRef (inherited from TSharedObject)

FindAttribute (inherited from TObjectType)© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Indicates whether a
specified Attributecomponent is referenced in1217

Oracle Data Access Components

the TAttributes object.
Decrements the reference
count.

Release (inherited from TSharedObject)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.5.2 Properties

Properties of the TOraType class.
For a complete list of the TOraType class members, see the TOraType Members topic.

PublicName
AttributeCount (inherited from TObjectType)
Attributes (inherited from TObjectType)
DataSize

DataType (inherited from TObjectType)

IndicatorSize

RefCount (inherited from TSharedObject)
Size (inherited from TObjectType)
TDO

Description
Used to indicate the numberof attributes of type.
Used to access separate
attributes.
Used to specify the size forallocating an Oracle object
in the memory.
Used to indicate the type ofobject dtObject, dtArray or
dtTable.
Contains the size of theindicator structure for Oracle
object.
Used to return the count ofreference to a
TSharedObject object.
Used to learn the size of an
object instance.
Used to retrieve the typedescriptor object for type.

See Also
TOraType Class
TOraType Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1218

5.24.1.5.2.1 DataSize Property

Used to specify the size for allocating an Oracle object in the memory.

Class
TOraType

Syntaxproperty DataSize: word;

Remarks
Use the DataSize property to determine the size for allocating an Oracle object in thememory.

See Also
IndicatorSize© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.5.2.2 IndicatorSize Property

Contains the size of the indicator structure for Oracle object.

Class
TOraType

Syntaxproperty IndicatorSize: word;

Remarks
Use the IndicatorSize property to learn the size of the indicator structure for Oracle object.

See Also
DataSize© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1219

Oracle Data Access Components

5.24.1.5.2.3 TDO Property

Used to retrieve the type descriptor object for type.

Class
TOraType

Syntaxproperty TDO: pOCIType;

Remarks
Use the TDO property to retrieve the type descriptor object for type.

See Also
M:Devart.Odac.TOraType.Describe(System.IntPtr,System.String)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6 TOraXML ClassA class representing a value of the Oracle SYS.XMLTYPE type.
For a list of all members of this type, see TOraXML members.

Unit
OraObjects

SyntaxTOraXML = class(TOraObject);Remarks
TOraXML represents a value of Oracle SYS.XMLTYPE type. Use TOraXML.AllocObject
method to create an object. Use TOraXML.AsString and TOraXML.LoadFromStream toinitialize XML value. You can get TOraXML object by TOraXMLField.AsXML method after
fetching rows contained XMLTYPE field. Also you can get it by TOraParam.AsXML method.
To manipulate obtained XML document use TOraXML.Extract, TOraXML.Exists, andTOraXML.Transform functions.

Examplevar© 2019 DevartReference

1220

XMLDoc : TOraXML;
begin
XMLDoc := TOraXML.Create();XMLDoc.OCISvcCtx := OraSession1.OCISvcCtx;
XMLDoc.AsString := '<root><node1>value</node1></root>';...

Inheritance Hierarchy
TSharedObject
TDBObject
TOraObject
TOraXMLSee Also
TOraType
TOraXMLField© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6.1 Members

TOraXML class overview.

Properties
Name
AsString
AttrAsArray (inherited from TOraObject)

AttrAsDateTime (inherited from TOraObject)

AttrAsFloat (inherited from TOraObject)

AttrAsInteger (inherited from TOraObject)© 2019 Devart

Description
Used to get and set the XML
document value.
Used to get the TOraArraytype attribute value.
Used to read the attribute's
data value into TDateTime,or to assign a TDateTime
value to the contents of an
attribute.
Used to read the attribute's
data value into a double, or
to assign a double value tothe contents of an attribute.
Used to read the attribute's
data value as integer, or toassign an integer value tothe contents of an attribute.

1221

Oracle Data Access Components

AttrAsLob (inherited from TOraObject)

AttrAsObject (inherited from TOraObject)

AttrAsOCIDate (inherited from TOraObject)

AttrAsOCINumber (inherited from TOraObject)

AttrAsOCIString (inherited from TOraObject)

AttrAsString (inherited from TOraObject)

AttrIsNull (inherited from TOraObject)
Indicator (inherited from TOraObject)

Instance (inherited from TOraObject)
IsNull (inherited from TOraObject)
ObjectType (inherited from TOraObject)
OCISvcCtx (inherited from TOraObject)
RefCount (inherited from TSharedObject)

Used to get reference to the
TOraLob object that
represents the LOBAttributevalue.
Used to read the attribute's
data value as TOraObject, or
to assign a TOraObject
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIDate, or toassign an OCIDate value tothe contents of an attribute.
Used to read the attribute's
data value into OCINumber,or to assign an OCINumber
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIString, or
to assign an OCIString value
to the contents of an
attribute.
Used to read the attribute's
data value as string, or toassign a string value to thecontents of an attribute.
Used to indicate if theattribute value is NULL.
Used to get a pointer to theindicator structure of an
object.
Used to get a pointer to theinternal representation of an
object.
Used to verify if an object isempty.
Used to indicate the object
type.
Used to assign a service
context handle.
Used to return the count ofreference to a
TSharedObject object.

© 2019 DevartReference

1222

Methods
Name
AddRef (inherited from TSharedObject)

AllocObject
Assign (inherited from TOraObject)
CreateObject (inherited from TOraObject)
ExistsExtract
Flush (inherited from TOraObject)
FreeObject (inherited from TOraObject)

GetSchema

IsDirty (inherited from TOraObject)
IsLocked (inherited from TOraObject)
IsSchemaBasedLoadFromStream
Lock (inherited from TOraObject)
MarkDelete (inherited from TOraObject)
MarkUpdate (inherited from TOraObject)© 2019 Devart

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
Overloaded. Allocates anobject instance from theexisting TOraLob object.
Copies properties or otherattributes from anotherobject.
Creates an object.
Checks if the given set ofnodes in the TOraXML
exists.
Extracts the given set ofnodes from the TOraXML.
Places modifications madeto the object to the
database.
Deallocates and frees anobject instance.
Determines the based
schema document, schema
URL and root element used
for the current XMLTypecreation.
Verifies if an object instanceis marked as dirty.
Verifies if an object instanceis marked as locked.
Determines if an XMLTypeinstance is schema-based.
Copies the contents of a
stream into the TOraXML
object.
Marks an object as locked
for update.
Marks an object as being
deleted.
Marks an object as being

1223

Oracle Data Access Components

updated.
Retrieves the latest
database image for theobject.
Decrements the reference
count.
Copies the contents of a
TOraXML object to a
stream.
Transforms and returns a
TOraXML object.
Marks an object as not
being dirty.
Checks if the input instanceconforms to a specified
XML schema.

Refresh (inherited from TOraObject)
Release (inherited from TSharedObject)
SaveToStream
Transform
Unmark (inherited from TOraObject)
Validate© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6.2 Properties

Properties of the TOraXML class.
For a complete list of the TOraXML class members, see the TOraXML Members topic.

PublicName
AsString
AttrAsArray (inherited from TOraObject)

AttrAsDateTime (inherited from TOraObject)

AttrAsFloat (inherited from TOraObject)

AttrAsInteger (inherited from TOraObject)

Description
Used to get and set the XML
document value.
Used to get the TOraArraytype attribute value.
Used to read the attribute's
data value into TDateTime,or to assign a TDateTime
value to the contents of an
attribute.
Used to read the attribute's
data value into a double, or
to assign a double value tothe contents of an attribute.
Used to read the attribute's
data value as integer, or toassign an integer value to© 2019 DevartReference

AttrAsLob (inherited from TOraObject)

AttrAsObject (inherited from TOraObject)

AttrAsOCIDate (inherited from TOraObject)

AttrAsOCINumber (inherited from TOraObject)

AttrAsOCIString (inherited from TOraObject)

AttrAsString (inherited from TOraObject)

AttrIsNull (inherited from TOraObject)
Indicator (inherited from TOraObject)

Instance (inherited from TOraObject)
IsNull (inherited from TOraObject)
ObjectType (inherited from TOraObject)
OCISvcCtx (inherited from TOraObject)
RefCount (inherited from TSharedObject)© 2019 Devart1224

the contents of an attribute.
Used to get reference to the
TOraLob object that
represents the LOBAttributevalue.
Used to read the attribute's
data value as TOraObject, or
to assign a TOraObject
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIDate, or toassign an OCIDate value tothe contents of an attribute.
Used to read the attribute's
data value into OCINumber,or to assign an OCINumber
value to the contents of an
attribute.
Used to read the attribute's
data value as OCIString, or
to assign an OCIString value
to the contents of an
attribute.
Used to read the attribute's
data value as string, or toassign a string value to thecontents of an attribute.
Used to indicate if theattribute value is NULL.
Used to get a pointer to theindicator structure of an
object.
Used to get a pointer to theinternal representation of an
object.
Used to verify if an object isempty.
Used to indicate the object
type.
Used to assign a service
context handle.
Used to return the count ofreference to a

1225

Oracle Data Access Components

TSharedObject object.

See Also
TOraXML Class
TOraXML Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6.2.1 AsString Property

Used to get and set the XML document value.

Class
TOraXML

Syntaxproperty AsString: string;

Remarks
Use the AsString property to get and set the XML document value. Reading AsString when
TOraObject.IsNull is True returns empty string.

See Also
TOraObject.IsNull© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6.3 Methods

Methods of the TOraXML class.
For a complete list of the TOraXML class members, see the TOraXML Members topic.

PublicName
AddRef (inherited from TSharedObject)

Description
Increments the reference
count for the number ofreferences dependent on theTSharedObject object.
© 2019 DevartReference

AllocObject
Assign (inherited from TOraObject)
CreateObject (inherited from TOraObject)
ExistsExtract
Flush (inherited from TOraObject)
FreeObject (inherited from TOraObject)

GetSchema

IsDirty (inherited from TOraObject)
IsLocked (inherited from TOraObject)
IsSchemaBasedLoadFromStream
Lock (inherited from TOraObject)
MarkDelete (inherited from TOraObject)
MarkUpdate (inherited from TOraObject)
Refresh (inherited from TOraObject)
Release (inherited from TSharedObject)
SaveToStream© 2019 Devart

1226

Overloaded. Allocates anobject instance from theexisting TOraLob object.
Copies properties or otherattributes from anotherobject.
Creates an object.
Checks if the given set ofnodes in the TOraXML
exists.
Extracts the given set ofnodes from the TOraXML.
Places modifications madeto the object to the
database.
Deallocates and frees anobject instance.
Determines the based
schema document, schema
URL and root element used
for the current XMLTypecreation.
Verifies if an object instanceis marked as dirty.
Verifies if an object instanceis marked as locked.
Determines if an XMLTypeinstance is schema-based.
Copies the contents of a
stream into the TOraXML
object.
Marks an object as locked
for update.
Marks an object as being
deleted.
Marks an object as being
updated.
Retrieves the latest
database image for theobject.
Decrements the reference
count.
Copies the contents of a

1227

Oracle Data Access Components

TOraXML object to a
stream.
Transforms and returns a
TOraXML object.
Marks an object as not
being dirty.
Checks if the input instanceconforms to a specified
XML schema.

Transform
Unmark (inherited from TOraObject)
Validate

See Also
TOraXML Class
TOraXML Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6.3.1 AllocObject Method

Allocates an object instance from the existing TOraLob object.

Class
TOraXML

Overload List
Name
AllocObject
AllocObject
AllocObject
AllocObject(const TypeName: string)© 1997-2019
Devart. All Rights
Reserved.

Request Support

Description
Allocates an object instance from theexisting TOraLob object.
Allocates an object instance from theexisting TOraLob object.
Allocates an object instance from theexisting TOraLob object.
Allocates an object instance from theexisting TOraLob object.
DAC Forum

Provide Feedback

Allocates an object instance from the existing TOraLob object.

Class© 2019 DevartReference

1228

TOraXML

Syntax
procedure AllocObject; overload; override;

Remarks
Call the AllocObject method to allocate an object instance from the existing TOraLob object.
The procedure modifies service context handle before allocating the object.

See Also
TOraObject.AllocObject
TOraLob© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Allocates an object instance from the existing TOraLob object.

Unit
Syntax© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Allocates an object instance from the existing TOraLob object.

Unit
Syntax© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Allocates an object instance from the existing TOraLob object.

Class
TOraXML

Syntax© 2019 Devart

Provide Feedback

1229

Oracle Data Access Components

procedure AllocObject(const TypeName: string); overload;
override;Parameters
TypeName© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6.3.2 Exists Method

Checks if the given set of nodes in the TOraXML exists.

Class
TOraXML

Syntaxfunction Exists(const XPathExpr: string; const NSmap: string =''): boolean;
Parameters
XPathExpr
Holds the set of nodes in the TOraXML.
NSmap
Holds a namespace map of TOraXML.
Return Value
True if specified nodes exist in TOraXML, False otherwise.

Remarks
Call the Exists method to check if the given set of nodes in TOraXML exists. This set of nodes
is specified by the XPathExpr parameter.
Returns True if specified nodes exist in the TOraXML, otherwise, returns False.

Examplevar
RetDoc: TOraXML;
Res: boolean;
begin
...
Edit;
TOraXMLField(FieldByName('XMLField')).AsXML.AsString :='<root> '+'<x xmlns:edi=''http://ecommerce.org/schema''> '+© 2019 DevartReference

1230'<b>32.18</b> '+'<edi:price units=''Euro''>32.18</edi:price> '+'</x> '+'</root>';
Post;
...
with TOraXMLField(FieldByName('XMLField')).AsXML do begin
Res := Exists('//edi:price', 'xmlns:edi=http://ecommerce.org/schema');Res := Exists('/root/node1'); //Res = False
end;
end;

See Also
Extract
GetSchema
IsSchemaBasedTransform© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6.3.3 Extract Method

Extracts the given set of nodes from the TOraXML.

Class
TOraXML

Syntax
procedure Extract(RetDoc: TOraXML; XPathExpr: string; NSmap:
string = '');
Parameters
RetDocHolds a destination TOraXML object which holds the operation result.
XPathExpr
Holds an expression that specifies the set of nodes to extract.
NSmap
Holds a namespace map of TOraXML.

Remarks
Call the Extract method to extract the given set of nodes from the TOraXML. This set ofnodes is specified by the XPathExpr expression. The original document remains unchanged.
If no nodes match the specified expression, returns NULL document. RetDoc parameter is a
© 2019 Devart

1231

Oracle Data Access Components

destination TOraXML object which holds the operation result. RetDoc object must be created
before passing it as a parameter. Use XPathExpr parameter to specify what nodes to searchfor. The NSmap parameter is a namespace that can be used to identify the mapping of
prefix(es) specified in the XPath_string to the corresponding namespace(s). The format is"xmlns=a.com xmlns:b=b.com".

Examplevar
RetDoc: TOraXML;
Str: string;
begin
...
Edit;
TOraXMLField(FieldByName('XMLField')).AsXML.AsString :='<root> '+'<x xmlns:edi=''http://ecommerce.org/schema''> '+'<b>32.18</b> '+'<edi:price units=''Euro''>32.18</edi:price> '+'</x> '+'</root>';
Post;
...
RetDoc := TOraXML.Create();
RetDoc.OCISvcCtx := OraSession1.OCISvcCtx;
trywith TOraXMLField(FieldByName('XMLField')).AsXML do begin
Extract(RetDoc, '//edi:price', 'xmlns:edi=http://ecommerce.org/sche
Str := RetDoc.AsString;
Extract(RetDoc, '/root/x/b');
Str := RetDoc.AsString; // Str = '<b>32.18</b>'end;
finally
RetDoc.Free;
end;
end;

See Also
Exists
GetSchema
IsSchemaBasedTransform© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference1232

5.24.1.6.3.4 GetSchema Method

Determines the based schema document, schema URL and root element used for thecurrent XMLType creation.

Class
TOraXML

Syntax
procedure GetSchema(SchemaDoc: TOraXML; var SchemaURL: string;var RootElem: string);
Parameters
SchemaDoc
Holds a destination TOraXML object which holds the operation result.
SchemaURL
Holds the schema URL.
RootElemHolds the root element declared in schema.

Remarks
Call the GetSchema method for schema based TOraXML objects to determine the based
schema document, schema URL and root element used for the current XMLType creation.
SchemaDoc parameter is a destination TOraXML object which holds the operation result.
SchemaDoc object must be created before passing it as a parameter. Use SchemaURL
parameter to return based schema URL used for creating XMLType object. Use RootElem
parameter to return root element declared in schema that is represented by XML document.

Examplevar
RetDoc: TOraXML;
ResStr: boolean;
beginwith OraQuery1 do begin
RetDoc := TOraXML.Create();
RetDoc.OCISvcCtx := OraSession1.OCISvcCtx;
trywith TOraXMLField(FieldByName('XMLField')).AsXML do begin
GetSchema(RetDoc, SchemaURL, RootElem);
ResStr := RetDoc.AsString;end;
finally
RetDoc.Free;end;© 2019 Devart

1233

Oracle Data Access Components

end;
end;

See Also
ExistsExtract
IsSchemaBasedTransform© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6.3.5 IsSchemaBased Method

Determines if an XMLType instance is schema-based.

Class
TOraXML

Syntaxfunction IsSchemaBased: boolean;
Return Value
True, if the XML instance is schema-based. False otherwise.

Remarks
Call the IsShemaBased method to determine whether the XMLType instance is schemabased. Returns True or False depending on whether the XMLType instance is schemabased.

See Also
ExistsExtract
GetSchemaTransform© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference1234

5.24.1.6.3.6 LoadFromStream Method

Copies the contents of a stream into the TOraXML object.

Class
TOraXML

Syntax
procedure LoadFromStream(Stream: TStream);
Parameters
StreamHolds the name of a stream from which the field's value is copied.

Remarks
Call the LoadFromStream method to copy the contents of a stream into the TOraXML object.
Specify the stream from which the field's value is copied as the value of the Stream
parameter.

See Also
SaveToStream© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6.3.7 SaveToStream Method

Copies the contents of a TOraXML object to a stream.

Class
TOraXML

Syntax
procedure SaveToStream(Stream: TStream);
Parameters
StreamHold the name of a stream to copy the contents of a TOraXML object to.

Remarks
Call the SaveToStream method to copy the contents of a TOraXML object to a stream.

© 2019 Devart

1235

Oracle Data Access Components

Specify the name of the stream to which the field's value is saved as the value of the Stream
parameter.

See Also
LoadFromStream© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6.3.8 Transform Method

Transforms and returns a TOraXML object.

Class
TOraXML

Syntax
procedure Transform(XSLDoc: TOraXML; RetDoc: TOraXML);Parameters
XSLDocHolds an XSL document.
RetDocHolds a destination TOraXML object which holds the new (transformed) XML document.

Remarks
Call the Transform method to transform and return TOraXML, using the given XSL document
in XSLDoc parameter. The new (transformed) XML document is assigned to RetDoc.
XSLDoc parameter is the XSL document to be applied to the XMLType. RetDoc parameter isa destination TOraXML object which holds the operation result. RetDoc object must be
created before passing it as a parameter.

Examplevar
RetDoc, XSLDoc: TOraXML;
begin
RetDoc := TOraXML.Create();
RetDoc.OCISvcCtx := OraSession1.OCISvcCtx;
XSLDoc := TOraXML.Create();XSLDoc.OCISvcCtx := OraSession1.OCISvcCtx;
trywith TOraXMLField(FieldByName('XMLField')).AsXML do begin
XSLDoc.AsString:=XSLDocument;© 2019 DevartReference

1236

Transform(XSLDoc, RetDoc);
Str := RetDoc.AsString;end;
finally
RetDoc.Free;XSLDoc.Free;
end;
end;

See Also
ExistsExtract
GetSchema
IsSchemaBased© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.24.1.6.3.9 Validate Method

Checks if the input instance conforms to a specified XML schema.

Class
TOraXML

Syntaxfunction Validate(const SchemaURL: string): boolean;
Parameters
SchemaURL
Holds the URL of the XML Schema against which to check the conformance.
Return Value
True, if the input instance conforms to a specified XML schema. False otherwise.

Remarks
Call the Validate method to check if the input instance conforms to a specified XML schema.
SchemaURL parameter is the URL of the XML Schema against which to check the
conformance.

ExampleResult := TOraXMLField(FieldByName('XMLField')).AsXML.Validate('http://www.oSee Also© 2019 Devart

1237

Oracle Data Access Components

Extract
GetSchema
IsSchemaBasedTransform© 1997-2019
Devart. All Rights
Reserved.

5.25

Request Support

DAC Forum

Provide Feedback

OraPackage
This unit contains implementation of the TOraPackage component.

ClassesName

Description
A a base class forcomponents that provide
access to packages stored
in an Oracle database.
A component providing
access to packages stored
in an Oracle database.

TCustomOraPackage

TOraPackage© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.25.1 Classes
Classes in the OraPackage unit.

ClassesName

Description
A a base class forcomponents that provide
access to packages stored
in an Oracle database.
A component providing
access to packages stored
in an Oracle database.

TCustomOraPackage

TOraPackage© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1238

5.25.1.1 TCustomOraPackage ClassA a base class for components that provide access to packages stored in an Oracle
database.
For a list of all members of this type, see TCustomOraPackage members.

Unit
OraPackage

SyntaxTCustomOraPackage = class(TCustomOraComponent);

Inheritance Hierarchy
TCustomOraComponent
TCustomOraPackage© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.25.1.1.1 Members

TCustomOraPackage class overview.

Properties
Name
ParamsSessionDescription
Used to receive values thatare the output parameters of
package stored procedures.
Used to specify the session
component which is
associated with thisTOraPackage object.

Methods
Name
ExecProc
ExecProcEx
VariableByName© 2019 Devart

Description
Calls the stored procedures
defined for a given package.
Calls the stored procedures
defined for a given package.
Provides access to package

1239

Oracle Data Access Components

variables.
© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.25.1.1.2 Properties

Properties of the TCustomOraPackage class.
For a complete list of the TCustomOraPackage class members, see theTCustomOraPackage Members topic.

PublicName

Description
Used to receive values thatare the output parameters of
package stored procedures.

ParamsPublished
Name

Description
Used to specify the session
component which is
associated with thisTOraPackage object.

SessionSee Also
TCustomOraPackage Class
TCustomOraPackage Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.25.1.1.2.1 Params Property

Used to receive values that are the output parameters of package stored procedures.

Class
TCustomOraPackage

Syntax© 2019 DevartReference1240

property Params: TOraParams;

Remarks
Use the Params property to receive values that are the output parameters of package stored
procedures.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.25.1.1.2.2 Session Property

Used to specify the session component which is associated with this TOraPackage object.

Class
TCustomOraPackage

Syntaxproperty Session: TOraSession;

Remarks
Use the Session propery to specify the session component which is associated with thisTOraPackage object.
At design-time select a session instance from a dropdown listbox.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.25.1.1.3 Methods

Methods of the TCustomOraPackage class.
For a complete list of the TCustomOraPackage class members, see theTCustomOraPackage Members topic.

PublicName
ExecProc
ExecProcEx
VariableByName© 2019 Devart

Description
Calls the stored procedures
defined for a given package.
Calls the stored procedures
defined for a given package.
Provides access to package

1241

Oracle Data Access Components

variables.

See Also
TCustomOraPackage Class
TCustomOraPackage Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.25.1.1.3.1 ExecProc Method

Calls the stored procedures defined for a given package.

Class
TCustomOraPackage

Syntax
procedure ExecProc(const Name: string); overload;function
ExecProc(Name: string; const Params: array of variant): variant;overload;
Parameters
Name
Holds the name of the stored procedure.
Paramsholds the parameter values array.
Return Valuea result, if a stored procedure is a function, Null otherwise.

Remarks
Call the ExecProc method to call the stored procedures defined for a given package. The
Name parameter is a name of a stored procedure.
If a stored procedure accepts or returns parameters they must be supplied in the Params
array in exactly the same order and number as they appear in the declaration of this stored
procedure. If the value for an input parameter was not included in the Params array, theparameter default value is taken. Only the parameter values at the end of the list may beunincluded to the parameter values array. If the parameter has no default value, the NULL
value is sent.
For example, the following is a stored procedure declaration in package DBMS_ALERT:© 2019 DevartReference1242

DBMS_ALERT.SIGNAL (name
IN
VARCHAR2,
messageIN
VARCHAR2);
it may be called with this code:
MyOraPackage.ExecProc('SIGNAL', ['MySignalName', 'MyMessage']);This is different from the way ExecProcEx is used.
Note: Stored functions unlike stored procedures return result values. To understand theparameters usage see TCustomDAConnection.ExecProc.

See Also
ExecProcEx
TCustomDAConnection.ExecProc
TCustomDAConnection.ExecSQL
TCustomDAConnection.ExecSQLEx© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.25.1.1.3.2 ExecProcEx Method

Calls the stored procedures defined for a given package.

Class
TCustomOraPackage

Syntaxfunction ExecProcEx(Name: string; const Params: array ofvariant): variant;Parameters
Name
Holds the name of the stored procedure.
ParamsHolds the parameter values array.
Return Valuea result, if a stored procedure is a function, Null otherwise.

Remarks
Call the ExecProcEx method to call stored procedures defined for a given package. Name
parameter is a name of a stored procedure.
If the sored procedure accepts or returns parameters, they must be supplied in the Params© 2019 Devart1243

Oracle Data Access Components

array as pairs of parameters' names and values so that every value would come immediately
after its name. If the value for an input parameter was not included in the Params array,parameter default value is taken. If the parameter has no default value, NULL value is sent.
For example, the following is a stored procedure declaration in package DBMS_ALERT:DBMS_ALERT.SIGNAL (name
IN
VARCHAR2,
messageIN
VARCHAR2);
it may be called by this code:

MyOraPackage.ExecProcEx("SIGNAL", ["name", "MySignalName", "message", "MyMes
It is different from the way ExecProc is used.

See Also
ExecProc
TCustomDAConnection.ExecProcEx
TCustomDAConnection.ExecSQLEx© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.25.1.1.3.3 VariableByName Method

Provides access to package variables.

Class
TCustomOraPackage

Syntaxfunction VariableByName(Name: string): TVariable;
Parameters
Name
Holds the name of a variable.
Return Valuea reference for a TVariable object.

Remarks
Call the VariableByName method to get access to package variables.
Reference for a variable with the name not defined yet will prepare a placeholder for it.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference1244

5.25.1.2 TOraPackage Class

A component providing access to packages stored in an Oracle database.
For a list of all members of this type, see TOraPackage members.

Unit
OraPackage

Syntax
TOraPackage = class(TCustomOraPackage);

Remarks
Use the TOraPackage components to get access to packages stored in Oracle database.
Packages may encapsulate sets of procedures and functions along with related variables andconstants. To get the list of Oracle supplied packages refer to the Oracle online documents.

Inheritance Hierarchy
TCustomOraComponent
TCustomOraPackage
TOraPackage© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.25.1.2.1 Members

TOraPackage class overview.

Properties
Name
PackageName
Params (inherited from TCustomOraPackage)

Session (inherited from TCustomOraPackage)© 2019 Devart

Description
Used to supply an Oracle
package name.
Used to receive values thatare the output parameters of
package stored procedures.
Used to specify the session
component which is
associated with thisTOraPackage object.

1245

Oracle Data Access Components

Methods
Name

Description
Calls the stored procedures
ExecProc (inherited from TCustomOraPackage)
defined for a given package.
Calls the stored procedures
ExecProcEx (inherited from TCustomOraPackage)
defined for a given package.
VariableByName (inherited from TCustomOraPackage) Provides access to package
variables.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
5.25.1.2.2 Properties

Properties of the TOraPackage class.
For a complete list of the TOraPackage class members, see the TOraPackage Members
topic.

PublicName
Params (inherited from TCustomOraPackage)

Description
Used to receive values thatare the output parameters of
package stored procedures.

Published
Name
PackageName

Session (inherited from TCustomOraPackage)

Description
Used to supply an Oracle
package name.
Used to specify the session
component which is
associated with thisTOraPackage object.

See Also
TOraPackage Class
TOraPackage Class Members© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1246

Reserved.
5.25.1.2.2.1 PackageName Property

Used to supply an Oracle package name.

Class
TOraPackage

Syntaxproperty PackageName: string;

Remarks
Use the PackageName property to supply an Oracle package name. Subsequent accesses
to package methods and variables will be associated with this name.
At design-time dropdown listbox provides all Oracle supplied and user-defined packages toselect from.

© 1997-2019
Devart. All Rights
Reserved.

5.26

Request Support

DAC Forum

Provide Feedback

OraProvider
This unit contains implementation of the TOraProvider component.

ClassesName

Description
A component for loading
data to and from a dataset.

TOraProvider© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.26.1 Classes
Classes in the OraProvider unit.

ClassesName
TOraProvider© 2019 Devart

Description
A component for loading
data to and from a dataset.

1247

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.26.1.1 TOraProvider Class

A component for loading data to and from a dataset.
For a list of all members of this type, see TOraProvider members.

Unit
OraProvider

Syntax
TOraProvider = class(TDataSetProvider);Remarks
TOraProvider provides data to and applies updates from a client dataset. TOraProvider isderived from TDataSetProvider and has same methods and properties as TProvider
component.
Note: TOraProvider component works with Delphi (C++Builder) Enterprise edition only. So to
install it you need to compile and install OraProvider package oraprovXX.bpk .

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

DAC Forum

Provide Feedback

5.26.1.1.1 Members

TOraProvider class overview.

© 1997-2019
Devart. All Rights
Reserved.

5.27

Request Support

OraScript
This unit contains implementation of the TOraScript component.

ClassesName
TOraScript

Description
A component for executing
several SQL statements one
by one.

© 2019 DevartReference

A class used for controlling
single SQL statements ofthe script.
A class for holding acollection of TOraStatement
objects.

TOraStatement

TOraStatements© 1997-2019
Devart. All Rights
Reserved.

1248

Request Support

DAC Forum

Provide Feedback

5.27.1 Classes
Classes in the OraScript unit.

ClassesName

Description
A component for executing
several SQL statements one
by one.
A class used for controlling
single SQL statements ofthe script.
A class for holding acollection of TOraStatement
objects.

TOraScript

TOraStatement

TOraStatements© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.27.1.1 TOraScript Class

A component for executing several SQL statements one by one.
For a list of all members of this type, see TOraScript members.

Unit
OraScript

SyntaxTOraScript = class(TDAScript);

Remarks© 2019 Devart

Provide Feedback

1249

Oracle Data Access Components

Often it is necessary to execute several SQL statements one by one. Known way is using a
lot of components such as TOraSQL. Usually it is not a good solution. Sometimes it can be
performed by anonymous PL/SQL block. But sometimes it does not work. For example, DDL
statements cannot be used in PL/SQL. With only one TOraScript component you can
execute several SQL statements as one. This sequence of statements is named script. To
separate single statements use semicolon (;), slash (/) ,and for PL/SQL - only slash . Notethat slash must be the first character in line.
Errors that occur while execution can be processed in the TDAScript.OnError event handler.
By default, on error TOraScript shows exception and continues execution.

Inheritance Hierarchy
TDAScript
TOraScript

See Also
TOraSQL© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.27.1.1.1 Members

TOraScript class overview.

Properties
Name
Connection (inherited from TDAScript)

DataSetDebug (inherited from TDAScript)

Delimiter (inherited from TDAScript)
EndLine (inherited from TDAScript)

Description
Used to specify theconnection in which thescript will be executed.
Used to assign a component
that will be used by
TOraScript to executestatements, and obtain
results of execution.
Used to display the script
execution and all its
parameter values.
Used to set the delimiter
string that separates script
statements.
Used to get the current© 2019 DevartReference

EndOffset (inherited from TDAScript)
EndPos (inherited from TDAScript)
Macros (inherited from TDAScript)

SessionSQL (inherited from TDAScript)
StartLine (inherited from TDAScript)

StartOffset (inherited from TDAScript)

StartPos (inherited from TDAScript)

Statements

1250

statement last line number ina script.
Used to get the offset in thelast line of the current
statement.
Used to get the end positionof the current statement.
Used to change SQL script
text in design- or run-timeeasily.
Used to specify the sessionin which the script will be
executed.
Used to get or set script text.
Used to get the current
statement start line number
in a script.
Used to get the offset in thefirst line of the current
statement.
Used to get the start positionof the current statement in ascript.
Contains the list of
statements obtained fromthe SQL property.

Methods
Name
BreakExec (inherited from TDAScript)
ErrorOffset (inherited from TDAScript)
Execute (inherited from TDAScript)
ExecuteFile (inherited from TDAScript)
ExecuteNext (inherited from TDAScript)
ExecuteStream (inherited from TDAScript)© 2019 Devart

Description
Stops script execution.
Used to get the offset of thestatement if the Execute
method raised an exception.
Executes a script.
Executes SQL statements
contained in a file.
Executes the next statementin the script and then stops.
Executes SQL statements
contained in a stream
object.

1251

Oracle Data Access Components

Finds a Macro with thename passed in Name.

MacroByName (inherited from TDAScript)

EventsName

Description
Occurs after a SQL script
execution.
Occurs when taking a
specific action before
executing the current SQL
statement is needed.
Occurs when Oracle raises
an error.

AfterExecute (inherited from TDAScript)

BeforeExecute (inherited from TDAScript)

OnError (inherited from TDAScript)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.27.1.1.2 Properties

Properties of the TOraScript class.
For a complete list of the TOraScript class members, see the TOraScript Members topic.

PublicName
Connection (inherited from TDAScript)

EndLine (inherited from TDAScript)

EndOffset (inherited from TDAScript)
EndPos (inherited from TDAScript)
StartLine (inherited from TDAScript)

StartOffset (inherited from TDAScript)

Description
Used to specify theconnection in which thescript will be executed.
Used to get the current
statement last line number ina script.
Used to get the offset in thelast line of the current
statement.
Used to get the end positionof the current statement.
Used to get the current
statement start line number
in a script.
Used to get the offset in thefirst line of the current
statement.
© 2019 DevartReference

1252

Used to get the start positionof the current statement in ascript.
Contains the list of
statements obtained fromthe SQL property.

StartPos (inherited from TDAScript)

Statements

Published
Name

Description
Used to assign a component
that will be used by
TOraScript to executestatements, and obtain
results of execution.
Used to display the script
execution and all its
parameter values.
Used to set the delimiter
string that separates script
statements.
Used to change SQL script
text in design- or run-timeeasily.
Used to specify the sessionin which the script will be
executed.

DataSetDebug (inherited from TDAScript)

Delimiter (inherited from TDAScript)

Macros (inherited from TDAScript)

SessionSQL (inherited from TDAScript)

Used to get or set script text.

See Also
TOraScript ClassTOraScript Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.27.1.1.2.1 DataSet Property

Used to assign a component that will be used by TOraScript to execute statements, andobtain results of execution.

Class© 2019 Devart

1253

Oracle Data Access Components

TOraScript

Syntaxproperty DataSet: TOraDataSet;

See Also
TOraDataSet
TDAScript.ExecuteNext© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.27.1.1.2.2 Session Property

Used to specify the session in which the script will be executed.

Class
TOraScript

Syntaxproperty Session: TOraSession;

Remarks
Use the Session property to specify the session in which the script will be executed. If
Session is not connected, Execute method calls Session.Connect.

See Also
TOraSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.27.1.1.2.3 Statements Property

Contains the list of statements obtained from the SQL property.

Class
TOraScript

Syntax© 2019 DevartReference1254

property Statements: TOraStatements;

Remarks
Contains the list of statements that are obtained from the SQL property. Access theStatements property to view SQL statement, set parameters or execute the specifiedstatement. Statements is a zero-based array of statement records. Index specifies the arrayelement to access.
For example, consider the following script:
CREATE TABLE A (FIELD1 INTEGER);INSERT INTO A VALUES(1);INSERT INTO A VALUES(2);INSERT INTO A VALUES(3);CREATE TABLE B (FIELD1 INTEGER);INSERT INTO B VALUES(1);INSERT INTO B VALUES(2);INSERT INTO B VALUES(3);Note: The list of statements is created and filled when the value of the Statements property isrequested for the first time. That's why the first access to the Statements property can take along time.

ExampleYou can use the Statements property as presented below:
procedure TForm1.Button1Click(Sender: TObject);var
i: integer;
begin
with Script do
begin
for i := 0 to Statements.Count - 1 do
if Copy(Statements[i].SQL, 1, 6) <> 'CREATE' thenStatements[i].Execute;
end;
end;

See Also
TOraStatements© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.27.1.2 TOraStatement ClassA class used for controlling single SQL statements of the script.
For a list of all members of this type, see TOraStatement members.

© 2019 Devart

Provide Feedback

1255

Oracle Data Access Components

Unit
OraScript

SyntaxTOraStatement = class(TDAStatement);

Remarks
TOraScript contains SQL statements, represented as TOraStatement objects.
TOraStatement class has attributes and methods for controlling single SQL statements of thescript.

Inheritance Hierarchy
TDAStatement
TOraStatement

See Also
TOraScript
TOraStatements
TOraStatements© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.27.1.2.1 Members

TOraStatement class overview.

Properties
Name
EndLine (inherited from TDAStatement)
EndOffset (inherited from TDAStatement)
EndPos (inherited from TDAStatement)
Omit (inherited from TDAStatement)

Description
Used to determine thenumber of the last statement
line in a script.
Used to get the offset in thelast line of the statement.
Used to get the end positionof the statement in a script.
Used to avoid execution of astatement.

© 2019 DevartReference

1256

Contains parameters for an
SQL statement.
Used to determine the
TDAScript object the SQLStatement belongs to.
Used to get or set the text ofan SQL statement.
Used to determine thenumber of the first statement
line in a script.
Used to get the offset in thefirst line of a statement.
Used to get the start positionof the statement in a script.

ParamsScript (inherited from TDAStatement)
SQL (inherited from TDAStatement)
StartLine (inherited from TDAStatement)
StartOffset (inherited from TDAStatement)
StartPos (inherited from TDAStatement)

Methods
Name
Execute (inherited from TDAStatement)© 1997-2019
Devart. All Rights
Reserved.

Request Support

Description
Executes a statement.
DAC Forum

Provide Feedback

5.27.1.2.2 Properties

Properties of the TOraStatement class.
For a complete list of the TOraStatement class members, see the TOraStatement Members
topic.

PublicName
EndLine (inherited from TDAStatement)
EndOffset (inherited from TDAStatement)
EndPos (inherited from TDAStatement)
Omit (inherited from TDAStatement)
Params© 2019 Devart

Description
Used to determine thenumber of the last statement
line in a script.
Used to get the offset in thelast line of the statement.
Used to get the end positionof the statement in a script.
Used to avoid execution of astatement.
Contains parameters for an
SQL statement.

1257

Oracle Data Access Components

Used to determine the
TDAScript object the SQLStatement belongs to.
Used to get or set the text ofan SQL statement.
Used to determine thenumber of the first statement
line in a script.
Used to get the offset in thefirst line of a statement.
Used to get the start positionof the statement in a script.

Script (inherited from TDAStatement)
SQL (inherited from TDAStatement)
StartLine (inherited from TDAStatement)
StartOffset (inherited from TDAStatement)
StartPos (inherited from TDAStatement)

See Also
TOraStatement ClassTOraStatement Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.27.1.2.2.1 Params Property

Contains parameters for an SQL statement.

Class
TOraStatement

Syntaxproperty Params: TOraParams;

Remarks
The Params property contains parameters for an SQL statement.
Access Params at runtime to view and set parameter names, values, and data types
dynamically. Params is a zero-based array of parameter records. Index specifies the arrayelement to access.

See Also
TOraParam© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1258

Reserved.
5.27.1.3 TOraStatements ClassA class for holding a collection of TOraStatement objects.
For a list of all members of this type, see TOraStatements members.

Unit
OraScript

SyntaxTOraStatements = class(TDAStatements);

Remarks
Each TOraStatements holds a collection of TOraStatement objects. TOraStatements
maintains an index of the statements in its TOraStatements.Items array. The Count property
contains the number of statements in the collection. Use TOraStatements class tomanipulate script SQL statements.

Inheritance Hierarchy
TDAStatements
TOraStatements

See Also
TDAScript
TDAStatement© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.27.1.3.1 Members

TOraStatements class overview.

Properties
Name

Description
Used to access individual
script statements.

Items© 1997-2019
Devart. All Rights© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1259

Oracle Data Access Components

Reserved.
5.27.1.3.2 Properties

Properties of the TOraStatements class.
For a complete list of the TOraStatements class members, see the TOraStatements
Members topic.

PublicName

Description
Used to access individual
script statements.

Items

See Also
TOraStatements ClassTOraStatements Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.27.1.3.2.1 Items Property(Indexer)

Used to access individual script statements.

Class
TOraStatements

Syntaxproperty Items[Index: Integer]: TOraStatement; default;
Parameters
Index
Holds an array of the statements index.

Remarks
Use the Items property to access individual script statements. The value of the Index
parameter corresponds to the Index property of TOraStatement.

See Also
TOraStatement© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1260

Devart. All Rights
Reserved.

5.28

OraSmart
This unit contains the TSmartQuery and TOraTable components.

ClassesName

Description
A base class defining
functionality for descendantclasses that accessdatabase using dynamicallygenerated SQL statements.
A component for retrieving
and updating data in asingle table without writing
SQL statements.
A component providing
TCustomSmartQuery.Expand fields feature, that lets alldata controls be aware of all
the fields belonging to
updating table an not only
those requested in SELECT
clause, andTCustomSmartQuery.Smart
Refresh feature (inProfessional and Developer
editions only).
This class allows setting up
the behaviour of theTSmartQuery class.

TCustomSmartQuery

TOraTable

TSmartQuery

TSmartQueryOptions

Enumerations
Name

Description
Specifies if
TCustomSmartQuery is inview mode.

TSmartState© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1261

Oracle Data Access Components

5.28.1 Classes
Classes in the OraSmart unit.

ClassesName

Description
A base class defining
functionality for descendantclasses that accessdatabase using dynamicallygenerated SQL statements.
A component for retrieving
and updating data in asingle table without writing
SQL statements.
A component providing
TCustomSmartQuery.Expand fields feature, that lets alldata controls be aware of all
the fields belonging to
updating table an not only
those requested in SELECT
clause, andTCustomSmartQuery.Smart
Refresh feature (inProfessional and Developer
editions only).
This class allows setting up
the behaviour of theTSmartQuery class.

TCustomSmartQuery

TOraTable

TSmartQuery

TSmartQueryOptions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1 TCustomSmartQuery ClassA base class defining functionality for descendant classes that access database using
dynamically generated SQL statements.
For a list of all members of this type, see TCustomSmartQuery members.

Unit
OraSmart

Syntax© 2019 DevartReference

1262

TCustomSmartQuery = class(TCustomOraQuery);Remarks
TCustomSmartQuery is a base class that defines functionality for descendant classes thataccess database using dynamically generated SQL statements. Applications never use
TCustomSmartQuery objects directly. Instead they use descendants ofTCustomSmartQuery, such as TSmartQuery and TOraTable.
TSmartQuery is an alternative to TOraQuery. It provides TCustomSmartQuery.Expand fields
feature, that lets all data controls be aware of all the fields belonging to updating table and not
only those requested in a SELECT clause, and TCustomSmartQuery.SmartRefresh feature(in Professional and Developer editions only).

Inheritance Hierarchy
TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQuery
TCustomSmartQuery

See Also
TOraQuery
TSmartQueryTOraStoredProc
TOraTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1.1 Members

TCustomSmartQuery class overview.

Properties
Name
BaseSQL (inherited from TCustomDADataSet)

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.

CachedUpdates (inherited from TMemDataSet)

Used to enable or disable© 2019 Devart

1263

Oracle Data Access Components

ChangeNotification (inherited from TOraDataSet)

CheckMode (inherited from TOraDataSet)

CommandTimeout (inherited from TOraDataSet)

Conditions (inherited from TCustomDADataSet)
Connection (inherited from TCustomDADataSet)

Cursor (inherited from TOraDataSet)
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)

DependEvents

DetailFields (inherited from TCustomDADataSet)

Disconnected (inherited from TCustomDADataSet)

DMLRefresh (inherited from TOraDataSet)
Encryption (inherited from TOraDataSet)

the use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.
Used to define the checkmode before editing arecord.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
Used to get or set thenames of the events thatdataset will depend on in
TCustomSmartQuery.Smart
Refresh mode.
Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption© 2019 DevartReference

ExpandFetchAll (inherited from TOraDataSet)

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)

IsPLSQL (inherited from TOraDataSet)

IsQuery (inherited from TOraDataSet)

KeyExclusive (inherited from TMemDataSet)

KeyFields (inherited from TOraDataSet)

KeySequence (inherited from TOraDataSet)© 2019 Devart

1264

options in a dataset.
Lets all data controls beaware of all the fields
belonging to updating table.
Used to request all recordsof the query from databaseserver when a dataset isbeing opened.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows ornot.
Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.
Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted orposted to a database.

1265

Oracle Data Access Components

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

LockMode (inherited from TOraDataSet)

MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

NonBlocking (inherited from TOraDataSet)

Options
OptionsDS (inherited from TOraDataSet)

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)

Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to define when to
perform the locking of an
editing record.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.
Used to specify the
behaviour ofTCustomSmartQuery object.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.

© 2019 DevartReference

Params (inherited from TOraDataSet)
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly (inherited from TCustomDADataSet)

RefreshEvent

RefreshMode (inherited from TOraDataSet)
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams (inherited from TOraDataSet)

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed (inherited from TOraDataSet)
SequenceMode (inherited from TOraDataSet)

Session (inherited from TOraDataSet)

SmartFetch (inherited from TOraDataSet)

SmartRefresh
SmartState© 2019 Devart

1266

Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.
Used to get or set the nameof the event that dataset will
be waiting for in
TCustomSmartQuery.Smart
Refresh mode.
Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert
or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.
Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be
executed.
The SmartFetch mode isused for fast navigation
through a huge amount ofrecords and to minimize
memory consumption.
Let TCustomSmartQuerycomponents work in a
concurrent environment.
Defines if
TCustomSmartQuery is in1267

Oracle Data Access Components

SQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)

SQLInsert (inherited from TCustomDADataSet)

SQLLock (inherited from TCustomDADataSet)

SQLRecCount (inherited from TCustomDADataSet)

SQLRefresh (inherited from TCustomDADataSet)

SQLType (inherited from TOraDataSet)

SQLUpdate (inherited from TCustomDADataSet)

StrictUpdate (inherited from TOraDataSet)

UniDirectional (inherited from TCustomDADataSet)

UpdateObject (inherited from TOraDataSet)

view mode.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of
the SQL statement being
processed by Oracle
database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used for TOraDataSet toraise the 'Update failed'exception when the numberof updated or deleted
records are not equal to 1.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which© 2019 DevartReference

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

1268

provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name

Description
Adds condition to the
WHERE clause of SELECT
AddWhere (inherited from TCustomDADataSet)
statement in the SQL
property.
Applies a range to the
ApplyRange (inherited from TMemDataSet)
dataset.
Overloaded. Writes
ApplyUpdates (inherited from TMemDataSet)
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
BreakExec (inherited from TCustomDADataSet)
statement on the server.
Removes any ranges
CancelRange (inherited from TMemDataSet)
currently in effect for adataset.
Clears all pending cachedupdates from cache andCancelUpdates (inherited from TMemDataSet)
restores dataset in its priorstate.
Clears the cached updates
CommitUpdates (inherited from TMemDataSet)buffer.
Used to obtain a stream forreading data from or writing
CreateBlobStream (inherited from TCustomDADataSet) data to a BLOB field,
specified by the Field
parameter.
Generates the stored
CreateProcCall (inherited from TOraDataSet)
procedure call.
Makes permanent changes
DeferredPost (inherited from TMemDataSet)
to the database server.
Removes WHERE clause
DeleteWhere (inherited from TCustomDADataSet)from the SQL property and© 2019 Devart

1269

Oracle Data Access Components

EditRangeEnd (inherited from TMemDataSet)

EditRangeStart (inherited from TMemDataSet)
ErrorOffset (inherited from TOraDataSet)
Execute (inherited from TCustomDADataSet)

Executing (inherited from TCustomDADataSet)

Fetching (inherited from TCustomDADataSet)

FetchingAll (inherited from TCustomDADataSet)

FindKey (inherited from TCustomDADataSet)
FindMacro (inherited from TCustomDADataSet)

FindNearest (inherited from TCustomDADataSet)

FindParam (inherited from TOraDataSet)

GetArray (inherited from TOraDataSet)

GetBlob (inherited from TMemDataSet)

assigns the BaseSQL
property.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Returns the parse error
offset.
Overloaded. Executes a
SQL statement on theserver.
Indicates whether SQL
statement is still being
executed.
Used to learn whether
TCustomDADataSet is still
fetching rows.
Used to learn whether
TCustomDADataSet isfetching all rows to the end.
Searches for a record whichcontains specified fieldvalues.
Description is not available
at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset thatmatches or is greater thanthe values specified in the
KeyValues parameter.
Determines whether aparameter with the specified
name exists in a dataset.
Retrieves a TOraArrayobject for a field when only
its name is known.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
© 2019 DevartReference

1270

Returns internal field types
defined in the MemData andaccompanying modules.
Returns a row and column of
GetErrorPos (inherited from TOraDataSet)parse error for a SQL
statement.
Returns a multireference
GetFieldObject (inherited from TCustomDADataSet)
shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) Retrieves the precision of anumber field.
Retrieves the scale of a
GetFieldScale (inherited from TCustomDADataSet)
number field.
Retrieves a TOraFile object
GetFile (inherited from TOraDataSet)
for a field with known name.
Retrieves a TOraInterval
GetInterval (inherited from TOraDataSet)
object for a field with known
name.
GetKeyFieldNames (inherited from
Provides a list of available
GetDataType (inherited from TCustomDADataSet)

TCustomDADataSet)

key field names.

GetKeyList (inherited from TOraDataSet)

Returns the list of tableprimary key fields.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraObject
object for a field with known
name.
Retrieves an ORDER BY
clause from a SQL
statement.
Retrieves a TOraRef object
for a field with known name.
Retrieve a TOraNestTable
object for a field with known
name.
Retrieves a
TOraTimeStamp object for afield with known name.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.

GetLob (inherited from TOraDataSet)
GetLobLocator (inherited from TOraDataSet)
GetObject (inherited from TOraDataSet)

GetOrderBy (inherited from TCustomDADataSet)
GetRef (inherited from TOraDataSet)
GetTable (inherited from TOraDataSet)

GetTimeStamp (inherited from TOraDataSet)

GotoCurrent (inherited from TCustomDADataSet)© 2019 Devart

1271

Oracle Data Access Components

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock (inherited from TCustomDADataSet)
MacroByName (inherited from TCustomDADataSet)
OpenNext (inherited from TOraDataSet)

ParamByName (inherited from TOraDataSet)

Prepare (inherited from TCustomDADataSet)
RefreshRecord (inherited from TCustomDADataSet)
RestoreSQL (inherited from TCustomDADataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveSQL (inherited from TCustomDADataSet)

SaveToXML (inherited from TMemDataSet)

SetOrderBy (inherited from TCustomDADataSet)
SetRange (inherited from TMemDataSet)

Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Opens next cursor or rowset
in the statement.
Sets or uses parameter
information for a specificparameter based on its
name.
Allocates, opens, andparses cursor for a query.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
Sets the starting and ending
values of a range, andapplies it.
© 2019 DevartReference

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

SQLSaved (inherited from TCustomDADataSet)
UnLock (inherited from TCustomDADataSet)
UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

View

1272

Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.
Allows viewing all fields ofthe updating table.

EventsName
AfterExecute (inherited from TCustomDADataSet)
AfterFetch (inherited from TCustomDADataSet)

AfterSmartRefresh
AfterUpdateExecute (inherited from© 2019 Devart

Description
Occurs after a component
has executed a query todatabase.
Occurs after dataset finishes
fetching data from server.
Occurs after the Smart
Refresh procedure was
performed by
TCustomOraQuery.
Occurs after executing

1273

Oracle Data Access Components

TCustomDADataSet)
BeforeFetch (inherited from TCustomDADataSet)
BeforeUpdateExecute (inherited fromTCustomDADataSet)
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)

RefreshFields© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

insert, delete, update, lockand refresh operations.
Occurs before dataset isgoing to fetch block ofrecords from the server.
Occurs before executing
insert, delete, update, lock,and refresh operations.
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Occures before anapplication posts changes
for the current record to the
database or cache.
Provide Feedback

5.28.1.1.2 Properties

Properties of the TCustomSmartQuery class.
For a complete list of the TCustomSmartQuery class members, see theTCustomSmartQuery Members topic.

PublicName
BaseSQL (inherited from TCustomDADataSet)

CachedUpdates (inherited from TMemDataSet)

ChangeNotification (inherited from TOraDataSet)

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.

© 2019 DevartReference

CheckMode (inherited from TOraDataSet)

CommandTimeout (inherited from TOraDataSet)

Conditions (inherited from TCustomDADataSet)
Connection (inherited from TCustomDADataSet)

Cursor (inherited from TOraDataSet)
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)

DependEvents

DetailFields (inherited from TCustomDADataSet)

Disconnected (inherited from TCustomDADataSet)

DMLRefresh (inherited from TOraDataSet)

Encryption (inherited from TOraDataSet)
ExpandFetchAll (inherited from TOraDataSet)© 2019 Devart

1274

Used to define the checkmode before editing arecord.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
Used to get or set thenames of the events thatdataset will depend on in
TCustomSmartQuery.Smart
Refresh mode.
Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption
options in a dataset.
Lets all data controls beaware of all the fields
belonging to updating table.
Used to request all recordsof the query from database

1275

Oracle Data Access Components

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)

IsPLSQL (inherited from TOraDataSet)

IsQuery (inherited from TOraDataSet)

KeyExclusive (inherited from TMemDataSet)

KeyFields (inherited from TOraDataSet)

KeySequence (inherited from TOraDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

server when a dataset isbeing opened.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows ornot.
Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.
Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted orposted to a database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on database© 2019 DevartReference

LockMode (inherited from TOraDataSet)

MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

NonBlocking (inherited from TOraDataSet)

Options
OptionsDS (inherited from TOraDataSet)

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)
Params (inherited from TOraDataSet)
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)© 2019 Devart

1276

server.
Used to define when to
perform the locking of an
editing record.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.
Used to specify the
behaviour ofTCustomSmartQuery object.
Used to specify the
behaviour of
TOraDataSetObject.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.
Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.

1277

Oracle Data Access Components

ReadOnly (inherited from TCustomDADataSet)

RefreshEvent

RefreshMode (inherited from TOraDataSet)
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams (inherited from TOraDataSet)

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed (inherited from TOraDataSet)
SequenceMode (inherited from TOraDataSet)

Session (inherited from TOraDataSet)

SmartFetch (inherited from TOraDataSet)

SmartRefresh

SmartStateSQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)

Used to prevent users fromupdating, inserting, ordeleting data in the dataset.
Used to get or set the nameof the event that dataset will
be waiting for in
TCustomSmartQuery.Smart
Refresh mode.
Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert
or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.
Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be
executed.
The SmartFetch mode isused for fast navigation
through a huge amount ofrecords and to minimize
memory consumption.
Let TCustomSmartQuerycomponents work in a
concurrent environment.
Defines if
TCustomSmartQuery is inview mode.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
© 2019 DevartReference

SQLInsert (inherited from TCustomDADataSet)

SQLLock (inherited from TCustomDADataSet)

SQLRecCount (inherited from TCustomDADataSet)

SQLRefresh (inherited from TCustomDADataSet)

SQLType (inherited from TOraDataSet)

SQLUpdate (inherited from TCustomDADataSet)

StrictUpdate (inherited from TOraDataSet)

UniDirectional (inherited from TCustomDADataSet)

UpdateObject (inherited from TOraDataSet)

UpdateRecordTypes (inherited from TMemDataSet)© 2019 Devart

1278

when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of
the SQL statement being
processed by Oracle
database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used for TOraDataSet toraise the 'Update failed'exception when the numberof updated or deleted
records are not equal to 1.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which
provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.

1279

Oracle Data Access Components

UpdatesPending (inherited from TMemDataSet)

Used to check the status of
the cached updates buffer.

See Also
TCustomSmartQuery Class
TCustomSmartQuery Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1.2.1 DependEvents Property

Used to get or set the names of the events that dataset will depend on in SmartRefresh
mode.

Class
TCustomSmartQuery

Syntaxproperty DependEvents: string;

Remarks
Use DependEvents property to get or set the names of the events that dataset will depend on
in SmartRefresh mode. In the other words, when some TCustomsSmartQuery object
receives RefreshEvent, it causes an update of every dataset that has received event name in
DependEvents list, i.e. all depending datasets are updated.

See Also
SmartRefresh
RefreshEvent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1.2.2 Expand Property

Lets all data controls be aware of all the fields belonging to updating table.

Class
TCustomSmartQuery© 2019 DevartReference

1280

Syntaxproperty Expand: boolean default False;

Remarks
Set Expand property to True to let all data controls be aware of all the fields belonging to
updating table an not only those requested in the SELECT clause. Those fields which are notrequested explicitly will show no data until the dataset enters edit state for a particular record.
At that time all fields for that record will be populated from the database.
Preferred design for an application may include DBGrid component which hides unwanted
fields and other data components which reveal those fields only for the selected record. Thisway large tables with lots of fields are edited by the user only on demand during the course ofa session. Thus network traffic may be lessened and memory usage lowered for transfers of
the requested fields only.
If Expand property is True you can point in a SELECT statement the fields that will be
displayed only in the grid. The rest of the fields from the updating table will be fetched before
edit.
Note: This property is mutually exclusive with CachedUpdates property. Thus setting Expand
to True leaves CachedUpdates property set to False. Also do not try to read blob fields when
they are not expanded, this will cause an exception.
The default value is False.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1.2.3 Options Property

Used to specify the behaviour of TCustomSmartQuery object.

Class
TCustomSmartQuery

Syntaxproperty Options: TSmartQueryOptions;Remarks
Set properties of Options to specify the behaviour of a TCustomSmartQuery object.

See Also© 2019 Devart

1281

Oracle Data Access Components

TCustomDADataSet.Options
TOraDataSet.Options© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1.2.4 RefreshEvent Property

Used to get or set the name of the event that dataset will be waiting for in SmartRefresh
mode.

Class
TCustomSmartQuery

Syntaxproperty RefreshEvent: string;

Remarks
Use RefreshEvent property to get or set the name of the event that dataset will be waiting forin the SmartRefresh mode. When this event occures, dataset performs the Refresh
procedure.

See Also
SmartRefresh
DependEvents© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1.2.5 SmartRefresh Property

Let TCustomSmartQuery components work in a concurrent environment.

Class
TCustomSmartQuery

Syntaxproperty SmartRefresh: boolean default False;

Remarks© 2019 DevartReference

1282

Set SmartRefresh property to True to let TCustomSmartQuery components work in a
concurrent environment. Applications which instantiate TCustomSmartQuery descendants
may notify each other about their activity on a shared database and be updated each time thedatabase gets modified.
Setting SmartRefresh property to False indicates that concurrent sessions will refresh theirdatasets on their own.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1.2.6 SmartState Property

Defines if TCustomSmartQuery is in view mode.

Class
TCustomSmartQuery

Syntaxproperty SmartState: TSmartState;

Remarks
Check SmartState property to learn whether TCustomSmartQuery is in view mode.
TCustomSmartQuery is in view mode (SmartState is dsView) after calling View method.

See Also
View© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1.3 Methods

Methods of the TCustomSmartQuery class.
For a complete list of the TCustomSmartQuery class members, see theTCustomSmartQuery Members topic.

PublicName

Description

AddWhere (inherited from TCustomDADataSet)

Adds condition to the
WHERE clause of SELECT© 2019 Devart

1283

Oracle Data Access Components

statement in the SQL
property.
Applies a range to the
ApplyRange (inherited from TMemDataSet)
dataset.
Overloaded. Writes
ApplyUpdates (inherited from TMemDataSet)
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
BreakExec (inherited from TCustomDADataSet)
statement on the server.
Removes any ranges
CancelRange (inherited from TMemDataSet)
currently in effect for adataset.
Clears all pending cachedupdates from cache andCancelUpdates (inherited from TMemDataSet)
restores dataset in its priorstate.
Clears the cached updates
CommitUpdates (inherited from TMemDataSet)buffer.
Used to obtain a stream forreading data from or writing
CreateBlobStream (inherited from TCustomDADataSet) data to a BLOB field,
specified by the Field
parameter.
Generates the stored
CreateProcCall (inherited from TOraDataSet)
procedure call.
Makes permanent changes
DeferredPost (inherited from TMemDataSet)
to the database server.
Removes WHERE clausefrom the SQL property and
DeleteWhere (inherited from TCustomDADataSet)
assigns the BaseSQL
property.
Enables changing the
EditRangeEnd (inherited from TMemDataSet)
ending value for an existing
range.
Enables changing the
EditRangeStart (inherited from TMemDataSet)
starting value for an existing
range.
Returns the parse error
ErrorOffset (inherited from TOraDataSet)
offset.
Overloaded. Executes a
Execute (inherited from TCustomDADataSet)
SQL statement on theserver.
Executing (inherited from TCustomDADataSet)

Indicates whether SQL
statement is still being© 2019 DevartReference

1284

executed.
Used to learn whether
Fetching (inherited from TCustomDADataSet)
TCustomDADataSet is still
fetching rows.
Used to learn whether
FetchingAll (inherited from TCustomDADataSet)
TCustomDADataSet isfetching all rows to the end.
Searches for a record which
FindKey (inherited from TCustomDADataSet)
contains specified fieldvalues.
Description is not available
FindMacro (inherited from TCustomDADataSet)at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset that
FindNearest (inherited from TCustomDADataSet)
matches or is greater thanthe values specified in the
KeyValues parameter.
Determines whether a
FindParam (inherited from TOraDataSet)
parameter with the specified
name exists in a dataset.
Retrieves a TOraArray
GetArray (inherited from TOraDataSet)
object for a field when only
its name is known.
Overloaded. Retrieves
TBlob object for a field or
GetBlob (inherited from TMemDataSet)
current record when only its
name or the field itself isknown.
Returns internal field types
GetDataType (inherited from TCustomDADataSet)
defined in the MemData andaccompanying modules.
Returns a row and column of
GetErrorPos (inherited from TOraDataSet)parse error for a SQL
statement.
Returns a multireference
GetFieldObject (inherited from TCustomDADataSet)
shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) Retrieves the precision of anumber field.
Retrieves the scale of a
GetFieldScale (inherited from TCustomDADataSet)
number field.
Retrieves a TOraFile object
GetFile (inherited from TOraDataSet)
for a field with known name.
GetInterval (inherited from TOraDataSet)
Retrieves a TOraInterval© 2019 Devart

1285

Oracle Data Access Components

object for a field with known
name.
GetKeyFieldNames (inherited fromTCustomDADataSet)
GetKeyList (inherited from TOraDataSet)
GetLob (inherited from TOraDataSet)
GetLobLocator (inherited from TOraDataSet)
GetObject (inherited from TOraDataSet)

GetOrderBy (inherited from TCustomDADataSet)
GetRef (inherited from TOraDataSet)
GetTable (inherited from TOraDataSet)

GetTimeStamp (inherited from TOraDataSet)

GotoCurrent (inherited from TCustomDADataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock (inherited from TCustomDADataSet)
MacroByName (inherited from TCustomDADataSet)
OpenNext (inherited from TOraDataSet)

Provides a list of available
key field names.
Returns the list of tableprimary key fields.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraObject
object for a field with known
name.
Retrieves an ORDER BY
clause from a SQL
statement.
Retrieves a TOraRef object
for a field with known name.
Retrieve a TOraNestTable
object for a field with known
name.
Retrieves a
TOraTimeStamp object for afield with known name.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Opens next cursor or rowset
in the statement.

© 2019 DevartReference

ParamByName (inherited from TOraDataSet)

Prepare (inherited from TCustomDADataSet)
RefreshRecord (inherited from TCustomDADataSet)
RestoreSQL (inherited from TCustomDADataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveSQL (inherited from TCustomDADataSet)

SaveToXML (inherited from TMemDataSet)

SetOrderBy (inherited from TCustomDADataSet)
SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

SQLSaved (inherited from TCustomDADataSet)
UnLock (inherited from TCustomDADataSet)© 2019 Devart

1286

Sets or uses parameter
information for a specificparameter based on its
name.
Allocates, opens, andparses cursor for a query.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.

1287

Oracle Data Access Components

UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

View

Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.
Allows viewing all fields ofthe updating table.

See Also
TCustomSmartQuery Class
TCustomSmartQuery Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1.3.1 View Method

Allows viewing all fields of the updating table.

Class
TCustomSmartQuery

Syntax
procedure View;

Remarks
Useful when Expand is True. Lets view all fields of the updating table. Call Cancel method toreturn dataset to dsBrowse mode. To indicate view mode check SmartState. After calling
View method SmartState is dsView.

See Also
SmartState© 1997-2019

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1288

Devart. All Rights
Reserved.
5.28.1.1.4 Events

Events of the TCustomSmartQuery class.
For a complete list of the TCustomSmartQuery class members, see theTCustomSmartQuery Members topic.

PublicName
AfterExecute (inherited from TCustomDADataSet)
AfterFetch (inherited from TCustomDADataSet)

AfterSmartRefresh
AfterUpdateExecute (inherited fromTCustomDADataSet)
BeforeFetch (inherited from TCustomDADataSet)
BeforeUpdateExecute (inherited fromTCustomDADataSet)
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)

RefreshFields

See Also
TCustomSmartQuery Class© 2019 Devart

Description
Occurs after a component
has executed a query todatabase.
Occurs after dataset finishes
fetching data from server.
Occurs after the Smart
Refresh procedure was
performed by
TCustomOraQuery.
Occurs after executing
insert, delete, update, lockand refresh operations.
Occurs before dataset isgoing to fetch block ofrecords from the server.
Occurs before executing
insert, delete, update, lock,and refresh operations.
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Occures before anapplication posts changes
for the current record to the
database or cache.

1289

Oracle Data Access Components

TCustomSmartQuery Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1.4.1 AfterSmartRefresh Event

Occurs after the Smart Refresh procedure was performed by TCustomOraQuery.

Class
TCustomSmartQuery

Syntaxproperty AfterSmartRefresh: TDataSetNotifyEvent;Remarks
Occurs every time after TCustomOraQuery performes Smart Refresh procedure.

See Also
SmartRefresh© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.1.4.2 RefreshFields Event

Occures before an application posts changes for the current record to the database or cache.

Class
TCustomSmartQuery

Syntaxproperty RefreshFields: TDataSetNotifyEvent;Remarks
Occurs before an application posts changes for the current record to the database or cache.
When Expand is True, write RefreshFields event handler to assign a value to the nonupdating
fields.

Example© 2019 DevartReference

1290

procedure quEmpRefreshFields(DataSet: TDataSet);
begin
DataSet.FieldByName('DNAME').AsString:=
quDept.FieldByName('DNAME').AsString;end;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.2 TOraTable Class

A component for retrieving and updating data in a single table without writing SQL statements.
For a list of all members of this type, see TOraTable members.

Unit
OraSmart

SyntaxTOraTable = class(TCustomSmartQuery);Remarks
The TOraTable component allows retrieving and updating data in a single table without writing
SQL statements. Use TOraTable to access data in a table . Use the TableName property to
specify table name. TOraTable uses the KeyFields property to build SQL statements for
updating table data. KeyFields is a string containing a semicolon-delimited list of the fieldnames. If KeyFields is not defined before opening, TOraTable uses primary or unique key or
ROWID pseudo field.

Inheritance Hierarchy
TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQuery
TCustomSmartQuery
TOraTable

See Also
TSmartQuery
Updating Data with ODAC Dataset Components
Master/Detail Relationships© 2019 Devart

1291

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.2.1 Members

TOraTable class overview.

Properties
Name
BaseSQL (inherited from TCustomDADataSet)

CachedUpdates (inherited from TMemDataSet)

ChangeNotification (inherited from TOraDataSet)

CheckMode (inherited from TOraDataSet)

CommandTimeout (inherited from TOraDataSet)

Conditions (inherited from TCustomDADataSet)
Connection (inherited from TCustomDADataSet)

Cursor (inherited from TOraDataSet)
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)

DependEvents (inherited from TCustomSmartQuery)

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.
Used to define the checkmode before editing arecord.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
Used to get or set thenames of the events thatdataset will depend on in
TCustomSmartQuery.Smart© 2019 DevartReference

DetailFields (inherited from TCustomDADataSet)

Disconnected (inherited from TCustomDADataSet)

DMLRefresh (inherited from TOraDataSet)

Encryption (inherited from TOraDataSet)
Expand (inherited from TCustomSmartQuery)

FetchAll

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)

IsPLSQL (inherited from TOraDataSet)

IsQuery (inherited from TOraDataSet)© 2019 Devart

1292

Refresh mode.
Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption
options in a dataset.
Lets all data controls beaware of all the fields
belonging to updating table.
Defines whether to request
all records of the query fromdatabase server when thedataset is being opened.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows or
not.

1293

Oracle Data Access Components

KeyExclusive (inherited from TMemDataSet)

KeyFields (inherited from TOraDataSet)

KeySequence (inherited from TOraDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

LockMode
MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

NonBlocking (inherited from TOraDataSet)

Specifies the upper andlower boundaries for arange.
Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.
Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted orposted to a database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to specify what kind oflock will be performed when
editing a record.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.

© 2019 DevartReference

Options (inherited from TCustomSmartQuery)

OptionsDS (inherited from TOraDataSet)
OrderFields

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)
Params (inherited from TOraDataSet)
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly (inherited from TCustomDADataSet)

RefreshEvent (inherited from TCustomSmartQuery)

RefreshMode (inherited from TOraDataSet)
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams (inherited from TOraDataSet)

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed (inherited from TOraDataSet)© 2019 Devart

1294

Used to specify the
behaviour ofTCustomSmartQuery object.
Used to specify the
behaviour of
TOraDataSetObject.
Used to build ORDER BY
clause of SQL statements.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.
Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.
Used to get or set the nameof the event that dataset will
be waiting for in
TCustomSmartQuery.Smart
Refresh mode.
Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert
or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.

1295

Oracle Data Access Components

SequenceMode (inherited from TOraDataSet)

Session (inherited from TOraDataSet)

SmartFetch (inherited from TOraDataSet)

SmartRefresh (inherited from TCustomSmartQuery)

SmartState (inherited from TCustomSmartQuery)

SQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)

SQLInsert (inherited from TCustomDADataSet)

SQLLock (inherited from TCustomDADataSet)

SQLRecCount (inherited from TCustomDADataSet)

SQLRefresh (inherited from TCustomDADataSet)

SQLType (inherited from TOraDataSet)

Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be
executed.
The SmartFetch mode isused for fast navigation
through a huge amount ofrecords and to minimize
memory consumption.
Let TCustomSmartQuerycomponents work in a
concurrent environment.
Defines if
TCustomSmartQuery is inview mode.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of
the SQL statement being
processed by Oracle© 2019 DevartReference

SQLUpdate (inherited from TCustomDADataSet)

StrictUpdate (inherited from TOraDataSet)

TableName

UniDirectional (inherited from TCustomDADataSet)

UpdateObject (inherited from TOraDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

1296

database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used for TOraDataSet toraise the 'Update failed'exception when the numberof updated or deleted
records are not equal to 1.
Used to specify the name ofthe database table thiscomponent encapsulates.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which
provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
AddWhere (inherited from TCustomDADataSet)

ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)
BreakExec (inherited from TCustomDADataSet)© 2019 Devart

Description
Adds condition to the
WHERE clause of SELECT
statement in the SQL
property.
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
statement on the server.

1297

Oracle Data Access Components

Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andCancelUpdates (inherited from TMemDataSet)
restores dataset in its priorstate.
Clears the cached updates
CommitUpdates (inherited from TMemDataSet)buffer.
Used to obtain a stream forreading data from or writing
CreateBlobStream (inherited from TCustomDADataSet) data to a BLOB field,
specified by the Field
parameter.
Generates the stored
CreateProcCall (inherited from TOraDataSet)
procedure call.
Makes permanent changes
DeferredPost (inherited from TMemDataSet)
to the database server.
Removes WHERE clausefrom the SQL property and
DeleteWhere (inherited from TCustomDADataSet)
assigns the BaseSQL
property.
Enables changing the
EditRangeEnd (inherited from TMemDataSet)
ending value for an existing
range.
Enables changing the
EditRangeStart (inherited from TMemDataSet)
starting value for an existing
range.
Truncates the current table
EmptyTable
content on the server.
Returns the parse error
ErrorOffset (inherited from TOraDataSet)
offset.
Overloaded. Executes a
Execute (inherited from TCustomDADataSet)
SQL statement on theserver.
Indicates whether SQL
Executing (inherited from TCustomDADataSet)
statement is still being
executed.
Used to learn whether
Fetching (inherited from TCustomDADataSet)
TCustomDADataSet is still
fetching rows.
Used to learn whether
FetchingAll (inherited from TCustomDADataSet)
TCustomDADataSet isfetching all rows to the end.
CancelRange (inherited from TMemDataSet)© 2019 DevartReference

1298

Searches for a record whichcontains specified fieldvalues.
Description is not available
FindMacro (inherited from TCustomDADataSet)at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset that
FindNearest (inherited from TCustomDADataSet)
matches or is greater thanthe values specified in the
KeyValues parameter.
Determines whether a
FindParam (inherited from TOraDataSet)
parameter with the specified
name exists in a dataset.
Retrieves a TOraArray
GetArray (inherited from TOraDataSet)
object for a field when only
its name is known.
Overloaded. Retrieves
TBlob object for a field or
GetBlob (inherited from TMemDataSet)
current record when only its
name or the field itself isknown.
Returns internal field types
GetDataType (inherited from TCustomDADataSet)
defined in the MemData andaccompanying modules.
Returns a row and column of
GetErrorPos (inherited from TOraDataSet)parse error for a SQL
statement.
Returns a multireference
GetFieldObject (inherited from TCustomDADataSet)
shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) Retrieves the precision of anumber field.
Retrieves the scale of a
GetFieldScale (inherited from TCustomDADataSet)
number field.
Retrieves a TOraFile object
GetFile (inherited from TOraDataSet)
for a field with known name.
Retrieves a TOraInterval
GetInterval (inherited from TOraDataSet)
object for a field with known
name.
GetKeyFieldNames (inherited from
Provides a list of available
FindKey (inherited from TCustomDADataSet)

TCustomDADataSet)

key field names.

GetKeyList (inherited from TOraDataSet)

Returns the list of tableprimary key fields.

© 2019 Devart1299

Oracle Data Access Components

GetLob (inherited from TOraDataSet)
GetLobLocator (inherited from TOraDataSet)
GetObject (inherited from TOraDataSet)

GetOrderBy (inherited from TCustomDADataSet)
GetRef (inherited from TOraDataSet)
GetTable (inherited from TOraDataSet)

GetTimeStamp (inherited from TOraDataSet)

GotoCurrent (inherited from TCustomDADataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock (inherited from TCustomDADataSet)
MacroByName (inherited from TCustomDADataSet)
OpenNext (inherited from TOraDataSet)

ParamByName (inherited from TOraDataSet)

Prepare (inherited from TCustomDADataSet)
PrepareSQL

Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraObject
object for a field with known
name.
Retrieves an ORDER BY
clause from a SQL
statement.
Retrieves a TOraRef object
for a field with known name.
Retrieve a TOraNestTable
object for a field with known
name.
Retrieves a
TOraTimeStamp object for afield with known name.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Opens next cursor or rowset
in the statement.
Sets or uses parameter
information for a specificparameter based on its
name.
Allocates, opens, andparses cursor for a query.
Determines KeyFields andbuilds query of TOraTable.
© 2019 DevartReference

RefreshRecord (inherited from TCustomDADataSet)
RestoreSQL (inherited from TCustomDADataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveSQL (inherited from TCustomDADataSet)

SaveToXML (inherited from TMemDataSet)

SetOrderBy (inherited from TCustomDADataSet)
SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

SQLSaved (inherited from TCustomDADataSet)
UnLock (inherited from TCustomDADataSet)
UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)© 2019 Devart

1300

Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the1301

Oracle Data Access Components

UpdateStatus (inherited from TMemDataSet)

View (inherited from TCustomSmartQuery)

ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.
Allows viewing all fields ofthe updating table.

EventsName
AfterExecute (inherited from TCustomDADataSet)
AfterFetch (inherited from TCustomDADataSet)
AfterSmartRefresh (inherited fromTCustomSmartQuery)
AfterUpdateExecute (inherited fromTCustomDADataSet)
BeforeFetch (inherited from TCustomDADataSet)
BeforeUpdateExecute (inherited fromTCustomDADataSet)
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)

RefreshFields (inherited from TCustomSmartQuery)© 1997-2019

Request Support

DAC Forum

Description
Occurs after a component
has executed a query todatabase.
Occurs after dataset finishes
fetching data from server.
Occurs after the Smart
Refresh procedure was
performed by
TCustomOraQuery.
Occurs after executing
insert, delete, update, lockand refresh operations.
Occurs before dataset isgoing to fetch block ofrecords from the server.
Occurs before executing
insert, delete, update, lock,and refresh operations.
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Occures before anapplication posts changes
for the current record to the
database or cache.
Provide Feedback© 2019 DevartReference

1302

Devart. All Rights
Reserved.
5.28.1.2.2 Properties

Properties of the TOraTable class.
For a complete list of the TOraTable class members, see the TOraTable Members topic.

PublicName
BaseSQL (inherited from TCustomDADataSet)

CachedUpdates (inherited from TMemDataSet)

ChangeNotification (inherited from TOraDataSet)

CheckMode (inherited from TOraDataSet)

CommandTimeout (inherited from TOraDataSet)

Conditions (inherited from TCustomDADataSet)
Connection (inherited from TCustomDADataSet)

Cursor (inherited from TOraDataSet)
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)
DependEvents (inherited from TCustomSmartQuery)© 2019 Devart

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.
Used to define the checkmode before editing arecord.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
Used to get or set thenames of the events thatdataset will depend on in

1303

Oracle Data Access Components

DetailFields (inherited from TCustomDADataSet)

Disconnected (inherited from TCustomDADataSet)

DMLRefresh (inherited from TOraDataSet)

Encryption (inherited from TOraDataSet)
Expand (inherited from TCustomSmartQuery)

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)

IsPLSQL (inherited from TOraDataSet)

IsQuery (inherited from TOraDataSet)

KeyExclusive (inherited from TMemDataSet)

TCustomSmartQuery.Smart
Refresh mode.
Used to specify the fields
that correspond to theforeign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption
options in a dataset.
Lets all data controls beaware of all the fields
belonging to updating table.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows ornot.
Specifies the upper andlower boundaries for arange.

© 2019 DevartReference

KeyFields (inherited from TOraDataSet)

KeySequence (inherited from TOraDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

NonBlocking (inherited from TOraDataSet)

Options (inherited from TCustomSmartQuery)

OptionsDS (inherited from TOraDataSet)© 2019 Devart

1304

Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.
Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted orposted to a database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.
Used to specify the
behaviour ofTCustomSmartQuery object.
Used to specify the
behaviour of
TOraDataSetObject.

1305

Oracle Data Access Components

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)
Params (inherited from TOraDataSet)
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly (inherited from TCustomDADataSet)

RefreshEvent (inherited from TCustomSmartQuery)

RefreshMode (inherited from TOraDataSet)
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams (inherited from TOraDataSet)

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed (inherited from TOraDataSet)
SequenceMode (inherited from TOraDataSet)

Session (inherited from TOraDataSet)
SmartFetch (inherited from TOraDataSet)

Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.
Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.
Used to get or set the nameof the event that dataset will
be waiting for in
TCustomSmartQuery.Smart
Refresh mode.
Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert
or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.
Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be
executed.
The SmartFetch mode isused for fast navigation© 2019 DevartReference

SmartRefresh (inherited from TCustomSmartQuery)

SmartState (inherited from TCustomSmartQuery)

SQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)

SQLInsert (inherited from TCustomDADataSet)

SQLLock (inherited from TCustomDADataSet)

SQLRecCount (inherited from TCustomDADataSet)

SQLRefresh (inherited from TCustomDADataSet)

SQLType (inherited from TOraDataSet)

SQLUpdate (inherited from TCustomDADataSet)

StrictUpdate (inherited from TOraDataSet)© 2019 Devart

1306

through a huge amount ofrecords and to minimize
memory consumption.
Let TCustomSmartQuerycomponents work in a
concurrent environment.
Defines if
TCustomSmartQuery is inview mode.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of
the SQL statement being
processed by Oracle
database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
Used for TOraDataSet toraise the 'Update failed'exception when the number

1307

Oracle Data Access Components

UniDirectional (inherited from TCustomDADataSet)

UpdateObject (inherited from TOraDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)of updated or deleted
records are not equal to 1.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which
provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Published
Name

Description
Defines whether to request
all records of the query fromdatabase server when thedataset is being opened.
Used to specify what kind oflock will be performed when
editing a record.
Used to build ORDER BY
clause of SQL statements.
Used to specify the name ofthe database table thiscomponent encapsulates.

FetchAll

LockMode
OrderFields
TableName

See Also
TOraTable Class
TOraTable Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1308

5.28.1.2.2.1 FetchAll Property

Defines whether to request all records of the query from database server when the dataset isbeing opened.

Class
TOraTable

Syntaxproperty FetchAll: boolean;

Remarks
When set to True, all records of the query are requested from database server when thedataset is being opened. When set to False, records are retrieved when a data-aware
component or a program requests it. If a query can return a lot of records, set this property to
False if initial response time is important.
When the FetchAll property is False, the first call to TMemDataSet.Locate and
TMemDataSet.LocateEx methods may take a lot of time to retrieve additional records to theclient side.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.2.2.2 LockMode Property

Used to specify what kind of lock will be performed when editing a record.

Class
TOraTable

Syntaxproperty LockMode: TLockMode default lmLockImmediate;

Remarks
Use the LockMode property to define what kind of lock will be performed when editing arecord. Locking a record is useful in creating multi-user applications. It prevents modificationof a record by several users at the same time.
Locking is performed by the RefreshRecord method.
The default value is lmNone.
To set pessimistic locking use LockMode = lmLockImmediate, TOraDataSet.CheckMode =© 2019 Devart1309

Oracle Data Access Components

cmException. To set optimistic locking use LockMode = lmLockDelayed, CheckMode =cmException.

See Also
TOraStoredProc.LockMode
TOraQuery.LockMode© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.2.2.3 OrderFields Property

Used to build ORDER BY clause of SQL statements.

Class
TOraTable

Syntaxproperty OrderFields: string;

Remarks
TOraTable uses the OrderFields property to build ORDER BY clause of SQL statements. To
set several field names to this property separate them with commas.
TOraTable is reopened when OrderFields is being changed.

See Also
TOraTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.2.2.4 TableName Property

Used to specify the name of the database table this component encapsulates.

Class
TOraTable

Syntaxproperty TableName: string;© 2019 DevartReference

1310

Remarks
Use the TableName property to specify the name of the database table this component
encapsulates. If TCustomDADataSet.Connection is assigned If Session is set at design
time,select a valid table name from the TableName drop-down list in Object Inspector.

See Also
TOraTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.2.3 Methods

Methods of the TOraTable class.
For a complete list of the TOraTable class members, see the TOraTable Members topic.

PublicName

Description
Adds condition to the
WHERE clause of SELECT
AddWhere (inherited from TCustomDADataSet)
statement in the SQL
property.
Applies a range to the
ApplyRange (inherited from TMemDataSet)
dataset.
Overloaded. Writes
ApplyUpdates (inherited from TMemDataSet)
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
BreakExec (inherited from TCustomDADataSet)
statement on the server.
Removes any ranges
CancelRange (inherited from TMemDataSet)
currently in effect for adataset.
Clears all pending cachedupdates from cache andCancelUpdates (inherited from TMemDataSet)
restores dataset in its priorstate.
Clears the cached updates
CommitUpdates (inherited from TMemDataSet)buffer.
Used to obtain a stream for
CreateBlobStream (inherited from TCustomDADataSet) reading data from or writing
data to a BLOB field,
specified by the Field© 2019 Devart

1311

Oracle Data Access Components

CreateProcCall (inherited from TOraDataSet)
DeferredPost (inherited from TMemDataSet)

DeleteWhere (inherited from TCustomDADataSet)

EditRangeEnd (inherited from TMemDataSet)

EditRangeStart (inherited from TMemDataSet)
EmptyTable
ErrorOffset (inherited from TOraDataSet)
Execute (inherited from TCustomDADataSet)

Executing (inherited from TCustomDADataSet)

Fetching (inherited from TCustomDADataSet)

FetchingAll (inherited from TCustomDADataSet)

FindKey (inherited from TCustomDADataSet)
FindMacro (inherited from TCustomDADataSet)

FindNearest (inherited from TCustomDADataSet)

FindParam (inherited from TOraDataSet)

parameter.
Generates the stored
procedure call.
Makes permanent changes
to the database server.
Removes WHERE clausefrom the SQL property andassigns the BaseSQL
property.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Truncates the current table
content on the server.
Returns the parse error
offset.
Overloaded. Executes a
SQL statement on theserver.
Indicates whether SQL
statement is still being
executed.
Used to learn whether
TCustomDADataSet is still
fetching rows.
Used to learn whether
TCustomDADataSet isfetching all rows to the end.
Searches for a record whichcontains specified fieldvalues.
Description is not available
at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset thatmatches or is greater thanthe values specified in the
KeyValues parameter.
Determines whether aparameter with the specified© 2019 DevartReference1312

name exists in a dataset.
Retrieves a TOraArray
GetArray (inherited from TOraDataSet)
object for a field when only
its name is known.
Overloaded. Retrieves
TBlob object for a field or
GetBlob (inherited from TMemDataSet)
current record when only its
name or the field itself isknown.
Returns internal field types
GetDataType (inherited from TCustomDADataSet)
defined in the MemData andaccompanying modules.
Returns a row and column of
GetErrorPos (inherited from TOraDataSet)parse error for a SQL
statement.
Returns a multireference
GetFieldObject (inherited from TCustomDADataSet)
shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) Retrieves the precision of anumber field.
Retrieves the scale of a
GetFieldScale (inherited from TCustomDADataSet)
number field.
Retrieves a TOraFile object
GetFile (inherited from TOraDataSet)
for a field with known name.
Retrieves a TOraInterval
GetInterval (inherited from TOraDataSet)
object for a field with known
name.
GetKeyFieldNames (inherited from
Provides a list of available
TCustomDADataSet)

key field names.

GetKeyList (inherited from TOraDataSet)

Returns the list of tableprimary key fields.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraObject
object for a field with known
name.
Retrieves an ORDER BY
clause from a SQL
statement.
Retrieves a TOraRef object
for a field with known name.
Retrieve a TOraNestTable

GetLob (inherited from TOraDataSet)
GetLobLocator (inherited from TOraDataSet)
GetObject (inherited from TOraDataSet)

GetOrderBy (inherited from TCustomDADataSet)
GetRef (inherited from TOraDataSet)
GetTable (inherited from TOraDataSet)© 2019 Devart

1313

Oracle Data Access Components

GetTimeStamp (inherited from TOraDataSet)

GotoCurrent (inherited from TCustomDADataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock (inherited from TCustomDADataSet)
MacroByName (inherited from TCustomDADataSet)
OpenNext (inherited from TOraDataSet)

ParamByName (inherited from TOraDataSet)

Prepare (inherited from TCustomDADataSet)
PrepareSQL
RefreshRecord (inherited from TCustomDADataSet)
RestoreSQL (inherited from TCustomDADataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

object for a field with known
name.
Retrieves a
TOraTimeStamp object for afield with known name.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Opens next cursor or rowset
in the statement.
Sets or uses parameter
information for a specificparameter based on its
name.
Allocates, opens, andparses cursor for a query.
Determines KeyFields andbuilds query of TOraTable.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.

© 2019 DevartReference

SaveSQL (inherited from TCustomDADataSet)

SaveToXML (inherited from TMemDataSet)

SetOrderBy (inherited from TCustomDADataSet)
SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

SQLSaved (inherited from TCustomDADataSet)
UnLock (inherited from TCustomDADataSet)
UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

View (inherited from TCustomSmartQuery)

See Also© 2019 Devart

1314

Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.
Allows viewing all fields ofthe updating table.

1315

Oracle Data Access Components

TOraTable Class
TOraTable Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.2.3.1 EmptyTable Method

Truncates the current table content on the server.

Class
TOraTable

Syntax
procedure EmptyTable;

Remarks
Call the EmptyTable method to truncate the current table content on the server.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.2.3.2 PrepareSQL Method

Determines KeyFields and builds query of TOraTable.

Class
TOraTable

Syntax
procedure PrepareSQL;

Remarks
Call the PrepareSQL method to determine KeyFields and build query of TOraTable.
PrepareSQL is called implicitly when TOraTable is being opened.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference1316

5.28.1.3 TSmartQuery Class

A component providing TCustomSmartQuery.Expand fields feature, that lets all data controls
be aware of all the fields belonging to updating table an not only those requested in SELECT
clause, and TCustomSmartQuery.SmartRefresh feature (in Professional and Developer
editions only).
For a list of all members of this type, see TSmartQuery members.

Unit
OraSmart

SyntaxTSmartQuery = class(TCustomSmartQuery);Remarks
TSmartQuery component is a direct descendant of the TOraDataSet class.
TSmartQuery is an alternative to TOraQuery. It provides TCustomSmartQuery.Expand fields
feature, that lets all data controls be aware of all the fields belonging to updating table an not
only those requested in SELECT clause, and TCustomSmartQuery.SmartRefresh feature (inProfessional and Developer editions only).

Inheritance Hierarchy
TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQuery
TCustomSmartQuery
TSmartQuery

See Also
TOraQuery
TOraTable
Updating Data with ODAC Dataset Components© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1317

Oracle Data Access Components

5.28.1.3.1 Members

TSmartQuery class overview.

Properties
Name
BaseSQL (inherited from TCustomDADataSet)

CachedUpdates (inherited from TMemDataSet)

ChangeNotification (inherited from TOraDataSet)

CheckMode (inherited from TOraDataSet)

CommandTimeout (inherited from TOraDataSet)

Conditions (inherited from TCustomDADataSet)
Connection (inherited from TCustomDADataSet)

Cursor (inherited from TOraDataSet)
DataTypeMap (inherited from TCustomDADataSet)
Debug (inherited from TCustomDADataSet)

DependEvents (inherited from TCustomSmartQuery)

DetailFields (inherited from TCustomDADataSet)

Description
Used to return SQL text
without any changes
performed by AddWhere,
SetOrderBy, and FilterSQL.
Used to enable or disable
the use of cached updates
for a dataset.
Used to receive databasechange notification
messages to refresh dataset
when required.
Used to define the checkmode before editing arecord.
Sets the wait time before arequest is sent to the server
to terminate the attempt to
execute or fetch the current
SQL statement.
Used to add WHERE
conditions to a query
Used to specify aconnection object to use toconnect to a data store.
Used to fetch data from thecursor parameter and cursor
field in Oracle 8.
Used to set data typemapping rules
Description is not available
at the moment.
Used to get or set thenames of the events thatdataset will depend on in
TCustomSmartQuery.Smart
Refresh mode.
Used to specify the fields
that correspond to the© 2019 DevartReference

Disconnected (inherited from TCustomDADataSet)

DMLRefresh (inherited from TOraDataSet)

Encryption (inherited from TOraDataSet)
Expand (inherited from TCustomSmartQuery)

FetchAll (inherited from TOraDataSet)

FetchRows (inherited from TCustomDADataSet)

FilterSQL (inherited from TCustomDADataSet)

FinalSQL (inherited from TCustomDADataSet)

IndexFieldNames (inherited from TMemDataSet)

IsPLSQL (inherited from TOraDataSet)

IsQuery (inherited from TOraDataSet)

KeyExclusive (inherited from TMemDataSet)© 2019 Devart

1318

foreign key fields fromMasterFields when building
master/detail relationship.
Used to keep dataset
opened after connection isclosed.
Used to refresh record by
RETURNING clause wheninsert or update is
performed.
Used to specify encryption
options in a dataset.
Lets all data controls beaware of all the fields
belonging to updating table.
Used to request all recordsof the query from databaseserver when a dataset isbeing opened.
Used to define the numberof rows to be transferred
across the network at thesame time.
Used to change the WHERE
clause of SELECT
statement and reopen aquery.
Used to return SQL text withall changes performed by
AddWhere, SetOrderBy,
and FilterSQL, and withexpanded macros.
Used to get or set the list offields on which the recordset
is sorted.
Indicates whether a SQL
statement is a PL/SQL
block.
Indicates whether SQL
statement returns rows ornot.
Specifies the upper andlower boundaries for arange.

1319

Oracle Data Access Components

KeyFields (inherited from TOraDataSet)

KeySequence (inherited from TOraDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

LockMode (inherited from TOraDataSet)

MacroCount (inherited from TCustomDADataSet)
Macros (inherited from TCustomDADataSet)

MasterFields (inherited from TCustomDADataSet)

MasterSource (inherited from TCustomDADataSet)

NonBlocking (inherited from TOraDataSet)

Options (inherited from TCustomSmartQuery)

Used to build SQL
statements for the
SQLDelete, SQLInsert, andSQLUpdate properties ifthey were empty before
updating a database.
Used to specify the name ofa sequence that will be used
to fill in a key field after a
new record is inserted orposted to a database.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Used to define when to
perform the locking of an
editing record.
Used to get the number ofmacros associated with the
Macros property.
Makes it possible to change
SQL queries easily.
Used to specify the namesof one or more fields that areused as foreign keys fordataset when establishingdetail/master relationshipbetween it and the dataset
specified in MasterSource.
Used to specify the data
source component whichbinds current dataset to themaster one.
Used to execute a SQL
statement and fetch rows by
a separate thread.
Used to specify the
behaviour ofTCustomSmartQuery object.

© 2019 DevartReference

OptionsDS (inherited from TOraDataSet)

ParamCheck (inherited from TCustomDADataSet)

ParamCount (inherited from TCustomDADataSet)
Params (inherited from TOraDataSet)
Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)
ReadOnly (inherited from TCustomDADataSet)

RefreshEvent (inherited from TCustomSmartQuery)

RefreshMode (inherited from TOraDataSet)
RefreshOptions (inherited from TCustomDADataSet)
ReturnParams (inherited from TOraDataSet)

RowsAffected (inherited from TCustomDADataSet)

RowsProcessed (inherited from TOraDataSet)
SequenceMode (inherited from TOraDataSet)
Session (inherited from TOraDataSet)© 2019 Devart

1320

Used to specify the
behaviour of
TOraDataSetObject.
Used to specify whether
parameters for the Params
property are generated
automatically after the SQL
property was changed.
Used to indicate how many
parameters are there in the
Params property.
Contains the parameters fora query's SQL statement.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to prevent users fromupdating, inserting, ordeleting data in the dataset.
Used to get or set the nameof the event that dataset will
be waiting for in
TCustomSmartQuery.Smart
Refresh mode.
Used to specify when torefresh an editing record.
Used to indicate when theediting record is refreshed.
Used to return a new fields
value to dataset after insert
or update.
Used to indicate the numberof rows which were inserted,
updated, or deleted during
the last query operation.
Returns the number of rows
processed by a query.
Used to specify the methods
used internally to generate asequenced field.
Used to specify the sessionin which dataset will be1321

Oracle Data Access Components

SmartFetch (inherited from TOraDataSet)

SmartRefresh (inherited from TCustomSmartQuery)

SmartState (inherited from TCustomSmartQuery)

SQL (inherited from TCustomDADataSet)

SQLDelete (inherited from TCustomDADataSet)

SQLInsert (inherited from TCustomDADataSet)

SQLLock (inherited from TCustomDADataSet)

SQLRecCount (inherited from TCustomDADataSet)

SQLRefresh (inherited from TCustomDADataSet)

SQLType (inherited from TOraDataSet)

SQLUpdate (inherited from TCustomDADataSet)

executed.
The SmartFetch mode isused for fast navigation
through a huge amount ofrecords and to minimize
memory consumption.
Let TCustomSmartQuerycomponents work in a
concurrent environment.
Defines if
TCustomSmartQuery is inview mode.
Used to provide a SQL
statement that a querycomponent executes when
its Open method is called.
Used to specify a SQL
statement that will be used
when applying a deletion toa record.
Used to specify the SQL
statement that will be used
when applying an insertion
to a dataset.
Used to specify a SQL
statement that will be used
to perform a record lock.
Used to specify the SQL
statement that is used to get
the record count when
opening a dataset.
Used to specify a SQL
statement that will be used
to refresh current record bycalling theTCustomDADataSet.Refres
hRecord procedure.
Used to get the typecode of
the SQL statement being
processed by Oracle
database server.
Used to specify a SQL
statement that will be used
when applying an update toa dataset.
© 2019 DevartReference

StrictUpdate (inherited from TOraDataSet)

UniDirectional (inherited from TCustomDADataSet)

UpdateObject (inherited from TOraDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

1322

Used for TOraDataSet toraise the 'Update failed'exception when the numberof updated or deleted
records are not equal to 1.
Used if an application does
not need bidirectional
access to records in the
result set.
Used to point to an update
object component which
provides SQL statementsthat perform updates of theread-only datasets.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
AddWhere (inherited from TCustomDADataSet)

ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)
BreakExec (inherited from TCustomDADataSet)
CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)

CommitUpdates (inherited from TMemDataSet)© 2019 Devart

Description
Adds condition to the
WHERE clause of SELECT
statement in the SQL
property.
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Breaks execution of a SQL
statement on the server.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.
Clears the cached updates
buffer.

1323

Oracle Data Access Components

Used to obtain a stream forreading data from or writing
CreateBlobStream (inherited from TCustomDADataSet) data to a BLOB field,
specified by the Field
parameter.
Generates the stored
CreateProcCall (inherited from TOraDataSet)
procedure call.
Makes permanent changes
DeferredPost (inherited from TMemDataSet)
to the database server.
Removes WHERE clausefrom the SQL property and
DeleteWhere (inherited from TCustomDADataSet)
assigns the BaseSQL
property.
Enables changing the
EditRangeEnd (inherited from TMemDataSet)
ending value for an existing
range.
Enables changing the
EditRangeStart (inherited from TMemDataSet)
starting value for an existing
range.
Returns the parse error
ErrorOffset (inherited from TOraDataSet)
offset.
Overloaded. Executes a
Execute (inherited from TCustomDADataSet)
SQL statement on theserver.
Indicates whether SQL
Executing (inherited from TCustomDADataSet)
statement is still being
executed.
Used to learn whether
Fetching (inherited from TCustomDADataSet)
TCustomDADataSet is still
fetching rows.
Used to learn whether
FetchingAll (inherited from TCustomDADataSet)
TCustomDADataSet isfetching all rows to the end.
Searches for a record which
FindKey (inherited from TCustomDADataSet)
contains specified fieldvalues.
Description is not available
FindMacro (inherited from TCustomDADataSet)at the moment.
Moves the cursor to a
specific record or to the firstrecord in the dataset that
FindNearest (inherited from TCustomDADataSet)
matches or is greater thanthe values specified in the
KeyValues parameter.
© 2019 DevartReference

1324

Determines whether aparameter with the specified
name exists in a dataset.
Retrieves a TOraArray
GetArray (inherited from TOraDataSet)
object for a field when only
its name is known.
Overloaded. Retrieves
TBlob object for a field or
GetBlob (inherited from TMemDataSet)
current record when only its
name or the field itself isknown.
Returns internal field types
GetDataType (inherited from TCustomDADataSet)
defined in the MemData andaccompanying modules.
Returns a row and column of
GetErrorPos (inherited from TOraDataSet)parse error for a SQL
statement.
Returns a multireference
GetFieldObject (inherited from TCustomDADataSet)
shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) Retrieves the precision of anumber field.
Retrieves the scale of a
GetFieldScale (inherited from TCustomDADataSet)
number field.
Retrieves a TOraFile object
GetFile (inherited from TOraDataSet)
for a field with known name.
Retrieves a TOraInterval
GetInterval (inherited from TOraDataSet)
object for a field with known
name.
GetKeyFieldNames (inherited from
Provides a list of available
FindParam (inherited from TOraDataSet)

TCustomDADataSet)

key field names.

GetKeyList (inherited from TOraDataSet)

Returns the list of tableprimary key fields.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraLob object
for a field with known name.
Retrieves a TOraObject
object for a field with known
name.
Retrieves an ORDER BY
clause from a SQL
statement.

GetLob (inherited from TOraDataSet)
GetLobLocator (inherited from TOraDataSet)
GetObject (inherited from TOraDataSet)

GetOrderBy (inherited from TCustomDADataSet)
GetRef (inherited from TOraDataSet)© 2019 Devart

Retrieves a TOraRef object

1325

Oracle Data Access Components

GetTable (inherited from TOraDataSet)

GetTimeStamp (inherited from TOraDataSet)

GotoCurrent (inherited from TCustomDADataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Lock (inherited from TCustomDADataSet)
MacroByName (inherited from TCustomDADataSet)
OpenNext (inherited from TOraDataSet)

ParamByName (inherited from TOraDataSet)

Prepare (inherited from TCustomDADataSet)
RefreshRecord (inherited from TCustomDADataSet)
RestoreSQL (inherited from TCustomDADataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

for a field with known name.
Retrieve a TOraNestTable
object for a field with known
name.
Retrieves a
TOraTimeStamp object for afield with known name.
Sets the current record inthis dataset similar to thecurrent record in anotherdataset.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Locks the current record.
Finds a Macro with thename passed in Name.
Opens next cursor or rowset
in the statement.
Sets or uses parameter
information for a specificparameter based on its
name.
Allocates, opens, andparses cursor for a query.
Actualizes field values forthe current record.
Restores the SQL property
modified by AddWhere and
SetOrderBy.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.

© 2019 DevartReference

SaveSQL (inherited from TCustomDADataSet)

SaveToXML (inherited from TMemDataSet)

SetOrderBy (inherited from TCustomDADataSet)
SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

SQLSaved (inherited from TCustomDADataSet)
UnLock (inherited from TCustomDADataSet)
UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

View (inherited from TCustomSmartQuery)

Events© 2019 Devart

1326

Saves the SQL property
value to BaseSQL.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Builds an ORDER BY clauseof a SELECT statement.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Determines if the SQL
property value was saved to
the BaseSQL property.
Releases a record lock.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.
Allows viewing all fields ofthe updating table.

1327

Oracle Data Access Components

Name
AfterExecute (inherited from TCustomDADataSet)
AfterFetch (inherited from TCustomDADataSet)
AfterSmartRefresh (inherited fromTCustomSmartQuery)
AfterUpdateExecute (inherited fromTCustomDADataSet)
BeforeFetch (inherited from TCustomDADataSet)
BeforeUpdateExecute (inherited fromTCustomDADataSet)
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)

RefreshFields (inherited from TCustomSmartQuery)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Description
Occurs after a component
has executed a query todatabase.
Occurs after dataset finishes
fetching data from server.
Occurs after the Smart
Refresh procedure was
performed by
TCustomOraQuery.
Occurs after executing
insert, delete, update, lockand refresh operations.
Occurs before dataset isgoing to fetch block ofrecords from the server.
Occurs before executing
insert, delete, update, lock,and refresh operations.
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Occures before anapplication posts changes
for the current record to the
database or cache.
Provide Feedback

5.28.1.4 TSmartQueryOptions ClassThis class allows setting up the behaviour of the TSmartQuery class.
For a list of all members of this type, see TSmartQueryOptions members.

Unit
OraSmart

Syntax© 2019 DevartReference

1328

TSmartQueryOptions = class(TOraDataSetOptions);

Inheritance Hierarchy
TDADataSetOptions
TOraDataSetOptionsDS
TOraDataSetOptions
TSmartQueryOptions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.28.1.4.1 Members

TSmartQueryOptions class overview.

Properties
Name

Description
Used to close OCI cursor
AutoClose (inherited from TOraDataSetOptions)after fetching all rows.
Used to execute automatic
AutoPrepare (inherited from TDADataSetOptions)TCustomDADataSet.Prepar
e on the query execution.
Used to enable caching of
CacheCalcFields (inherited from TDADataSetOptions) the TField.Calculated and
TField.Lookup fields.
Used to allocate local
CacheLobs (inherited from TOraDataSetOptions)memory buffer to hold acopy of the Lob content.
Used to store values of theCompressBlobMode (inherited from
BLOB fields in compressed
TDADataSetOptions)
form.
Used for TOraDataSet to fill
the DefaultExpression
DefaultValues (inherited from TOraDataSetOptions)
property of TField objects byappropriate value.
Used to fetch all Oracle 8
DeferredLobRead (inherited from TOraDataSetOptions) Lob values when they are
explicitly requested.
Used to get or set a delay inmilliseconds before
DetailDelay (inherited from TDADataSetOptions)refreshing detail dataset
while navigating masterdataset.
© 2019 Devart1329

Oracle Data Access Components

Used to enable currency
type. Default value of thisoption is False.
Used to enable using
EnableFMTBCD (inherited from TOraDataSetOptions) FMTBCD instead of float forlarge integer numbers tokeep precision.
Used to perform an
additional query to get
ExtendedFieldsInfo (inherited frominformation about returned
TOraDataSetOptions)fields and the tables they
belong to.
Used to treat all non-BLOB
FieldsAsString (inherited from TOraDataSetOptions)fields as being of string
datatype.
Used forTCustomDADataSet to fill
the Origin property of theFieldsOrigin (inherited from TDADataSetOptions)
TField objects byappropriate value when
opening a dataset.
Used to control how adataset treats data of the
FlatBuffers (inherited from TDADataSetOptions)
ftString and ftVarBytes
fields.
Used to refresh fields of all
FullRefresh (inherited from TOraDataSetOptions)tables by the RefreshRecord
method.
Used to display the ROWID
HideRowId (inherited from TOraDataSetOptionsDS)
column.
Used to include all set
InsertAllSetFields (inherited from TDADataSetOptions) dataset fields in thegenerated INSERT
statement
KeepPrepared (inherited from TOraDataSetOptionsDS) Used to keep TOraDataSet
prepared after closing.
Used forTCustomDADataSet to use
LocalMasterDetail (inherited from TDADataSetOptions) local filtering to establish
master/detail relationship for
detail dataset and does notrefer to the server.
Used to represent string
LongStrings (inherited from TDADataSetOptions)fields with the length that isgreater than 255 as
EnableBCD (inherited from TOraDataSetOptions)© 2019 DevartReference

MasterFieldsNullable (inherited from
TDADataSetOptions)

NumberRange (inherited from TDADataSetOptions)

PrefetchLobSize (inherited from TOraDataSetOptions)

PrefetchRows (inherited from TOraDataSetOptions)PrepareUpdateSQL (inherited from
TOraDataSetOptions)
ProcNamedParams (inherited from
TOraDataSetOptions)

QueryRecCount (inherited from TDADataSetOptions)

QuoteNames (inherited from TDADataSetOptions)

RawAsString (inherited from TOraDataSetOptions)© 2019 Devart

1330

TStringField.
Allows to use NULL values
in the fields by which therelation is built, whengenerating the query for the
Detail tables (when thisoption is enabled, theperformance can get worse).
Used to set the MaxValueand MinValue properties of
TIntegerField and
TFloatField to appropriate
values.
Used to retrieve the LOB
length and the LOB data
beginning during regularfetch.
Used to get or set the
number of rows that OCI
prefetches when executing aquery.
Used to automatically
prepare update queries
before execution.
Used to specify a notation
method of passing
parameter values to thestored PL/SQL object.
Used forTCustomDADataSet toperform additional query to
get the record count for thisSELECT, so the
RecordCount property
reflects the actual number ofrecords.
Used forTCustomDADataSet toquote all database object
names in autogenerated
SQL statements such as
update SQL.
Used to treat all RAW fields
as being of string datatype.

1331

Oracle Data Access Components

Used for a dataset
component to refresh its
data when it gets database
ReflectChangeNotify (inherited fromchange notification
TOraDataSetOptions)messages in response to
DML or DDL changes on theobjects associated with thedataset query.
Used for a dataset to locally
RemoveOnRefresh (inherited from TDADataSetOptions) remove a record that can not
be found on the server.
Used forTCustomDADataSet to set
RequiredFields (inherited from TDADataSetOptions)
the Required property of the
TField objects for the NOTNULL fields.
Used to return the new value
ReturnParams (inherited from TDADataSetOptions)of fields to dataset after
insert or update.
Used for TOraDataSet touse scrollable server cursor
ScrollableCursor (inherited from TOraDataSetOptions) (available since Oracle 9only) instead of caching dataon the client side.
Used for a dataset to set the
ReadOnly property to True
SetFieldsReadOnly (inherited fromfor all fields that do not
TDADataSetOptions)belong to UpdatingTable or
can not be updated.
Used to get a value
indicating whether Oracle
StatementCache (inherited from TOraDataSetOptions) resources assosiated withthe current statement will becached inside a session.
Used forTCustomDADataSet toraise an exception when the
StrictUpdate (inherited from TDADataSetOptions)
number of updated ordeleted records is not equal1.
Temporary LOBs are used
to write input and input/
TemporaryLobUpdate (inherited from
output LOB parameters into
TOraDataSetOptions)
database when executing
dataset's SQL statements.
© 2019 DevartReference

1332

Specifies whether to discard
all trailing spaces in thestring fields of a dataset.
Used to include all dataset
fields in the generated
UpdateAllFields (inherited from TDADataSetOptions)
UPDATE and INSERT
statements.
Used to get or set a valuethat enables or disables
UpdateBatchSize (inherited from TDADataSetOptions) batch processing support,
and specifies the number ofcommands that can be
executed in a batch.
© 1997-2019
Request Support
DAC Forum
Provide Feedback
Devart. All Rights
Reserved.
TrimFixedChar (inherited from TDADataSetOptions)5.28.2 Enumerations
Enumerations in the OraSmart unit.

Enumerations
Name

Description
Specifies if
TCustomSmartQuery is inview mode.

TSmartState© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.28.2.1 TSmartState Enumeration

Specifies if TCustomSmartQuery is in view mode.

Unit
OraSmart

SyntaxTSmartState = (dsView);

Values© 2019 Devart

Provide Feedback

1333

Oracle Data Access Components

Value
dsView

Meaning
TCustomSmartQuery is in view mode.

Remarks
Check the SmartState property to learn whether TCustomSmartQuery is in view mode.
TCustomSmartQuery is in view mode (SmartState is dsView) after calling View method.

© 1997-2019
Devart. All Rights
Reserved.

5.29

Request Support

DAC Forum

Provide Feedback

OraSQLMonitor
This unit contains implementation of the TOraSQLMonitor component.

ClassesName

Description
This component serves formonitoring dynamic SQL
execution in ODAC-based
applications.

TOraSQLMonitor© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.29.1 Classes
Classes in the OraSQLMonitor unit.

ClassesName

Description
This component serves formonitoring dynamic SQL
execution in ODAC-based
applications.

TOraSQLMonitor© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1334

5.29.1.1 TOraSQLMonitor ClassThis component serves for monitoring dynamic SQL execution in ODAC-based applications.
For a list of all members of this type, see TOraSQLMonitor members.

Unit
OraSQLMonitor

SyntaxTOraSQLMonitor = class(TCustomDASQLMonitor);

Remarks
Use TOraSQLMonitor to monitor dynamic SQL execution in ODAC-based applications.
TOraSQLMonitor provides two ways of displaying debug information: with dialog window,
DBMonitor or Borland SQL Monitor. Furthermore to receive debug information the
TCustomDASQLMonitor.OnSQL event can be used. Also it is possible to use all these ways
at the same time, though an application may have only one TOraSQLMonitor object. If an
application has no TOraSQLMonitor instance, the Debug window is available to display SQL
statements to be sent.

Inheritance Hierarchy
TCustomDASQLMonitor
TOraSQLMonitor

See Also
TCustomDADataSet.Debug
TCustomDASQL.Debug
DBMonitor© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.29.1.1.1 Members

TOraSQLMonitor class overview.

Properties
Name
Active (inherited from TCustomDASQLMonitor)© 2019 Devart

Description
Used to activate monitoring

1335

Oracle Data Access Components

of SQL.
DBMonitorOptions (inherited from

Used to set options for
dbMonitor.

TCustomDASQLMonitor)
Options (inherited from TCustomDASQLMonitor)

TraceFlags (inherited from TCustomDASQLMonitor)

Used to include the desired
properties for
TCustomDASQLMonitor.
Used to specify which
database operations themonitor should track in an
application at runtime.

EventsName
OnSQL (inherited from TCustomDASQLMonitor)© 1997-2019
Devart. All Rights
Reserved.

5.30

Request Support

Description
Occurs when tracing of SQL
activity on database
components is needed.

DAC Forum

Provide Feedback

OraTransaction
This unit contains implementation of the TOraTransaction component.

ClassesName

Description
A component for managing
transactions in an
application.

TOraTransaction

Enumerations
Name

Description
Specifies with what
distributed transaction,
perform two-phase commit
or rollback on all sessions
will be coordinated.

TGlobalCoordinator© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

1336

Reserved.
5.30.1 Classes
Classes in the OraTransaction unit.

ClassesName

Description
A component for managing
transactions in an
application.

TOraTransaction© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1 TOraTransaction Class

A component for managing transactions in an application.
For a list of all members of this type, see TOraTransaction members.

Unit
OraTransaction

SyntaxTOraTransaction = class(TDATransaction);

Remarks
The TOraTransaction component is used to provide discrete transaction control overconnection. It can be used for manipulating simple local and global transactions.

Inheritance Hierarchy
TDATransaction
TOraTransaction

See Also
TOraTransaction Component
TCustomDAConnection.StartTransaction
TCustomDAConnection.Commit
TCustomDAConnection.Rollback
TOraTransaction Component© 2019 Devart

1337

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.1 Members

TOraTransaction class overview.

Properties
Name
ActiveBranchQualifiers

DefaultCloseAction (inherited from TDATransaction)

DefaultSession

GlobalCoordinator

InactiveTimeOut

IsolationLevel

ResumeTimeOut

Sessions
SessionsCount

Description
Used to indicate whether thetransaction is active or not.
Used to represent branch
qualifier part of XID fortransaction branches.
Used to specify thetransaction behaviour when
it is destroyed while being
active, or when one of its
connections is closed withthe active transaction.
Used to specify the session
for performing thetransaction.
Used to determine with what
distributed transaction,
perform two-phase commit
or rollback on all sessions
will be coordinated.
Used to specify the waitingtime before deleting inactive
transaction branch.
Used to specify how thetransactions containing
database modifications arehandled.
Used to set the wait time toresume the transaction
branch if it is used byanother session.
Used to specify a session
for the given index.
Used to provide the numberof sessions associated withthe transaction component.
© 2019 DevartReference

TransactionId
TransactionName

1338

Used to represent global
transaction identifier.
Used to assign a name tothe current transaction.

Methods
Name
AddSession

ClearSessions
Commit (inherited from TDATransaction)
DetachRemoveSession
ResumeRollback (inherited from TDATransaction)

RollbackToSavepoint

Savepoint
StartTransaction

Description
Overloaded. Associates a
TOraSession component
with the transaction
component.
Disassociates thetransaction component fromall its session components.
Commits the current
transaction.
Deactivates a transaction.
Disassociates the specified
session from the transaction.
Resumes a detachedtransaction.
Discards all modifications ofdata associated with thecurrent transaction and ends
the transaction.
Discards all modifications
made during the current
transaction and restores its
state to the moment of the
savepoint.
Defines a savepoint in thetransaction.
Overloaded. Begins a newuser transaction against the
database server.

EventsName

Description

OnCommit (inherited from TDATransaction)

Occurs after the transaction
has been successfully© 2019 Devart1339

Oracle Data Access Components

OnCommitRetaining (inherited from TDATransaction)

OnError

OnRollback (inherited from TDATransaction)

OnRollbackRetaining (inherited from TDATransaction)© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

committed.
Occurs after
CommitRetaining has been
executed.
Occurs for processing errorsthat can be arised duringexecuting transaction andsavepoint control statements
such as COMMIT,ROLLBACK, SAVEPOINT,RELEASE SAVEPOINT
and others.
Occurs after the transaction
has been successfully rolledback.
Occurs after
RollbackRetaining has been
executed.
Provide Feedback

5.30.1.1.2 Properties

Properties of the TOraTransaction class.
For a complete list of the TOraTransaction class members, see the TOraTransaction
Members topic.

PublicName
ActiveBranchQualifiers

DefaultCloseAction (inherited from TDATransaction)

Sessions

Description
Used to indicate whether thetransaction is active or not.
Used to represent branch
qualifier part of XID fortransaction branches.
Used to specify thetransaction behaviour when
it is destroyed while being
active, or when one of its
connections is closed withthe active transaction.
Used to specify a session
for the given index.
© 2019 DevartReference

1340

Used to provide the numberof sessions associated withthe transaction component.
Used to represent global
transaction identifier.

SessionsCount
TransactionId

Published
Name

Description
Used to specify the session
for performing thetransaction.
Used to determine with what
distributed transaction,
perform two-phase commit
or rollback on all sessions
will be coordinated.
Used to specify the waitingtime before deleting inactive
transaction branch.
Used to specify how thetransactions containing
database modifications arehandled.
Used to set the wait time toresume the transaction
branch if it is used byanother session.
Used to assign a name tothe current transaction.

DefaultSession

GlobalCoordinator

InactiveTimeOut

IsolationLevel

ResumeTimeOut

TransactionName

See Also
TOraTransaction Class
TOraTransaction Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.30.1.1.2.1 Active Property

Used to indicate whether the transaction is active or not.

Class
© 2019 Devart

Provide Feedback

1341

Oracle Data Access Components

TOraTransaction

Syntaxproperty Active: boolean;

Remarks
Use the Active property to indicate whether the transaction is active or not.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.2.2 BranchQualifiers Property(Indexer)

Used to represent branch qualifier part of XID for transaction branches.

Class
TOraTransaction

Syntaxproperty BranchQualifiers[Index: integer]: TBytes;
Parameters
Index
Holds a branch qualifier index.

Remarks
Use the BranchQualifiers property to represent a branch qualifier part of XID for transaction
branches.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.2.3 DefaultSession Property

Used to specify the session for performing the transaction.

Class
TOraTransaction

Syntax© 2019 DevartReference

1342

property DefaultSession: TOraSession;

Remarks
Use the DefaultSession property to specify the session which is used to perform thetransaction. For distributed transactions use the TOraTransaction.AddSession method
instead.

See Also
TOraTransaction.AddSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.2.4 GlobalCoordinator Property

Used to determine with what distributed transaction, perform two-phase commit or rollback
on all sessions will be coordinated.

Class
TOraTransaction

Syntaxproperty GlobalCoordinator: TGlobalCoordinator default
gcInternal;

Remarks
Use the GlobalCoordinator property to determine with what distributed transaction, perform
two-phase commit or rollback on all sessions will be coordinated.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.2.5 InactiveTimeOut Property

Used to specify the waiting time before deleting inactive transaction branch.

Class
TOraTransaction

Syntax© 2019 Devart1343

Oracle Data Access Components

property InactiveTimeOut: integer default 0;

Remarks
Use the InactiveTimeOut property to set for server the time to wait before deleting inactive
transaction branch.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.2.6 IsolationLevel Property

Used to specify how the transactions containing database modifications are handled.

Class
TOraTransaction

Syntaxproperty IsolationLevel: TOraIsolationLevel default
ilReadCommitted;

Remarks
Use the IsolationLevel property to specify how the transactions containing databasemodifications are handled.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.2.7 ResumeTimeOut Property

Used to set the wait time to resume the transaction branch if it is used by another session.

Class
TOraTransaction

Syntaxproperty ResumeTimeOut: integer default 0;

Remarks
Use the ResumeTimeOut property for setting the wait time to resume the transaction branch
if it is used by another session.
© 2019 DevartReference

1344

See Also
Resume© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.2.8 Sessions Property(Indexer)

Used to specify a session for the given index.

Class
TOraTransaction

Syntaxproperty Sessions[Index: integer]: TOraSession;
Parameters
Index
Holds the index to specify a session for.

Remarks
Use the Sessions property to specify a session for the given index.

See Also
SessionsCount
RemoveSession
TOraTransaction.AddSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.2.9 SessionsCount Property

Used to provide the number of sessions associated with the transaction component.

Class
TOraTransaction

Syntaxproperty SessionsCount: integer;© 2019 Devart1345

Oracle Data Access Components

Remarks
Use the SessionsCount property to get the number of sessions associated with thetransaction component.

See Also
Sessions
RemoveSession
TOraTransaction.AddSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.2.10 TransactionId Property

Used to represent global transaction identifier.

Class
TOraTransaction

Syntaxproperty TransactionId: TBytes;

Remarks
Use the TransactionId property to represent global transaction identifier which is the part of
XID. Server associates it with local transaction.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.2.11 TransactionName Property

Used to assign a name to the current transaction.

Class
TOraTransaction

Syntaxproperty TransactionName: string;© 2019 DevartReference

1346

Remarks
Use the TransactionName property to assign a name to the current transaction. Thisparameter is useful in distributed database environments when you have to identify andresolve in-doubt transactions. The text string is limited to 255 bytes.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.3 Methods

Methods of the TOraTransaction class.
For a complete list of the TOraTransaction class members, see the TOraTransaction
Members topic.

PublicName
AddSession

ClearSessions
Commit (inherited from TDATransaction)
DetachRemoveSession
ResumeRollback (inherited from TDATransaction)

RollbackToSavepoint

Savepoint© 2019 Devart

Description
Overloaded. Associates a
TOraSession component
with the transaction
component.
Disassociates thetransaction component fromall its session components.
Commits the current
transaction.
Deactivates a transaction.
Disassociates the specified
session from the transaction.
Resumes a detachedtransaction.
Discards all modifications ofdata associated with thecurrent transaction and ends
the transaction.
Discards all modifications
made during the current
transaction and restores its
state to the moment of the
savepoint.
Defines a savepoint in thetransaction.

1347

Oracle Data Access Components

Overloaded. Begins a newuser transaction against the
database server.

StartTransaction

See Also
TOraTransaction Class
TOraTransaction Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.3.1 AddSession Method

Associates a TOraSession component with the transaction component.

Class
TOraTransaction

Overload List
Name
AddSession(Session: TOraSession)
AddSession(Session: TOraSession;
BranchQualifier: TBytes)© 1997-2019
Request Support
Devart. All Rights
Reserved.

Description
Associates a TOraSession component withthe transaction component.
Associates a TOraSession component withthe transaction component.
DAC Forum

Provide Feedback

Associates a TOraSession component with the transaction component.

Class
TOraTransaction

Syntax
procedure AddSession(Session: TOraSession); overload;
Parameters
SessionHolds a TOraSession component© 2019 DevartReference

1348

Remarks
Call the AddSession method to associate a TOraSession component with the transaction
component.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

Associates a TOraSession component with the transaction component.

Class
TOraTransaction

Syntax
procedure AddSession(Session: TOraSession; BranchQualifier:
TBytes); overload;
Parameters
SessionHolds a TOraSession component
BranchQualifier
Holds a branch qualifier.

See Also
TOraTransaction.Sessions
TOraTransaction.RemoveSession
TOraTransaction.ClearSessions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.3.2 ClearSessions Method

Disassociates the transaction component from all its session components.

Class
TOraTransaction

Syntax
procedure ClearSessions;© 2019 Devart1349

Oracle Data Access Components

Remarks
Call the ClearSessions method to disassociate the transaction component from all its
session components.

See Also
Sessions
AddSession
RemoveSession© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.3.3 Detach Method

Deactivates a transaction.

Class
TOraTransaction

Syntax
procedure Detach;Remarks
Call the Detach method to make a transaction inactive.

See Also
Resume© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.3.4 RemoveSession Method

Disassociates the specified session from the transaction.

Class
TOraTransaction

Syntax© 2019 DevartReference

1350

procedure RemoveSession(Session: TOraSession);
Parameters
SessionHolds a TOraSession object.

Remarks
Call the RemoveSession method to disassociate the specified session from the transaction.

See Also
Sessions
TOraTransaction.AddSession
ClearSessions© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.3.5 Resume Method

Resumes a detached transaction.

Class
TOraTransaction

Syntax
procedure Resume;

Remarks
Call the Resume method to resume a detached transaction.

See Also
ResumeTimeOut
Detach© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.3.6 RollbackToSavepoint Method

Discards all modifications made during the current transaction and restores its state to themoment of the savepoint.
© 2019 Devart

1351

Oracle Data Access Components

Class
TOraTransaction

Syntax
procedure RollbackToSavepoint(const Savepoint: string);
Parameters
Savepoint
Holds the name of the savepoint.

Remarks
Call the RollbackToSavepoint method to cancel all updates for the current transaction andrestore its state up to the moment of the last defined savepoint.

See Also
Savepoint
TDATransaction.Rollback© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.3.7 Savepoint Method

Defines a savepoint in the transaction.

Class
TOraTransaction

Syntax
procedure Savepoint(const Savepoint: string);
Parameters
Savepoint
Holds the savepoint name that identifies the savepoint.

Remarks
Call the Savepoint method to define a point in the transaction to which you can roll back later.
As the parameter, you can pass any valid name to identify the savepoint.
To roll back to the last savepoint call RollbackToSavepoint.

© 2019 DevartReference

1352

See Also
RollbackToSavepoint© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.3.8 StartTransaction Method

Begins a new user transaction against the database server.

Class
TOraTransaction

Overload List
Name
StartTransaction
StartTransaction(Resume: boolean)© 1997-2019
Devart. All Rights
Reserved.

Request Support

Description
Begins a new user transaction against the
database server.
Begins a new user transaction against the
database server.
DAC Forum

Provide Feedback

Begins a new user transaction against the database server.

Class
TOraTransaction

Syntax
procedure StartTransaction; overload; override;© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Begins a new user transaction against the database server.

Class
TOraTransaction

Syntax© 2019 Devart

Provide Feedback

1353

Oracle Data Access Components

procedure StartTransaction(Resume: boolean); reintroduce;
overload;
Parameters
ResumeTrue, if detached transaction branches will be resumed on sessions. False otherwise.

Remarks
Call the StartTransaction method to begin a new user transaction against the databaseserver. Before calling StartTransaction, an application should check the status of the
TOraTransaction.Active property. If TOraTransaction.Active is True, it indicates that atransaction is already in progress, a subsequent call to StartTransaction without first calling
TDATransaction.Commit or TDATransaction.Rollback to end the current transaction raises
EDatabaseError. Calling StartTransaction when connection is closed also raises
EDatabaseError.
Updates, insertions, and deletions that take place after a call to StartTransaction are held by
the server until an application calls Commit to save the changes or Rollback to cancel them.
Setting the Resume parameter to True means detached transaction branches will beresumed on sessions.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.4 Events

Events of the TOraTransaction class.
For a complete list of the TOraTransaction class members, see the TOraTransaction
Members topic.

PublicName
OnCommit (inherited from TDATransaction)

OnCommitRetaining (inherited from TDATransaction)

OnRollback (inherited from TDATransaction)

Description
Occurs after the transaction
has been successfullycommitted.
Occurs after
CommitRetaining has been
executed.
Occurs after the transaction
has been successfully rolledback.

© 2019 DevartReference

OnRollbackRetaining (inherited from TDATransaction)

1354

Occurs after
RollbackRetaining has been
executed.

Published
Name

Description
Occurs for processing errorsthat can be arised duringexecuting transaction andsavepoint control statements
such as COMMIT,ROLLBACK, SAVEPOINT,RELEASE SAVEPOINT
and others.

OnErrorSee Also
TOraTransaction Class
TOraTransaction Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.1.1.4.1 OnError Event

Occurs for processing errors that can be arised during executing transaction and savepoint
control statements such as COMMIT, ROLLBACK, SAVEPOINT, RELEASE SAVEPOINT andothers.

Class
TOraTransaction

Syntaxproperty OnError: TDATransactionErrorEvent;Remarks
Write the OnError event handler to process errors that occur during executing transaction
and savepoint control statements such as COMMIT, ROLLBACK, SAVEPOINT, RELEASESAVEPOINT and others. Check the E parameter to get an error code.

© 1997-2019© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1355

Oracle Data Access Components

Devart. All Rights
Reserved.
5.30.2 Enumerations
Enumerations in the OraTransaction unit.

Enumerations
Name

Description
Specifies with what
distributed transaction,
perform two-phase commit
or rollback on all sessions
will be coordinated.

TGlobalCoordinator© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.30.2.1 TGlobalCoordinator Enumeration

Specifies with what distributed transaction, perform two-phase commit or rollback on all
sessions will be coordinated.

Unit
OraTransaction

SyntaxTGlobalCoordinator = (gcInternal, gcMTS);

ValuesValue
gcInternal
gcMTS© 1997-2019
Devart. All Rights
Reserved.

Meaning
Transaction will be coordinated by the transaction component
internally.
Transaction will be coordinated by Microsoft Transaction Server
DTC.
Request Support

DAC Forum

Provide Feedback© 2019 DevartReference

5.31

1356

VirtualDataSet
This unit contains implementation of the TVirtualDataSet component.

ClassesName

Description
A base class forrepresentation of arbitrary
data in tabular form.
Dataset that processes
arbitrary non-tabular data.

TCustomVirtualDataSet
TVirtualDataSet

Types
Name

Description
This type is used for the
E:Devart.Dac.TVirtualDataS
et.OnDeleteRecord event.
This type is used for the
E:Devart.Dac.TVirtualDataS
et.OnGetFieldValue event.
This type is used for the
E:Devart.Dac.TVirtualDataS
et.OnGetRecordCount
event.
This type is used for
E:Devart.Dac.TVirtualDataS
et.OnInsertRecord andE:Devart.Dac.TVirtualDataS
et.OnModifyRecord events.

TOnDeleteRecordEvent

TOnGetFieldValueEvent

TOnGetRecordCountEvent

TOnModifyRecordEvent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.31.1 Classes
Classes in the VirtualDataSet unit.

ClassesName

Description

TCustomVirtualDataSet

A base class forrepresentation of arbitrary© 2019 Devart1357

Oracle Data Access Components

data in tabular form.
Dataset that processes
arbitrary non-tabular data.

TVirtualDataSet© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.31.1.1 TCustomVirtualDataSet ClassA base class for representation of arbitrary data in tabular form.
For a list of all members of this type, see TCustomVirtualDataSet members.

Unit
VirtualDataSet

SyntaxTCustomVirtualDataSet = class(TMemDataSet);

Inheritance Hierarchy
TMemDataSet
TCustomVirtualDataSet© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.31.1.1.1 Members

TCustomVirtualDataSet class overview.

Properties
Name
CachedUpdates (inherited from TMemDataSet)

IndexFieldNames (inherited from TMemDataSet)

KeyExclusive (inherited from TMemDataSet)
LocalConstraints (inherited from TMemDataSet)

Description
Used to enable or disable
the use of cached updates
for a dataset.
Used to get or set the list offields on which the recordset
is sorted.
Specifies the upper andlower boundaries for arange.
Used to avoid setting the© 2019 DevartReference

LocalUpdate (inherited from TMemDataSet)

Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

1358

Required property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)

CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)

CommitUpdates (inherited from TMemDataSet)
DeferredPost (inherited from TMemDataSet)
EditRangeEnd (inherited from TMemDataSet)

EditRangeStart (inherited from TMemDataSet)© 2019 Devart

Description
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.
Clears the cached updates
buffer.
Makes permanent changes
to the database server.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.

1359

Oracle Data Access Components

GetBlob (inherited from TMemDataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Prepare (inherited from TMemDataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)

SaveToXML (inherited from TMemDataSet)

SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

UnPrepare (inherited from TMemDataSet)

Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Allocates resources andcreates field components fora dataset.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Frees the resources
allocated for a previously
prepared query on the© 2019 DevartReference

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

1360

server and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

EventsName
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)© 1997-2019
Devart. All Rights
Reserved.

Request Support

Description
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.

DAC Forum

Provide Feedback

5.31.1.2 TVirtualDataSet Class

Dataset that processes arbitrary non-tabular data.
For a list of all members of this type, see TVirtualDataSet members.

Unit
VirtualDataSet

SyntaxTVirtualDataSet = class(TCustomVirtualDataSet);

Inheritance Hierarchy
TMemDataSet
TCustomVirtualDataSet
TVirtualDataSet© 1997-2019© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1361

Oracle Data Access Components

Devart. All Rights
Reserved.
5.31.1.2.1 Members

TVirtualDataSet class overview.

Properties
Name
CachedUpdates (inherited from TMemDataSet)

IndexFieldNames (inherited from TMemDataSet)

KeyExclusive (inherited from TMemDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

Description
Used to enable or disable
the use of cached updates
for a dataset.
Used to get or set the list offields on which the recordset
is sorted.
Specifies the upper andlower boundaries for arange.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
ApplyRange (inherited from TMemDataSet)

Description
Applies a range to thedataset.

© 2019 DevartReference

ApplyUpdates (inherited from TMemDataSet)

CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)

CommitUpdates (inherited from TMemDataSet)
DeferredPost (inherited from TMemDataSet)
EditRangeEnd (inherited from TMemDataSet)

EditRangeStart (inherited from TMemDataSet)

GetBlob (inherited from TMemDataSet)

Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Prepare (inherited from TMemDataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)© 2019 Devart

1362

Overloaded. Writes
dataset's pending cachedupdates to a database.
Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.
Clears the cached updates
buffer.
Makes permanent changes
to the database server.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Allocates resources andcreates field components fora dataset.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.

1363

Oracle Data Access Components

SaveToXML (inherited from TMemDataSet)

SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

Overloaded. Saves thecurrent dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

EventsName
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)© 1997-2019
Devart. All Rights

Request Support

DAC Forum

Description
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Provide Feedback© 2019 DevartReference

1364

Reserved.
5.31.2 Types
Types in the VirtualDataSet unit.

Types
Name

Description
This type is used for the
E:Devart.Dac.TVirtualDataS
et.OnDeleteRecord event.
This type is used for the
E:Devart.Dac.TVirtualDataS
et.OnGetFieldValue event.
This type is used for the
E:Devart.Dac.TVirtualDataS
et.OnGetRecordCount
event.
This type is used for
E:Devart.Dac.TVirtualDataS
et.OnInsertRecord andE:Devart.Dac.TVirtualDataS
et.OnModifyRecord events.

TOnDeleteRecordEvent

TOnGetFieldValueEvent

TOnGetRecordCountEvent

TOnModifyRecordEvent© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.31.2.1 TOnDeleteRecordEvent Procedure ReferenceThis type is used for the E:Devart.Dac.TVirtualDataSet.OnDeleteRecord event.

Unit
VirtualDataSet

SyntaxTOnDeleteRecordEvent = procedure (Sender: TObject; RecNo:
Integer) of object;Parameters
SenderAn object that raised the event.
RecNo
Number of the record being deleted.
© 2019 Devart1365

Oracle Data Access Components© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.31.2.2 TOnGetFieldValueEvent Procedure ReferenceThis type is used for the E:Devart.Dac.TVirtualDataSet.OnGetFieldValue event.

Unit
VirtualDataSet

SyntaxTOnGetFieldValueEvent = procedure (Sender: TObject; Field: TField;
RecNo: Integer; out Value: Variant) of object;Parameters
SenderAn object that raised the event.
Field
The field, which data has to be returned.
RecNo
The number of the record, which data has to be returned.
Value
Requested field value.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.31.2.3 TOnGetRecordCountEvent Procedure ReferenceThis type is used for the E:Devart.Dac.TVirtualDataSet.OnGetRecordCount event.

Unit
VirtualDataSet

SyntaxTOnGetRecordCountEvent = procedure (Sender: TObject; out Count:Integer) of object;Parameters
SenderAn object that raised the event.

© 2019 DevartReference

1366

Count
The number of records that the virtual dataset will contain.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.31.2.4 TOnModifyRecordEvent Procedure ReferenceThis type is used for E:Devart.Dac.TVirtualDataSet.OnInsertRecord andE:Devart.Dac.TVirtualDataSet.OnModifyRecord events.

Unit
VirtualDataSet

SyntaxTOnModifyRecordEvent = procedure (Sender: TObject; var RecNo:
Integer) of object;Parameters
SenderAn object that raised the event.
RecNo
Number of the record being inserted or modified.

© 1997-2019
Devart. All Rights
Reserved.

5.32

Request Support

DAC Forum

Provide Feedback

VirtualTable
This unit contains implementation of the TVirtualTable component.

ClassesName

Description
Dataset that stores data inmemory. This component isplaced on the Data Accesspage of the Component
palette.

TVirtualTable© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback

1367

Oracle Data Access Components

5.32.1 Classes
Classes in the VirtualTable unit.

ClassesName

Description
Dataset that stores data inmemory. This component isplaced on the Data Accesspage of the Component
palette.

TVirtualTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.32.1.1 TVirtualTable Class

Dataset that stores data in memory. This component is placed on the Data Access page of
the Component palette.
For a list of all members of this type, see TVirtualTable members.

Unit
VirtualTable

SyntaxTVirtualTable = class(TMemDataSet);

Inheritance Hierarchy
TMemDataSet
TVirtualTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.32.1.1.1 Members

TVirtualTable class overview.

Properties
Name

Description© 2019 DevartReference

CachedUpdates (inherited from TMemDataSet)

DefaultSortType
IndexFieldNames (inherited from TMemDataSet)

KeyExclusive (inherited from TMemDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

1368

Used to enable or disable
the use of cached updates
for a dataset.
Used to determine thedefault type of local sortingfor string fields.
Used to get or set the list offields on which the recordset
is sorted.
Specifies the upper andlower boundaries for arange.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Methods
Name
ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)

Assign© 2019 Devart

Description
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Copies fields and data fromanother TDataSet
component.

1369

Oracle Data Access Components

CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)

CommitUpdates (inherited from TMemDataSet)
DeferredPost (inherited from TMemDataSet)
EditRangeEnd (inherited from TMemDataSet)

EditRangeStart (inherited from TMemDataSet)

GetBlob (inherited from TMemDataSet)

LoadFromFile
Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Prepare (inherited from TMemDataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)
SaveToXML (inherited from TMemDataSet)

Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.
Clears the cached updates
buffer.
Makes permanent changes
to the database server.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Loads data from file into a
TVirtualTable component.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Allocates resources andcreates field components fora dataset.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Overloaded. Saves the© 2019 DevartReference

SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

1370

current dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

EventsName
OnUpdateError (inherited from TMemDataSet)

OnUpdateRecord (inherited from TMemDataSet)© 1997-2019
Devart. All Rights
Reserved.
© 2019 Devart

Request Support

DAC Forum

Description
Occurs when an exception is
generated while cachedupdates are applied to a
database.
Occurs when a single
update component can nothandle the updates.
Provide Feedback

1371

Oracle Data Access Components

5.32.1.1.2 Properties

Properties of the TVirtualTable class.
For a complete list of the TVirtualTable class members, see the TVirtualTable Members
topic.

PublicName
CachedUpdates (inherited from TMemDataSet)

IndexFieldNames (inherited from TMemDataSet)

KeyExclusive (inherited from TMemDataSet)

LocalConstraints (inherited from TMemDataSet)

LocalUpdate (inherited from TMemDataSet)

Prepared (inherited from TMemDataSet)
Ranged (inherited from TMemDataSet)

UpdateRecordTypes (inherited from TMemDataSet)

UpdatesPending (inherited from TMemDataSet)

Description
Used to enable or disable
the use of cached updates
for a dataset.
Used to get or set the list offields on which the recordset
is sorted.
Specifies the upper andlower boundaries for arange.
Used to avoid setting theRequired property of a
TField component for NOT
NULL fields at the time of
opening TMemDataSet.
Used to prevent implicit
update of rows on databaseserver.
Determines whether a queryis prepared for execution ornot.
Indicates whether a range isapplied to a dataset.
Used to indicate the update
status for the current record
when cached updates areenabled.
Used to check the status of
the cached updates buffer.

Published
Name
DefaultSortType

Description
Used to determine thedefault type of local sortingfor string fields.
© 2019 DevartReference

1372

See Also
TVirtualTable Class
TVirtualTable Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.32.1.1.2.1 DefaultSortType Property

Used to determine the default type of local sorting for string fields.

Class
TVirtualTable

Syntaxproperty DefaultSortType: TSortType default stCaseSensitive;

Remarks
The DefaultSortType property is used when a sort type is not specified explicitly after the fieldname in the TMemDataSet.IndexFieldNames property of a dataset.

© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.32.1.1.3 Methods

Methods of the TVirtualTable class.
For a complete list of the TVirtualTable class members, see the TVirtualTable Members
topic.

PublicName
ApplyRange (inherited from TMemDataSet)
ApplyUpdates (inherited from TMemDataSet)

Assign© 2019 Devart

Description
Applies a range to thedataset.
Overloaded. Writes
dataset's pending cachedupdates to a database.
Copies fields and data fromanother TDataSet
component.

1373

Oracle Data Access Components

CancelRange (inherited from TMemDataSet)

CancelUpdates (inherited from TMemDataSet)

CommitUpdates (inherited from TMemDataSet)
DeferredPost (inherited from TMemDataSet)
EditRangeEnd (inherited from TMemDataSet)

EditRangeStart (inherited from TMemDataSet)

GetBlob (inherited from TMemDataSet)

LoadFromFile
Locate (inherited from TMemDataSet)

LocateEx (inherited from TMemDataSet)

Prepare (inherited from TMemDataSet)

RestoreUpdates (inherited from TMemDataSet)

RevertRecord (inherited from TMemDataSet)
SaveToXML (inherited from TMemDataSet)

Removes any ranges
currently in effect for adataset.
Clears all pending cachedupdates from cache andrestores dataset in its priorstate.
Clears the cached updates
buffer.
Makes permanent changes
to the database server.
Enables changing theending value for an existing
range.
Enables changing thestarting value for an existing
range.
Overloaded. Retrieves
TBlob object for a field or
current record when only its
name or the field itself isknown.
Loads data from file into a
TVirtualTable component.
Overloaded. Searches adataset for a specific recordand positions the cursor onit.
Overloaded. Excludes
features that don't need to
be included to the
TMemDataSet.Locate
method of TDataSet.
Allocates resources andcreates field components fora dataset.
Marks all records in thecache of updates asunapplied.
Cancels changes made to
the current record whencached updates areenabled.
Overloaded. Saves the© 2019 DevartReference

SetRange (inherited from TMemDataSet)

SetRangeEnd (inherited from TMemDataSet)

SetRangeStart (inherited from TMemDataSet)

UnPrepare (inherited from TMemDataSet)

UpdateResult (inherited from TMemDataSet)

UpdateStatus (inherited from TMemDataSet)

1374

current dataset data to a fileor a stream in the XML
format compatible with ADO
format.
Sets the starting and ending
values of a range, andapplies it.
Indicates that subsequentassignments to field values
specify the end of the rangeof rows to include in thedataset.
Indicates that subsequentassignments to field values
specify the start of the rangeof rows to include in thedataset.
Frees the resources
allocated for a previously
prepared query on theserver and client sides.
Reads the status of thelatest call to the
ApplyUpdates method whilecached updates areenabled.
Indicates the current update
status for the dataset whencached updates areenabled.

See Also
TVirtualTable Class
TVirtualTable Class Members© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

5.32.1.1.3.1 Assign Method

Copies fields and data from another TDataSet component.

Class
TVirtualTable© 2019 Devart

Provide Feedback

1375

Oracle Data Access Components

Syntax
procedure Assign(Source: TPersistent); override;
Parameters
SourceHolds the TDataSet component to copy fields and data from.

Remarks
Call the Assign method to copy fields and data from another TDataSet component.
Note: Unsupported field types are skipped (i.e. destination dataset will contain less fields than
the source one). This may happen when Source is not a TVirtualTable component but someserver-oriented dataset.

ExampleQuery1.SQL.Text := 'SELECT * FROM DEPT';
Query1.Active := True;
VirtualTable1.Assign(Query1);
VirtualTable1.Active := True;
OraQuery1.SQL.Text := 'SELECT * FROM DEPT';
OraQuery1.Active := True;
VirtualTable1.Assign(OraQuery1);
VirtualTable1.Active := True;

See Also
TVirtualTable© 1997-2019
Devart. All Rights
Reserved.

Request Support

DAC Forum

Provide Feedback

5.32.1.1.3.2 LoadFromFile Method

Loads data from file into a TVirtualTable component.

Class
TVirtualTable

Syntax
procedure LoadFromFile(const FileName: string; LoadFields:
boolean = True; DecodeHTMLEntities: boolean = True);
Parameters
FileName© 2019 DevartReference

1376

Holds the name of the file to load data from.
LoadFields
Indicates whether to load fields from the file.
DecodeHTMLEntities

Remarks
Call the LoadFromFile method to load data from file into a TVirtualTable component. Specify
the name of the file to load into the field as the value of the FileName parameter.This file may
be an XML document in ADO-compatible format or in virtual table data format. File format will
be detected automatically.

© 1997-2019
Devart. All Rights
Reserved.

© 2019 Devart

Request Support

DAC Forum

Provide Feedback