zeoslib  UNKNOWN
 All Files
ZPlainAdo.pas
Go to the documentation of this file.
1 {@********************************************************}
2 { Copyright (c) 1999-2012 Zeos Development Group }
3 { }
4 { License Agreement: }
5 { }
6 { This library is distributed in the hope that it will be }
7 { useful, but WITHOUT ANY WARRANTY; without even the }
8 { implied warranty of MERCHANTABILITY or FITNESS FOR }
9 { A PARTICULAR PURPOSE. See the GNU Lesser General }
10 { Public License for more details. }
11 { }
12 { The source code of the ZEOS Libraries and packages are }
13 { distributed under the Library GNU General Public }
14 { License (see the file COPYING / COPYING.ZEOS) }
15 { with the following modification: }
16 { As a special exception, the copyright holders of this }
17 { library give you permission to link this library with }
18 { independent modules to produce an executable, }
19 { regardless of the license terms of these independent }
20 { modules, and to copy and distribute the resulting }
21 { executable under terms of your choice, provided that }
22 { you also meet, for each linked independent module, }
23 { the terms and conditions of the license of that module. }
24 { An independent module is a module which is not derived }
25 { from or based on this library. If you modify this }
26 { library, you may extend this exception to your version }
27 { of the library, but you are not obligated to do so. }
28 { If you do not wish to do so, delete this exception }
29 { statement from your version. }
30 { }
31 { }
32 { The project web site is located on: }
33 { http://zeos.firmos.at (FORUM) }
34 { http://sourceforge.net/p/zeoslib/tickets/ (BUGTRACKER)}
35 { svn://svn.code.sf.net/p/zeoslib/code-0/trunk (SVN) }
36 { }
37 { http://www.sourceforge.net/projects/zeoslib. }
38 { }
39 { }
40 { Zeos Development Group. }
41 {********************************************************@}
42 
43 unit ZPlainAdo;
44 
45 // ************************************************************************ //
46 // WARNING
47 // -------
48 // The types declared in this file were generated from data read from a
49 // Type Library. If this type library is explicitly or indirectly (via
50 // another type library referring to this type library) re-imported, or the
51 // 'Refresh' command of the Type Library Editor activated while editing the
52 // Type Library, the contents of this file will be regenerated and all
53 // manual modifications will be lost.
54 // ************************************************************************ //
55 
56 // PASTLWTR : $Revision: 1.9 $
57 // File generated on 2003.07.12. 17.11.28 from Type Library described below.
58 
59 // ************************************************************************ //
60 // Type Lib: C:\Program Files\Common Files\System\ado\msado15.dll (1)
61 // LIBID: {EF53050B-882E-4776-B643-EDA472E8E3F2}
62 // LCID: 0
63 // Helpfile: C:\WINDOWS\HELP\ado270.chm
64 // DepndLst:
65 // (1) v2.0 stdole, (C:\WINDOWS\System32\stdole2.tlb)
66 // (2) v4.0 StdVCL, (C:\WINDOWS\System32\stdvcl40.dll)
67 // Errors:
68 // Hint: TypeInfo 'Property' changed to 'Property_'
69 // Hint: TypeInfo 'Record' changed to 'Record_'
70 // Hint: Parameter 'Object' of _DynaCollection.Append changed to 'Object_'
71 // Hint: Member 'Type' of 'Property' changed to 'Type_'
72 // Hint: Parameter 'Type' of Command15.CreateParameter changed to 'Type_'
73 // Hint: Parameter 'Type' of Fields20._Append changed to 'Type_'
74 // Hint: Parameter 'Type' of Fields.Append changed to 'Type_'
75 // Hint: Member 'Type' of 'Field20' changed to 'Type_'
76 // Hint: Member 'Type' of '_Parameter' changed to 'Type_'
77 // Hint: Member 'Type' of '_Stream' changed to 'Type_'
78 // Hint: Member 'Type' of 'Field15' changed to 'Type_'
79 // ************************************************************************ //
80 {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
81 {$WRITEABLECONST ON}
82 //{$HPPEMIT '#undef EOF'}
83 interface
84 
85 {$I ZPlain.inc}
86 
87 uses Windows, Classes, ActiveX;
88 
89 
90 // *********************************************************************//
91 // GUIDS declared in the TypeLibrary. Following prefixes are used:
92 // Type Libraries : LIBID_xxxx
93 // CoClasses : CLASS_xxxx
94 // DISPInterfaces : DIID_xxxx
95 // Non-DISP interfaces: IID_xxxx
96 // *********************************************************************//
97 const
98  // TypeLibrary Major and minor versions
99  ADODBMajorVersion = 2;
100  ADODBMinorVersion = 7;
101 
102  LIBID_ADODB: TGUID = '{EF53050B-882E-4776-B643-EDA472E8E3F2}';
103 
104  IID__Collection: TGUID = '{00000512-0000-0010-8000-00AA006D2EA4}';
105  IID__DynaCollection: TGUID = '{00000513-0000-0010-8000-00AA006D2EA4}';
106  IID__ADO: TGUID = '{00000534-0000-0010-8000-00AA006D2EA4}';
107  IID_Properties: TGUID = '{00000504-0000-0010-8000-00AA006D2EA4}';
108  IID_Property_: TGUID = '{00000503-0000-0010-8000-00AA006D2EA4}';
109  IID_Error: TGUID = '{00000500-0000-0010-8000-00AA006D2EA4}';
110  IID_Errors: TGUID = '{00000501-0000-0010-8000-00AA006D2EA4}';
111  IID_Command15: TGUID = '{00000508-0000-0010-8000-00AA006D2EA4}';
112  IID_Connection15: TGUID = '{00000515-0000-0010-8000-00AA006D2EA4}';
113  IID__Connection: TGUID = '{00000550-0000-0010-8000-00AA006D2EA4}';
114  IID_Recordset15: TGUID = '{0000050E-0000-0010-8000-00AA006D2EA4}';
115  IID_Recordset20: TGUID = '{0000054F-0000-0010-8000-00AA006D2EA4}';
116  IID_Recordset21: TGUID = '{00000555-0000-0010-8000-00AA006D2EA4}';
117  IID__Recordset: TGUID = '{00000556-0000-0010-8000-00AA006D2EA4}';
118  IID_Fields15: TGUID = '{00000506-0000-0010-8000-00AA006D2EA4}';
119  IID_Fields20: TGUID = '{0000054D-0000-0010-8000-00AA006D2EA4}';
120  IID_Fields: TGUID = '{00000564-0000-0010-8000-00AA006D2EA4}';
121  IID_Field20: TGUID = '{0000054C-0000-0010-8000-00AA006D2EA4}';
122  IID_Field: TGUID = '{00000569-0000-0010-8000-00AA006D2EA4}';
123  IID__Parameter: TGUID = '{0000050C-0000-0010-8000-00AA006D2EA4}';
124  IID_Parameters: TGUID = '{0000050D-0000-0010-8000-00AA006D2EA4}';
125  IID_Command25: TGUID = '{0000054E-0000-0010-8000-00AA006D2EA4}';
126  IID__Command: TGUID = '{B08400BD-F9D1-4D02-B856-71D5DBA123E9}';
127  IID_ConnectionEventsVt: TGUID = '{00000402-0000-0010-8000-00AA006D2EA4}';
128  IID_RecordsetEventsVt: TGUID = '{00000403-0000-0010-8000-00AA006D2EA4}';
129  DIID_ConnectionEvents: TGUID = '{00000400-0000-0010-8000-00AA006D2EA4}';
130  DIID_RecordsetEvents: TGUID = '{00000266-0000-0010-8000-00AA006D2EA4}';
131  IID_ADOConnectionConstruction15: TGUID = '{00000516-0000-0010-8000-00AA006D2EA4}';
132  IID_ADOConnectionConstruction: TGUID = '{00000551-0000-0010-8000-00AA006D2EA4}';
133  CLASS_Connection: TGUID = '{00000514-0000-0010-8000-00AA006D2EA4}';
134  IID__Record: TGUID = '{00000562-0000-0010-8000-00AA006D2EA4}';
135  CLASS_Record_: TGUID = '{00000560-0000-0010-8000-00AA006D2EA4}';
136  IID__Stream: TGUID = '{00000565-0000-0010-8000-00AA006D2EA4}';
137  CLASS_Stream: TGUID = '{00000566-0000-0010-8000-00AA006D2EA4}';
138  IID_ADORecordConstruction: TGUID = '{00000567-0000-0010-8000-00AA006D2EA4}';
139  IID_ADOStreamConstruction: TGUID = '{00000568-0000-0010-8000-00AA006D2EA4}';
140  IID_ADOCommandConstruction: TGUID = '{00000517-0000-0010-8000-00AA006D2EA4}';
141  CLASS_Command: TGUID = '{00000507-0000-0010-8000-00AA006D2EA4}';
142  CLASS_Recordset: TGUID = '{00000535-0000-0010-8000-00AA006D2EA4}';
143  IID_ADORecordsetConstruction: TGUID = '{00000283-0000-0010-8000-00AA006D2EA4}';
144  IID_Field15: TGUID = '{00000505-0000-0010-8000-00AA006D2EA4}';
145  CLASS_Parameter: TGUID = '{0000050B-0000-0010-8000-00AA006D2EA4}';
146 
147 // *********************************************************************//
148 // Declaration of Enumerations defined in Type Library
149 // *********************************************************************//
150 // Constants for enum CursorTypeEnum
151 type
152  CursorTypeEnum = TOleEnum;
153 const
154  adOpenUnspecified = $FFFFFFFF;
155  adOpenForwardOnly = $00000000;
156  adOpenKeyset = $00000001;
157  adOpenDynamic = $00000002;
158  adOpenStatic = $00000003;
159 
160 // Constants for enum CursorOptionEnum
161 type
162  CursorOptionEnum = TOleEnum;
163 const
164  adHoldRecords = $00000100;
165  adMovePrevious = $00000200;
166  adAddNew = $01000400;
167  adDelete = $01000800;
168  adUpdate = $01008000;
169  adBookmark = $00002000;
170  adApproxPosition = $00004000;
171  adUpdateBatch = $00010000;
172  adResync = $00020000;
173  adNotify = $00040000;
174  adFind = $00080000;
175  adSeek = $00400000;
176  adIndex = $00800000;
177 
178 // Constants for enum LockTypeEnum
179 type
180  LockTypeEnum = TOleEnum;
181 const
182  adLockUnspecified = $FFFFFFFF;
183  adLockReadOnly = $00000001;
184  adLockPessimistic = $00000002;
185  adLockOptimistic = $00000003;
186  adLockBatchOptimistic = $00000004;
187 
188 // Constants for enum ExecuteOptionEnum
189 type
190  ExecuteOptionEnum = TOleEnum;
191 const
192  adOptionUnspecified = $FFFFFFFF;
193  adAsyncExecute = $00000010;
194  adAsyncFetch = $00000020;
195  adAsyncFetchNonBlocking = $00000040;
196  adExecuteNoRecords = $00000080;
197  adExecuteStream = $00000400;
198  adExecuteRecord = $00000800;
199 
200 // Constants for enum ConnectOptionEnum
201 type
202  ConnectOptionEnum = TOleEnum;
203 const
204  adConnectUnspecified = $FFFFFFFF;
205  adAsyncConnect = $00000010;
206 
207 // Constants for enum ObjectStateEnum
208 type
209  ObjectStateEnum = TOleEnum;
210 const
211  adStateClosed = $00000000;
212  adStateOpen = $00000001;
213  adStateConnecting = $00000002;
214  adStateExecuting = $00000004;
215  adStateFetching = $00000008;
216 
217 // Constants for enum CursorLocationEnum
218 type
219  CursorLocationEnum = TOleEnum;
220 const
221  adUseNone = $00000001;
222  adUseServer = $00000002;
223  adUseClient = $00000003;
224  adUseClientBatch = $00000003;
225 
226 // Constants for enum DataTypeEnum
227 type
228  DataTypeEnum = TOleEnum;
229 const
230  adEmpty = $00000000;
231  adTinyInt = $00000010;
232  adSmallInt = $00000002;
233  adInteger = $00000003;
234  adBigInt = $00000014;
235  adUnsignedTinyInt = $00000011;
236  adUnsignedSmallInt = $00000012;
237  adUnsignedInt = $00000013;
238  adUnsignedBigInt = $00000015;
239  adSingle = $00000004;
240  adDouble = $00000005;
241  adCurrency = $00000006;
242  adDecimal = $0000000E;
243  adNumeric = $00000083;
244  adBoolean = $0000000B;
245  adError = $0000000A;
246  adUserDefined = $00000084;
247  adVariant = $0000000C;
248  adIDispatch = $00000009;
249  adIUnknown = $0000000D;
250  adGUID = $00000048;
251  adDate = $00000007;
252  adDBDate = $00000085;
253  adDBTime = $00000086;
254  adDBTimeStamp = $00000087;
255  adBSTR = $00000008;
256  adChar = $00000081;
257  adVarChar = $000000C8;
258  adLongVarChar = $000000C9;
259  adWChar = $00000082;
260  adVarWChar = $000000CA;
261  adLongVarWChar = $000000CB;
262  adBinary = $00000080;
263  adVarBinary = $000000CC;
264  adLongVarBinary = $000000CD;
265  adChapter = $00000088;
266  adFileTime = $00000040;
267  adPropVariant = $0000008A;
268  adVarNumeric = $0000008B;
269  adArray = $00002000;
270 
271 // Constants for enum FieldAttributeEnum
272 type
273  FieldAttributeEnum = TOleEnum;
274 const
275  adFldUnspecified = $FFFFFFFF;
276  adFldMayDefer = $00000002;
277  adFldUpdatable = $00000004;
278  adFldUnknownUpdatable = $00000008;
279  adFldFixed = $00000010;
280  adFldIsNullable = $00000020;
281  adFldMayBeNull = $00000040;
282  adFldLong = $00000080;
283  adFldRowID = $00000100;
284  adFldRowVersion = $00000200;
285  adFldCacheDeferred = $00001000;
286  adFldIsChapter = $00002000;
287  adFldNegativeScale = $00004000;
288  adFldKeyColumn = $00008000;
289  adFldIsRowURL = $00010000;
290  adFldIsDefaultStream = $00020000;
291  adFldIsCollection = $00040000;
292 
293 // Constants for enum EditModeEnum
294 type
295  EditModeEnum = TOleEnum;
296 const
297  adEditNone = $00000000;
298  adEditInProgress = $00000001;
299  adEditAdd = $00000002;
300  adEditDelete = $00000004;
301 
302 // Constants for enum RecordStatusEnum
303 type
304  RecordStatusEnum = TOleEnum;
305 const
306  adRecOK = $00000000;
307  adRecNew = $00000001;
308  adRecModified = $00000002;
309  adRecDeleted = $00000004;
310  adRecUnmodified = $00000008;
311  adRecInvalid = $00000010;
312  adRecMultipleChanges = $00000040;
313  adRecPendingChanges = $00000080;
314  adRecCanceled = $00000100;
315  adRecCantRelease = $00000400;
316  adRecConcurrencyViolation = $00000800;
317  adRecIntegrityViolation = $00001000;
318  adRecMaxChangesExceeded = $00002000;
319  adRecObjectOpen = $00004000;
320  adRecOutOfMemory = $00008000;
321  adRecPermissionDenied = $00010000;
322  adRecSchemaViolation = $00020000;
323  adRecDBDeleted = $00040000;
324 
325 // Constants for enum GetRowsOptionEnum
326 type
327  GetRowsOptionEnum = TOleEnum;
328 const
329  adGetRowsRest = $FFFFFFFF;
330 
331 // Constants for enum PositionEnum
332 type
333  PositionEnum = TOleEnum;
334 const
335  adPosUnknown = $FFFFFFFF;
336  adPosBOF = $FFFFFFFE;
337  adPosEOF = $FFFFFFFD;
338 
339 // Constants for enum BookmarkEnum
340 type
341  BookmarkEnum = TOleEnum;
342 const
343  adBookmarkCurrent = $00000000;
344  adBookmarkFirst = $00000001;
345  adBookmarkLast = $00000002;
346 
347 // Constants for enum MarshalOptionsEnum
348 type
349  MarshalOptionsEnum = TOleEnum;
350 const
351  adMarshalAll = $00000000;
352  adMarshalModifiedOnly = $00000001;
353 
354 // Constants for enum AffectEnum
355 type
356  AffectEnum = TOleEnum;
357 const
358  adAffectCurrent = $00000001;
359  adAffectGroup = $00000002;
360  adAffectAll = $00000003;
361  adAffectAllChapters = $00000004;
362 
363 // Constants for enum ResyncEnum
364 type
365  ResyncEnum = TOleEnum;
366 const
367  adResyncUnderlyingValues = $00000001;
368  adResyncAllValues = $00000002;
369 
370 // Constants for enum CompareEnum
371 type
372  CompareEnum = TOleEnum;
373 const
374  adCompareLessThan = $00000000;
375  adCompareEqual = $00000001;
376  adCompareGreaterThan = $00000002;
377  adCompareNotEqual = $00000003;
378  adCompareNotComparable = $00000004;
379 
380 // Constants for enum FilterGroupEnum
381 type
382  FilterGroupEnum = TOleEnum;
383 const
384  adFilterNone = $00000000;
385  adFilterPendingRecords = $00000001;
386  adFilterAffectedRecords = $00000002;
387  adFilterFetchedRecords = $00000003;
388  adFilterPredicate = $00000004;
389  adFilterConflictingRecords = $00000005;
390 
391 // Constants for enum SearchDirectionEnum
392 type
393  SearchDirectionEnum = TOleEnum;
394 const
395  adSearchForward = $00000001;
396  adSearchBackward = $FFFFFFFF;
397 
398 // Constants for enum PersistFormatEnum
399 type
400  PersistFormatEnum = TOleEnum;
401 const
402  adPersistADTG = $00000000;
403  adPersistXML = $00000001;
404 
405 // Constants for enum StringFormatEnum
406 type
407  StringFormatEnum = TOleEnum;
408 const
409  adClipString = $00000002;
410 
411 // Constants for enum ConnectPromptEnum
412 type
413  ConnectPromptEnum = TOleEnum;
414 const
415  adPromptAlways = $00000001;
416  adPromptComplete = $00000002;
417  adPromptCompleteRequired = $00000003;
418  adPromptNever = $00000004;
419 
420 // Constants for enum ConnectModeEnum
421 type
422  ConnectModeEnum = TOleEnum;
423 const
424  adModeUnknown = $00000000;
425  adModeRead = $00000001;
426  adModeWrite = $00000002;
427  adModeReadWrite = $00000003;
428  adModeShareDenyRead = $00000004;
429  adModeShareDenyWrite = $00000008;
430  adModeShareExclusive = $0000000C;
431  adModeShareDenyNone = $00000010;
432  adModeRecursive = $00400000;
433 
434 // Constants for enum RecordCreateOptionsEnum
435 type
436  RecordCreateOptionsEnum = TOleEnum;
437 const
438  adCreateCollection = $00002000;
439  adCreateStructDoc = $80000000;
440  adCreateNonCollection = $00000000;
441  adOpenIfExists = $02000000;
442  adCreateOverwrite = $04000000;
443  adFailIfNotExists = $FFFFFFFF;
444 
445 // Constants for enum RecordOpenOptionsEnum
446 type
447  RecordOpenOptionsEnum = TOleEnum;
448 const
449  adOpenRecordUnspecified = $FFFFFFFF;
450  adOpenSource = $00800000;
451  adOpenOutput = $00800000;
452  adOpenAsync = $00001000;
453  adDelayFetchStream = $00004000;
454  adDelayFetchFields = $00008000;
455  adOpenExecuteCommand = $00010000;
456 
457 // Constants for enum IsolationLevelEnum
458 type
459  IsolationLevelEnum = TOleEnum;
460 const
461  adXactUnspecified = $FFFFFFFF;
462  adXactChaos = $00000010;
463  adXactReadUncommitted = $00000100;
464  adXactBrowse = $00000100;
465  adXactCursorStability = $00001000;
466  adXactReadCommitted = $00001000;
467  adXactRepeatableRead = $00010000;
468  adXactSerializable = $00100000;
469  adXactIsolated = $00100000;
470 
471 // Constants for enum XactAttributeEnum
472 type
473  XactAttributeEnum = TOleEnum;
474 const
475  adXactCommitRetaining = $00020000;
476  adXactAbortRetaining = $00040000;
477  adXactAsyncPhaseOne = $00080000;
478  adXactSyncPhaseOne = $00100000;
479 
480 // Constants for enum PropertyAttributesEnum
481 type
482  PropertyAttributesEnum = TOleEnum;
483 const
484  adPropNotSupported = $00000000;
485  adPropRequired = $00000001;
486  adPropOptional = $00000002;
487  adPropRead = $00000200;
488  adPropWrite = $00000400;
489 
490 // Constants for enum ErrorValueEnum
491 type
492  ErrorValueEnum = TOleEnum;
493 const
494  adErrProviderFailed = $00000BB8;
495  adErrInvalidArgument = $00000BB9;
496  adErrOpeningFile = $00000BBA;
497  adErrReadFile = $00000BBB;
498  adErrWriteFile = $00000BBC;
499  adErrNoCurrentRecord = $00000BCD;
500  adErrIllegalOperation = $00000C93;
501  adErrCantChangeProvider = $00000C94;
502  adErrInTransaction = $00000CAE;
503  adErrFeatureNotAvailable = $00000CB3;
504  adErrItemNotFound = $00000CC1;
505  adErrObjectInCollection = $00000D27;
506  adErrObjectNotSet = $00000D5C;
507  adErrDataConversion = $00000D5D;
508  adErrObjectClosed = $00000E78;
509  adErrObjectOpen = $00000E79;
510  adErrProviderNotFound = $00000E7A;
511  adErrBoundToCommand = $00000E7B;
512  adErrInvalidParamInfo = $00000E7C;
513  adErrInvalidConnection = $00000E7D;
514  adErrNotReentrant = $00000E7E;
515  adErrStillExecuting = $00000E7F;
516  adErrOperationCancelled = $00000E80;
517  adErrStillConnecting = $00000E81;
518  adErrInvalidTransaction = $00000E82;
519  adErrNotExecuting = $00000E83;
520  adErrUnsafeOperation = $00000E84;
521  adwrnSecurityDialog = $00000E85;
522  adwrnSecurityDialogHeader = $00000E86;
523  adErrIntegrityViolation = $00000E87;
524  adErrPermissionDenied = $00000E88;
525  adErrDataOverflow = $00000E89;
526  adErrSchemaViolation = $00000E8A;
527  adErrSignMismatch = $00000E8B;
528  adErrCantConvertvalue = $00000E8C;
529  adErrCantCreate = $00000E8D;
530  adErrColumnNotOnThisRow = $00000E8E;
531  adErrURLDoesNotExist = $00000E8F;
532  adErrTreePermissionDenied = $00000E90;
533  adErrInvalidURL = $00000E91;
534  adErrResourceLocked = $00000E92;
535  adErrResourceExists = $00000E93;
536  adErrCannotComplete = $00000E94;
537  adErrVolumeNotFound = $00000E95;
538  adErrOutOfSpace = $00000E96;
539  adErrResourceOutOfScope = $00000E97;
540  adErrUnavailable = $00000E98;
541  adErrURLNamedRowDoesNotExist = $00000E99;
542  adErrDelResOutOfScope = $00000E9A;
543  adErrPropInvalidColumn = $00000E9B;
544  adErrPropInvalidOption = $00000E9C;
545  adErrPropInvalidValue = $00000E9D;
546  adErrPropConflicting = $00000E9E;
547  adErrPropNotAllSettable = $00000E9F;
548  adErrPropNotSet = $00000EA0;
549  adErrPropNotSettable = $00000EA1;
550  adErrPropNotSupported = $00000EA2;
551  adErrCatalogNotSet = $00000EA3;
552  adErrCantChangeConnection = $00000EA4;
553  adErrFieldsUpdateFailed = $00000EA5;
554  adErrDenyNotSupported = $00000EA6;
555  adErrDenyTypeNotSupported = $00000EA7;
556  adErrProviderNotSpecified = $00000EA9;
557 
558 // Constants for enum ParameterAttributesEnum
559 type
560  ParameterAttributesEnum = TOleEnum;
561 const
562  adParamSigned = $00000010;
563  adParamNullable = $00000040;
564  adParamLong = $00000080;
565 
566 // Constants for enum ParameterDirectionEnum
567 type
568  ParameterDirectionEnum = TOleEnum;
569 const
570  adParamUnknown = $00000000;
571  adParamInput = $00000001;
572  adParamOutput = $00000002;
573  adParamInputOutput = $00000003;
574  adParamReturnValue = $00000004;
575 
576 // Constants for enum CommandTypeEnum
577 type
578  CommandTypeEnum = TOleEnum;
579 const
580  adCmdUnspecified = $FFFFFFFF;
581  adCmdUnknown = $00000008;
582  adCmdText = $00000001;
583  adCmdTable = $00000002;
584  adCmdStoredProc = $00000004;
585  adCmdFile = $00000100;
586  adCmdTableDirect = $00000200;
587 
588 // Constants for enum EventStatusEnum
589 type
590  EventStatusEnum = TOleEnum;
591 const
592  adStatusOK = $00000001;
593  adStatusErrorsOccurred = $00000002;
594  adStatusCantDeny = $00000003;
595  adStatusCancel = $00000004;
596  adStatusUnwantedEvent = $00000005;
597 
598 // Constants for enum EventReasonEnum
599 type
600  EventReasonEnum = TOleEnum;
601 const
602  adRsnAddNew = $00000001;
603  adRsnDelete = $00000002;
604  adRsnUpdate = $00000003;
605  adRsnUndoUpdate = $00000004;
606  adRsnUndoAddNew = $00000005;
607  adRsnUndoDelete = $00000006;
608  adRsnRequery = $00000007;
609  adRsnResynch = $00000008;
610  adRsnClose = $00000009;
611  adRsnMove = $0000000A;
612  adRsnFirstChange = $0000000B;
613  adRsnMoveFirst = $0000000C;
614  adRsnMoveNext = $0000000D;
615  adRsnMovePrevious = $0000000E;
616  adRsnMoveLast = $0000000F;
617 
618 // Constants for enum SchemaEnum
619 type
620  SchemaEnum = TOleEnum;
621 const
622  adSchemaProviderSpecific = $FFFFFFFF;
623  adSchemaAsserts = $00000000;
624  adSchemaCatalogs = $00000001;
625  adSchemaCharacterSets = $00000002;
626  adSchemaCollations = $00000003;
627  adSchemaColumns = $00000004;
628  adSchemaCheckConstraints = $00000005;
629  adSchemaConstraintColumnUsage = $00000006;
630  adSchemaConstraintTableUsage = $00000007;
631  adSchemaKeyColumnUsage = $00000008;
632  adSchemaReferentialContraints = $00000009;
633  adSchemaReferentialConstraints = $00000009;
634  adSchemaTableConstraints = $0000000A;
635  adSchemaColumnsDomainUsage = $0000000B;
636  adSchemaIndexes = $0000000C;
637  adSchemaColumnPrivileges = $0000000D;
638  adSchemaTablePrivileges = $0000000E;
639  adSchemaUsagePrivileges = $0000000F;
640  adSchemaProcedures = $00000010;
641  adSchemaSchemata = $00000011;
642  adSchemaSQLLanguages = $00000012;
643  adSchemaStatistics = $00000013;
644  adSchemaTables = $00000014;
645  adSchemaTranslations = $00000015;
646  adSchemaProviderTypes = $00000016;
647  adSchemaViews = $00000017;
648  adSchemaViewColumnUsage = $00000018;
649  adSchemaViewTableUsage = $00000019;
650  adSchemaProcedureParameters = $0000001A;
651  adSchemaForeignKeys = $0000001B;
652  adSchemaPrimaryKeys = $0000001C;
653  adSchemaProcedureColumns = $0000001D;
654  adSchemaDBInfoKeywords = $0000001E;
655  adSchemaDBInfoLiterals = $0000001F;
656  adSchemaCubes = $00000020;
657  adSchemaDimensions = $00000021;
658  adSchemaHierarchies = $00000022;
659  adSchemaLevels = $00000023;
660  adSchemaMeasures = $00000024;
661  adSchemaProperties = $00000025;
662  adSchemaMembers = $00000026;
663  adSchemaTrustees = $00000027;
664  adSchemaFunctions = $00000028;
665  adSchemaActions = $00000029;
666  adSchemaCommands = $0000002A;
667  adSchemaSets = $0000002B;
668 
669 // Constants for enum FieldStatusEnum
670 type
671  FieldStatusEnum = TOleEnum;
672 const
673  adFieldOK = $00000000;
674  adFieldCantConvertValue = $00000002;
675  adFieldIsNull = $00000003;
676  adFieldTruncated = $00000004;
677  adFieldSignMismatch = $00000005;
678  adFieldDataOverflow = $00000006;
679  adFieldCantCreate = $00000007;
680  adFieldUnavailable = $00000008;
681  adFieldPermissionDenied = $00000009;
682  adFieldIntegrityViolation = $0000000A;
683  adFieldSchemaViolation = $0000000B;
684  adFieldBadStatus = $0000000C;
685  adFieldDefault = $0000000D;
686  adFieldIgnore = $0000000F;
687  adFieldDoesNotExist = $00000010;
688  adFieldInvalidURL = $00000011;
689  adFieldResourceLocked = $00000012;
690  adFieldResourceExists = $00000013;
691  adFieldCannotComplete = $00000014;
692  adFieldVolumeNotFound = $00000015;
693  adFieldOutOfSpace = $00000016;
694  adFieldCannotDeleteSource = $00000017;
695  adFieldReadOnly = $00000018;
696  adFieldResourceOutOfScope = $00000019;
697  adFieldAlreadyExists = $0000001A;
698  adFieldPendingInsert = $00010000;
699  adFieldPendingDelete = $00020000;
700  adFieldPendingChange = $00040000;
701  adFieldPendingUnknown = $00080000;
702  adFieldPendingUnknownDelete = $00100000;
703 
704 // Constants for enum SeekEnum
705 type
706  SeekEnum = TOleEnum;
707 const
708  adSeekFirstEQ = $00000001;
709  adSeekLastEQ = $00000002;
710  adSeekAfterEQ = $00000004;
711  adSeekAfter = $00000008;
712  adSeekBeforeEQ = $00000010;
713  adSeekBefore = $00000020;
714 
715 // Constants for enum ADCPROP_UPDATECRITERIA_ENUM
716 type
717  ADCPROP_UPDATECRITERIA_ENUM = TOleEnum;
718 const
719  adCriteriaKey = $00000000;
720  adCriteriaAllCols = $00000001;
721  adCriteriaUpdCols = $00000002;
722  adCriteriaTimeStamp = $00000003;
723 
724 // Constants for enum ADCPROP_ASYNCTHREADPRIORITY_ENUM
725 type
726  ADCPROP_ASYNCTHREADPRIORITY_ENUM = TOleEnum;
727 const
728  adPriorityLowest = $00000001;
729  adPriorityBelowNormal = $00000002;
730  adPriorityNormal = $00000003;
731  adPriorityAboveNormal = $00000004;
732  adPriorityHighest = $00000005;
733 
734 // Constants for enum ADCPROP_AUTORECALC_ENUM
735 type
736  ADCPROP_AUTORECALC_ENUM = TOleEnum;
737 const
738  adRecalcUpFront = $00000000;
739  adRecalcAlways = $00000001;
740 
741 // Constants for enum ADCPROP_UPDATERESYNC_ENUM
742 type
743  ADCPROP_UPDATERESYNC_ENUM = TOleEnum;
744 const
745  adResyncNone = $00000000;
746  adResyncAutoIncrement = $00000001;
747  adResyncConflicts = $00000002;
748  adResyncUpdates = $00000004;
749  adResyncInserts = $00000008;
750  adResyncAll = $0000000F;
751 
752 // Constants for enum MoveRecordOptionsEnum
753 type
754  MoveRecordOptionsEnum = TOleEnum;
755 const
756  adMoveUnspecified = $FFFFFFFF;
757  adMoveOverWrite = $00000001;
758  adMoveDontUpdateLinks = $00000002;
759  adMoveAllowEmulation = $00000004;
760 
761 // Constants for enum CopyRecordOptionsEnum
762 type
763  CopyRecordOptionsEnum = TOleEnum;
764 const
765  adCopyUnspecified = $FFFFFFFF;
766  adCopyOverWrite = $00000001;
767  adCopyAllowEmulation = $00000004;
768  adCopyNonRecursive = $00000002;
769 
770 // Constants for enum StreamTypeEnum
771 type
772  StreamTypeEnum = TOleEnum;
773 const
774  adTypeBinary = $00000001;
775  adTypeText = $00000002;
776 
777 // Constants for enum LineSeparatorEnum
778 type
779  LineSeparatorEnum = TOleEnum;
780 const
781  adLF = $0000000A;
782  adCR = $0000000D;
783  adCRLF = $FFFFFFFF;
784 
785 // Constants for enum StreamOpenOptionsEnum
786 type
787  StreamOpenOptionsEnum = TOleEnum;
788 const
789  adOpenStreamUnspecified = $FFFFFFFF;
790  adOpenStreamAsync = $00000001;
791  adOpenStreamFromRecord = $00000004;
792 
793 // Constants for enum StreamWriteEnum
794 type
795  StreamWriteEnum = TOleEnum;
796 const
797  adWriteChar = $00000000;
798  adWriteLine = $00000001;
799  stWriteChar = $00000000;
800  stWriteLine = $00000001;
801 
802 // Constants for enum SaveOptionsEnum
803 type
804  SaveOptionsEnum = TOleEnum;
805 const
806  adSaveCreateNotExist = $00000001;
807  adSaveCreateOverWrite = $00000002;
808 
809 // Constants for enum FieldEnum
810 type
811  FieldEnum = TOleEnum;
812 const
813  adDefaultStream = $FFFFFFFF;
814  adRecordURL = $FFFFFFFE;
815 
816 // Constants for enum StreamReadEnum
817 type
818  StreamReadEnum = TOleEnum;
819 const
820  adReadAll = $FFFFFFFF;
821  adReadLine = $FFFFFFFE;
822 
823 // Constants for enum RecordTypeEnum
824 type
825  RecordTypeEnum = TOleEnum;
826 const
827  adSimpleRecord = $00000000;
828  adCollectionRecord = $00000001;
829  adStructDoc = $00000002;
830 
831 type
832 
833 // *********************************************************************//
834 // Forward declaration of types defined in TypeLibrary
835 // *********************************************************************//
836  _Collection = interface;
837  _DynaCollection = interface;
838  _ADO = interface;
839  Properties = interface;
840  Property_ = interface;
841  Error = interface;
842  Errors = interface;
843  Command15 = interface;
844  Connection15 = interface;
845  _Connection = interface;
846  Recordset15 = interface;
847  Recordset20 = interface;
848  Recordset21 = interface;
849  _Recordset = interface;
850  Fields15 = interface;
851  Fields20 = interface;
852  Fields = interface;
853  Field20 = interface;
854  Field = interface;
855  _Parameter = interface;
856  Parameters = interface;
857  Command25 = interface;
858  _Command = interface;
859  ConnectionEventsVt = interface;
860  RecordsetEventsVt = interface;
861  ADOConnectionConstruction15 = interface;
862  ADOConnectionConstruction = interface;
863  _Record = interface;
864  _Stream = interface;
865  ADORecordConstruction = interface;
866  ADOStreamConstruction = interface;
867  ADOCommandConstruction = interface;
868  ADORecordsetConstruction = interface;
869  Field15 = interface;
870 
871 
872 
873 // *********************************************************************//
874 // Declaration of structures, unions and aliases.
875 // *********************************************************************//
876  POleVariant1 = ^OleVariant; {*}
877 
878  PositionEnum_Param = PositionEnum;
879  SearchDirection = SearchDirectionEnum;
880  ADO_LONGPTR = Integer;
881 
882 // *********************************************************************//
883 // Interface: _Collection
884 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
885 // GUID: {00000512-0000-0010-8000-00AA006D2EA4}
886 // *********************************************************************//
887  _Collection = interface(IDispatch)
888  ['{00000512-0000-0010-8000-00AA006D2EA4}']
889  function Get_Count: Integer; safecall;
890  function _NewEnum: IUnknown; safecall;
891  procedure Refresh; safecall;
892  property Count: Integer read Get_Count;
893  end;
894 
895 // *********************************************************************//
896 // Interface: _DynaCollection
897 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
898 // GUID: {00000513-0000-0010-8000-00AA006D2EA4}
899 // *********************************************************************//
900  _DynaCollection = interface(_Collection)
901  ['{00000513-0000-0010-8000-00AA006D2EA4}']
902  procedure Append(const Object_: IDispatch); safecall;
903  procedure Delete(Index: OleVariant); safecall;
904  end;
905 
906 // *********************************************************************//
907 // Interface: _ADO
908 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
909 // GUID: {00000534-0000-0010-8000-00AA006D2EA4}
910 // *********************************************************************//
911  _ADO = interface(IDispatch)
912  ['{00000534-0000-0010-8000-00AA006D2EA4}']
913  function Get_Properties: Properties; safecall;
914  property Properties: Properties read Get_Properties;
915  end;
916 
917 // *********************************************************************//
918 // Interface: Properties
919 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
920 // GUID: {00000504-0000-0010-8000-00AA006D2EA4}
921 // *********************************************************************//
922  Properties = interface(_Collection)
923  ['{00000504-0000-0010-8000-00AA006D2EA4}']
924  function Get_Item(Index: OleVariant): Property_; safecall;
925  property Item[Index: OleVariant]: Property_ read Get_Item; default;
926  end;
927 
928 // *********************************************************************//
929 // Interface: Property_
930 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
931 // GUID: {00000503-0000-0010-8000-00AA006D2EA4}
932 // *********************************************************************//
933  Property_ = interface(IDispatch)
934  ['{00000503-0000-0010-8000-00AA006D2EA4}']
935  function Get_Value: OleVariant; safecall;
936  procedure Set_Value(pval: OleVariant); safecall;
937  function Get_Name: WideString; safecall;
938  function Get_Type_: DataTypeEnum; safecall;
939  function Get_Attributes: Integer; safecall;
940  procedure Set_Attributes(plAttributes: Integer); safecall;
941  property Value: OleVariant read Get_Value write Set_Value;
942  property Name: WideString read Get_Name;
943  property Type_: DataTypeEnum read Get_Type_;
944  property Attributes: Integer read Get_Attributes;
945  end;
946 
947 // *********************************************************************//
948 // Interface: Error
949 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
950 // GUID: {00000500-0000-0010-8000-00AA006D2EA4}
951 // *********************************************************************//
952  Error = interface(IDispatch)
953  ['{00000500-0000-0010-8000-00AA006D2EA4}']
954  function Get_Number: Integer; safecall;
955  function Get_Source: WideString; safecall;
956  function Get_Description: WideString; safecall;
957  function Get_HelpFile: WideString; safecall;
958  function Get_HelpContext: Integer; safecall;
959  function Get_SQLState: WideString; safecall;
960  function Get_NativeError: Integer; safecall;
961  property Number: Integer read Get_Number;
962  property Source: WideString read Get_Source;
963  property Description: WideString read Get_Description;
964  property HelpFile: WideString read Get_HelpFile;
965  property HelpContext: Integer read Get_HelpContext;
966  property SQLState: WideString read Get_SQLState;
967  property NativeError: Integer read Get_NativeError;
968  end;
969 
970 // *********************************************************************//
971 // Interface: Errors
972 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
973 // GUID: {00000501-0000-0010-8000-00AA006D2EA4}
974 // *********************************************************************//
975  Errors = interface(_Collection)
976  ['{00000501-0000-0010-8000-00AA006D2EA4}']
977  function Get_Item(Index: OleVariant): Error; safecall;
978  procedure Clear; safecall;
979  property Item[Index: OleVariant]: Error read Get_Item; default;
980  end;
981 
982 // *********************************************************************//
983 // Interface: Command15
984 // Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
985 // GUID: {00000508-0000-0010-8000-00AA006D2EA4}
986 // *********************************************************************//
987  Command15 = interface(_ADO)
988  ['{00000508-0000-0010-8000-00AA006D2EA4}']
989  function Get_ActiveConnection: Connection15; safecall;
990  procedure _Set_ActiveConnection(const ppvObject: Connection15); safecall;
991  procedure Set_ActiveConnection(ppvObject: OleVariant); safecall;
992  function Get_CommandText: WideString; safecall;
993  procedure Set_CommandText(const pbstr: WideString); safecall;
994  function Get_CommandTimeout: Integer; safecall;
995  procedure Set_CommandTimeout(pl: Integer); safecall;
996  function Get_Prepared: WordBool; safecall;
997  procedure Set_Prepared(pfPrepared: WordBool); safecall;
998  function Execute(out RecordsAffected: OleVariant; const Parameters: OleVariant; Options: Integer): Recordset15; safecall;
999  function CreateParameter(const Name: WideString; Type_: DataTypeEnum;
1000  Direction: ParameterDirectionEnum; Size: ADO_LONGPTR; Value: OleVariant): _Parameter; safecall;
1001  function Get_Parameters: Parameters; safecall;
1002  procedure Set_CommandType(plCmdType: CommandTypeEnum); safecall;
1003  function Get_CommandType: CommandTypeEnum; safecall;
1004  function Get_Name: WideString; safecall;
1005  procedure Set_Name(const pbstrName: WideString); safecall;
1006  property CommandText: WideString read Get_CommandText write Set_CommandText;
1007  property CommandTimeout: Integer read Get_CommandTimeout write Set_CommandTimeout;
1008  property Prepared: WordBool read Get_Prepared write Set_Prepared;
1009  property Parameters: Parameters read Get_Parameters;
1010  property CommandType: CommandTypeEnum read Get_CommandType write Set_CommandType;
1011  property Name: WideString read Get_Name write Set_Name;
1012  end;
1013 
1014 // *********************************************************************//
1015 // Interface: Connection15
1016 // Flags: (4432) Hidden Dual OleAutomation Dispatchable
1017 // GUID: {00000515-0000-0010-8000-00AA006D2EA4}
1018 // *********************************************************************//
1019  Connection15 = interface(_ADO)
1020  ['{00000515-0000-0010-8000-00AA006D2EA4}']
1021  function Get_ConnectionString: WideString; safecall;
1022  procedure Set_ConnectionString(const pbstr: WideString); safecall;
1023  function Get_CommandTimeout: Integer; safecall;
1024  procedure Set_CommandTimeout(plTimeout: Integer); safecall;
1025  function Get_ConnectionTimeout: Integer; safecall;
1026  procedure Set_ConnectionTimeout(plTimeout: Integer); safecall;
1027  function Get_Version: WideString; safecall;
1028  procedure Close; safecall;
1029  function Execute(const CommandText: WideString; out RecordsAffected: OleVariant;
1030  Options: Integer): Recordset15; safecall;
1031  function BeginTrans: Integer; safecall;
1032  procedure CommitTrans; safecall;
1033  procedure RollbackTrans; safecall;
1034  procedure Open(const ConnectionString: WideString; const UserID: WideString;
1035  const Password: WideString; Options: Integer); safecall;
1036  function Get_Errors: Errors; safecall;
1037  function Get_DefaultDatabase: WideString; safecall;
1038  procedure Set_DefaultDatabase(const pbstr: WideString); safecall;
1039  function Get_IsolationLevel: IsolationLevelEnum; safecall;
1040  procedure Set_IsolationLevel(Level: IsolationLevelEnum); safecall;
1041  function Get_Attributes: Integer; safecall;
1042  procedure Set_Attributes(plAttr: Integer); safecall;
1043  function Get_CursorLocation: CursorLocationEnum; safecall;
1044  procedure Set_CursorLocation(plCursorLoc: CursorLocationEnum); safecall;
1045  function Get_Mode: ConnectModeEnum; safecall;
1046  procedure Set_Mode(plMode: ConnectModeEnum); safecall;
1047  function Get_Provider: WideString; safecall;
1048  procedure Set_Provider(const pbstr: WideString); safecall;
1049  function Get_State: Integer; safecall;
1050  function OpenSchema(Schema: SchemaEnum; Restrictions: OleVariant; SchemaID: OleVariant): Recordset15; safecall;
1051  property ConnectionString: WideString read Get_ConnectionString write Set_ConnectionString;
1052  property CommandTimeout: Integer read Get_CommandTimeout write Set_CommandTimeout;
1053  property ConnectionTimeout: Integer read Get_ConnectionTimeout write Set_ConnectionTimeout;
1054  property Version: WideString read Get_Version;
1055  property Errors: Errors read Get_Errors;
1056  property DefaultDatabase: WideString read Get_DefaultDatabase write Set_DefaultDatabase;
1057  property IsolationLevel: IsolationLevelEnum read Get_IsolationLevel write Set_IsolationLevel;
1058  property Attributes: Integer read Get_Attributes write Set_Attributes;
1059  property CursorLocation: CursorLocationEnum read Get_CursorLocation write Set_CursorLocation;
1060  property Mode: ConnectModeEnum read Get_Mode write Set_Mode;
1061  property Provider: WideString read Get_Provider write Set_Provider;
1062  property State: Integer read Get_State;
1063  end;
1064 
1065 // *********************************************************************//
1066 // Interface: _Connection
1067 // Flags: (4416) Dual OleAutomation Dispatchable
1068 // GUID: {00000550-0000-0010-8000-00AA006D2EA4}
1069 // *********************************************************************//
1070  _Connection = interface(Connection15)
1071  ['{00000550-0000-0010-8000-00AA006D2EA4}']
1072  procedure Cancel; safecall;
1073  end;
1074 
1075 // *********************************************************************//
1076 // Interface: Recordset15
1077 // Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
1078 // GUID: {0000050E-0000-0010-8000-00AA006D2EA4}
1079 // *********************************************************************//
1080  Recordset15 = interface(_ADO)
1081  ['{0000050E-0000-0010-8000-00AA006D2EA4}']
1082  function Get_AbsolutePosition: PositionEnum_Param; safecall;
1083  procedure Set_AbsolutePosition(pl: PositionEnum_Param); safecall;
1084  procedure _Set_ActiveConnection(const pvar: IDispatch); safecall;
1085  procedure Set_ActiveConnection(pvar: OleVariant); safecall;
1086  function Get_ActiveConnection: OleVariant; safecall;
1087  function Get_BOF: WordBool; safecall;
1088  function Get_Bookmark: OleVariant; safecall;
1089  procedure Set_Bookmark(pvBookmark: OleVariant); safecall;
1090  function Get_CacheSize: Integer; safecall;
1091  procedure Set_CacheSize(pl: Integer); safecall;
1092  function Get_CursorType: CursorTypeEnum; safecall;
1093  procedure Set_CursorType(plCursorType: CursorTypeEnum); safecall;
1094  function Get_EOF: WordBool; safecall;
1095  function Get_Fields: Fields15; safecall;
1096  function Get_LockType: LockTypeEnum; safecall;
1097  procedure Set_LockType(plLockType: LockTypeEnum); safecall;
1098  function Get_MaxRecords: ADO_LONGPTR; safecall;
1099  procedure Set_MaxRecords(plMaxRecords: ADO_LONGPTR); safecall;
1100  function Get_RecordCount: ADO_LONGPTR; safecall;
1101  procedure _Set_Source(const pvSource: IDispatch); safecall;
1102  procedure Set_Source(const pvSource: WideString); safecall;
1103  function Get_Source: OleVariant; safecall;
1104  procedure AddNew(FieldList: OleVariant; Values: OleVariant); safecall;
1105  procedure CancelUpdate; safecall;
1106  procedure Close; safecall;
1107  procedure Delete(AffectRecords: AffectEnum); safecall;
1108  function GetRows(Rows: Integer; Start: OleVariant; Fields: OleVariant): OleVariant; safecall;
1109  procedure Move(NumRecords: ADO_LONGPTR; Start: OleVariant); safecall;
1110  procedure MoveNext; safecall;
1111  procedure MovePrevious; safecall;
1112  procedure MoveFirst; safecall;
1113  procedure MoveLast; safecall;
1114  procedure Open(Source: OleVariant; ActiveConnection: OleVariant; CursorType: CursorTypeEnum;
1115  LockType: LockTypeEnum; Options: Integer); safecall;
1116  procedure Requery(Options: Integer); safecall;
1117  procedure _xResync(AffectRecords: AffectEnum); safecall;
1118  procedure Update(Fields: OleVariant; Values: OleVariant); safecall;
1119  function Get_AbsolutePage: PositionEnum_Param; safecall;
1120  procedure Set_AbsolutePage(pl: PositionEnum_Param); safecall;
1121  function Get_EditMode: EditModeEnum; safecall;
1122  function Get_Filter: OleVariant; safecall;
1123  procedure Set_Filter(Criteria: OleVariant); safecall;
1124  function Get_PageCount: ADO_LONGPTR; safecall;
1125  function Get_PageSize: Integer; safecall;
1126  procedure Set_PageSize(pl: Integer); safecall;
1127  function Get_Sort: WideString; safecall;
1128  procedure Set_Sort(const Criteria: WideString); safecall;
1129  function Get_Status: Integer; safecall;
1130  function Get_State: Integer; safecall;
1131  function _xClone: Recordset15; safecall;
1132  procedure UpdateBatch(AffectRecords: AffectEnum); safecall;
1133  procedure CancelBatch(AffectRecords: AffectEnum); safecall;
1134  function Get_CursorLocation: CursorLocationEnum; safecall;
1135  procedure Set_CursorLocation(plCursorLoc: CursorLocationEnum); safecall;
1136  function NextRecordset(out RecordsAffected: OleVariant): Recordset15; safecall;
1137  function Supports(CursorOptions: CursorOptionEnum): WordBool; safecall;
1138  function Get_Collect(Index: OleVariant): OleVariant; safecall;
1139  procedure Set_Collect(Index: OleVariant; pvar: OleVariant); safecall;
1140  function Get_MarshalOptions: MarshalOptionsEnum; safecall;
1141  procedure Set_MarshalOptions(peMarshal: MarshalOptionsEnum); safecall;
1142  procedure Find(const Criteria: WideString; SkipRecords: ADO_LONGPTR;
1143  SearchDirection: SearchDirectionEnum; Start: OleVariant); safecall;
1144  property AbsolutePosition: PositionEnum_Param read Get_AbsolutePosition write Set_AbsolutePosition;
1145  property Bof: WordBool read Get_BOF;
1146  property Bookmark: OleVariant read Get_Bookmark write Set_Bookmark;
1147  property CacheSize: Integer read Get_CacheSize write Set_CacheSize;
1148  property CursorType: CursorTypeEnum read Get_CursorType write Set_CursorType;
1149  property Eof: WordBool read Get_EOF;
1150  property Fields: Fields15 read Get_Fields;
1151  property LockType: LockTypeEnum read Get_LockType write Set_LockType;
1152  property MaxRecords: ADO_LONGPTR read Get_MaxRecords write Set_MaxRecords;
1153  property RecordCount: ADO_LONGPTR read Get_RecordCount;
1154  property AbsolutePage: PositionEnum_Param read Get_AbsolutePage write Set_AbsolutePage;
1155  property EditMode: EditModeEnum read Get_EditMode;
1156  property Filter: OleVariant read Get_Filter write Set_Filter;
1157  property PageCount: ADO_LONGPTR read Get_PageCount;
1158  property PageSize: Integer read Get_PageSize write Set_PageSize;
1159  property Sort: WideString read Get_Sort write Set_Sort;
1160  property Status: Integer read Get_Status;
1161  property State: Integer read Get_State;
1162  property CursorLocation: CursorLocationEnum read Get_CursorLocation write Set_CursorLocation;
1163  property Collect[Index: OleVariant]: OleVariant read Get_Collect write Set_Collect;
1164  property MarshalOptions: MarshalOptionsEnum read Get_MarshalOptions write Set_MarshalOptions;
1165  end;
1166 
1167 // *********************************************************************//
1168 // Interface: Recordset20
1169 // Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
1170 // GUID: {0000054F-0000-0010-8000-00AA006D2EA4}
1171 // *********************************************************************//
1172  Recordset20 = interface(Recordset15)
1173  ['{0000054F-0000-0010-8000-00AA006D2EA4}']
1174  procedure Cancel; safecall;
1175  function Get_DataSource: IUnknown; safecall;
1176  procedure _Set_DataSource(const ppunkDataSource: IUnknown); safecall;
1177  procedure _xSave(const FileName: WideString; PersistFormat: PersistFormatEnum); safecall;
1178  function Get_ActiveCommand: IDispatch; safecall;
1179  procedure Set_StayInSync(pbStayInSync: WordBool); safecall;
1180  function Get_StayInSync: WordBool; safecall;
1181  function GetString(StringFormat: StringFormatEnum; NumRows: Integer;
1182  const ColumnDelimeter: WideString; const RowDelimeter: WideString;
1183  const NullExpr: WideString): WideString; safecall;
1184  function Get_DataMember: WideString; safecall;
1185  procedure Set_DataMember(const pbstrDataMember: WideString); safecall;
1186  function CompareBookmarks(Bookmark1: OleVariant; Bookmark2: OleVariant): CompareEnum; safecall;
1187  function Clone(LockType: LockTypeEnum): Recordset15; safecall;
1188  procedure Resync(AffectRecords: AffectEnum; ResyncValues: ResyncEnum); safecall;
1189  property DataSource: IUnknown read Get_DataSource write _Set_DataSource;
1190  property ActiveCommand: IDispatch read Get_ActiveCommand;
1191  property StayInSync: WordBool read Get_StayInSync write Set_StayInSync;
1192  property DataMember: WideString read Get_DataMember write Set_DataMember;
1193  end;
1194 
1195 // *********************************************************************//
1196 // Interface: Recordset21
1197 // Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
1198 // GUID: {00000555-0000-0010-8000-00AA006D2EA4}
1199 // *********************************************************************//
1200  Recordset21 = interface(Recordset20)
1201  ['{00000555-0000-0010-8000-00AA006D2EA4}']
1202  procedure Seek(KeyValues: OleVariant; SeekOption: SeekEnum); safecall;
1203  procedure Set_Index(const pbstrIndex: WideString); safecall;
1204  function Get_Index: WideString; safecall;
1205  property Index: WideString read Get_Index write Set_Index;
1206  end;
1207 
1208 // *********************************************************************//
1209 // Interface: _Recordset
1210 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
1211 // GUID: {00000556-0000-0010-8000-00AA006D2EA4}
1212 // *********************************************************************//
1213  _Recordset = interface(Recordset21)
1214  ['{00000556-0000-0010-8000-00AA006D2EA4}']
1215  procedure Save(Destination: OleVariant; PersistFormat: PersistFormatEnum); safecall;
1216  end;
1217 
1218 // *********************************************************************//
1219 // Interface: Fields15
1220 // Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
1221 // GUID: {00000506-0000-0010-8000-00AA006D2EA4}
1222 // *********************************************************************//
1223  Fields15 = interface(_Collection)
1224  ['{00000506-0000-0010-8000-00AA006D2EA4}']
1225  function Get_Item(Index: OleVariant): Field20; safecall;
1226  property Item[Index: OleVariant]: Field20 read Get_Item; default;
1227  end;
1228 
1229 // *********************************************************************//
1230 // Interface: Fields20
1231 // Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
1232 // GUID: {0000054D-0000-0010-8000-00AA006D2EA4}
1233 // *********************************************************************//
1234  Fields20 = interface(Fields15)
1235  ['{0000054D-0000-0010-8000-00AA006D2EA4}']
1236  procedure _Append(const Name: WideString; Type_: DataTypeEnum; DefinedSize: ADO_LONGPTR;
1237  Attrib: FieldAttributeEnum); safecall;
1238  procedure Delete(Index: OleVariant); safecall;
1239  end;
1240 
1241 // *********************************************************************//
1242 // Interface: Fields
1243 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
1244 // GUID: {00000564-0000-0010-8000-00AA006D2EA4}
1245 // *********************************************************************//
1246  Fields = interface(Fields20)
1247  ['{00000564-0000-0010-8000-00AA006D2EA4}']
1248  procedure Append(const Name: WideString; Type_: DataTypeEnum; DefinedSize: ADO_LONGPTR;
1249  Attrib: FieldAttributeEnum; FieldValue: OleVariant); safecall;
1250  procedure Update; safecall;
1251  procedure Resync(ResyncValues: ResyncEnum); safecall;
1252  procedure CancelUpdate; safecall;
1253  end;
1254 
1255 // *********************************************************************//
1256 // Interface: Field20
1257 // Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
1258 // GUID: {0000054C-0000-0010-8000-00AA006D2EA4}
1259 // *********************************************************************//
1260  Field20 = interface(_ADO)
1261  ['{0000054C-0000-0010-8000-00AA006D2EA4}']
1262  function Get_ActualSize: ADO_LONGPTR; safecall;
1263  function Get_Attributes: Integer; safecall;
1264  function Get_DefinedSize: ADO_LONGPTR; safecall;
1265  function Get_Name: WideString; safecall;
1266  function Get_Type_: DataTypeEnum; safecall;
1267  function Get_Value: OleVariant; safecall;
1268  procedure Set_Value(pvar: OleVariant); safecall;
1269  function Get_Precision: Byte; safecall;
1270  function Get_NumericScale: Byte; safecall;
1271  procedure AppendChunk(Data: OleVariant); safecall;
1272  function GetChunk(Length: Integer): OleVariant; safecall;
1273  function Get_OriginalValue: OleVariant; safecall;
1274  function Get_UnderlyingValue: OleVariant; safecall;
1275  function Get_DataFormat: IUnknown; safecall;
1276  procedure _Set_DataFormat(const ppiDF: IUnknown); safecall;
1277  procedure Set_Precision(pbPrecision: Byte); safecall;
1278  procedure Set_NumericScale(pbNumericScale: Byte); safecall;
1279  procedure Set_Type_(pDataType: DataTypeEnum); safecall;
1280  procedure Set_DefinedSize(pl: ADO_LONGPTR); safecall;
1281  procedure Set_Attributes(pl: Integer); safecall;
1282  property ActualSize: ADO_LONGPTR read Get_ActualSize;
1283  property Attributes: Integer read Get_Attributes write Set_Attributes;
1284  property DefinedSize: ADO_LONGPTR read Get_DefinedSize write Set_DefinedSize;
1285  property Name: WideString read Get_Name;
1286  property Type_: DataTypeEnum read Get_Type_ write Set_Type_;
1287  property Value: OleVariant read Get_Value write Set_Value;
1288  property Precision: Byte read Get_Precision write Set_Precision;
1289  property NumericScale: Byte read Get_NumericScale write Set_NumericScale;
1290  property OriginalValue: OleVariant read Get_OriginalValue;
1291  property UnderlyingValue: OleVariant read Get_UnderlyingValue;
1292  property DataFormat: IUnknown read Get_DataFormat write _Set_DataFormat;
1293  end;
1294 
1295 // *********************************************************************//
1296 // Interface: Field
1297 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
1298 // GUID: {00000569-0000-0010-8000-00AA006D2EA4}
1299 // *********************************************************************//
1300  Field = interface(Field20)
1301  ['{00000569-0000-0010-8000-00AA006D2EA4}']
1302  function Get_Status: Integer; safecall;
1303  property Status: Integer read Get_Status;
1304  end;
1305 
1306 // *********************************************************************//
1307 // Interface: _Parameter
1308 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
1309 // GUID: {0000050C-0000-0010-8000-00AA006D2EA4}
1310 // *********************************************************************//
1311  _Parameter = interface(_ADO)
1312  ['{0000050C-0000-0010-8000-00AA006D2EA4}']
1313  function Get_Name: WideString; safecall;
1314  procedure Set_Name(const pbstr: WideString); safecall;
1315  function Get_Value: OleVariant; safecall;
1316  procedure Set_Value(pvar: OleVariant); safecall;
1317  function Get_Type_: DataTypeEnum; safecall;
1318  procedure Set_Type_(psDataType: DataTypeEnum); safecall;
1319  procedure Set_Direction(plParmDirection: ParameterDirectionEnum); safecall;
1320  function Get_Direction: ParameterDirectionEnum; safecall;
1321  procedure Set_Precision(pbPrecision: Byte); safecall;
1322  function Get_Precision: Byte; safecall;
1323  procedure Set_NumericScale(pbScale: Byte); safecall;
1324  function Get_NumericScale: Byte; safecall;
1325  procedure Set_Size(pl: ADO_LONGPTR); safecall;
1326  function Get_Size: ADO_LONGPTR; safecall;
1327  procedure AppendChunk(Val: OleVariant); safecall;
1328  function Get_Attributes: Integer; safecall;
1329  procedure Set_Attributes(plParmAttribs: Integer); safecall;
1330  property Name: WideString read Get_Name write Set_Name;
1331  property Value: OleVariant read Get_Value write Set_Value;
1332  property Type_: DataTypeEnum read Get_Type_ write Set_Type_;
1333  property Direction: ParameterDirectionEnum read Get_Direction write Set_Direction;
1334  property Precision: Byte read Get_Precision write Set_Precision;
1335  property NumericScale: Byte read Get_NumericScale write Set_NumericScale;
1336  property Size: ADO_LONGPTR read Get_Size write Set_Size;
1337  property Attributes: Integer read Get_Attributes write Set_Attributes;
1338  end;
1339 
1340 // *********************************************************************//
1341 // Interface: Parameters
1342 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
1343 // GUID: {0000050D-0000-0010-8000-00AA006D2EA4}
1344 // *********************************************************************//
1345  Parameters = interface(_DynaCollection)
1346  ['{0000050D-0000-0010-8000-00AA006D2EA4}']
1347  function Get_Item(Index: OleVariant): _Parameter; safecall;
1348  property Item[Index: OleVariant]: _Parameter read Get_Item; default;
1349  end;
1350 
1351 // *********************************************************************//
1352 // Interface: Command25
1353 // Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
1354 // GUID: {0000054E-0000-0010-8000-00AA006D2EA4}
1355 // *********************************************************************//
1356  Command25 = interface(Command15)
1357  ['{0000054E-0000-0010-8000-00AA006D2EA4}']
1358  function Get_State: Integer; safecall;
1359  procedure Cancel; safecall;
1360  property State: Integer read Get_State;
1361  end;
1362 
1363 // *********************************************************************//
1364 // Interface: _Command
1365 // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
1366 // GUID: {B08400BD-F9D1-4D02-B856-71D5DBA123E9}
1367 // *********************************************************************//
1368  _Command = interface(Command25)
1369  ['{B08400BD-F9D1-4D02-B856-71D5DBA123E9}']
1370  procedure _Set_CommandStream(const pvStream: IUnknown); safecall;
1371  function Get_CommandStream: OleVariant; safecall;
1372  procedure Set_Dialect(const pbstrDialect: WideString); safecall;
1373  function Get_Dialect: WideString; safecall;
1374  procedure Set_NamedParameters(pfNamedParameters: WordBool); safecall;
1375  function Get_NamedParameters: WordBool; safecall;
1376  property Dialect: WideString read Get_Dialect write Set_Dialect;
1377  property NamedParameters: WordBool read Get_NamedParameters write Set_NamedParameters;
1378  end;
1379 
1380 // *********************************************************************//
1381 // Interface: ConnectionEventsVt
1382 // Flags: (16) Hidden
1383 // GUID: {00000402-0000-0010-8000-00AA006D2EA4}
1384 // *********************************************************************//
1385  ConnectionEventsVt = interface(IUnknown)
1386  ['{00000402-0000-0010-8000-00AA006D2EA4}']
1387  function InfoMessage(const pError: Error; var adStatus: EventStatusEnum;
1388  const pConnection: Connection15): HResult; stdcall;
1389  function BeginTransComplete(TransactionLevel: Integer; const pError: Error;
1390  var adStatus: EventStatusEnum; const pConnection: Connection15): HResult; stdcall;
1391  function CommitTransComplete(const pError: Error; var adStatus: EventStatusEnum;
1392  const pConnection: Connection15): HResult; stdcall;
1393  function RollbackTransComplete(const pError: Error; var adStatus: EventStatusEnum;
1394  const pConnection: Connection15): HResult; stdcall;
1395  function WillExecute(var Source: WideString; var CursorType: CursorTypeEnum;
1396  var LockType: LockTypeEnum; var Options: Integer;
1397  var adStatus: EventStatusEnum; const pCommand: _Command;
1398  const pRecordset: Recordset15; const pConnection: Connection15): HResult; stdcall;
1399  function ExecuteComplete(RecordsAffected: Integer; const pError: Error;
1400  var adStatus: EventStatusEnum; const pCommand: _Command;
1401  const pRecordset: Recordset15; const pConnection: Connection15): HResult; stdcall;
1402  function WillConnect(var ConnectionString: WideString; var UserID: WideString;
1403  var Password: WideString; var Options: Integer;
1404  var adStatus: EventStatusEnum; const pConnection: Connection15): HResult; stdcall;
1405  function ConnectComplete(const pError: Error; var adStatus: EventStatusEnum;
1406  const pConnection: Connection15): HResult; stdcall;
1407  function Disconnect(var adStatus: EventStatusEnum; const pConnection: Connection15): HResult; stdcall;
1408  end;
1409 
1410 // *********************************************************************//
1411 // Interface: RecordsetEventsVt
1412 // Flags: (16) Hidden
1413 // GUID: {00000403-0000-0010-8000-00AA006D2EA4}
1414 // *********************************************************************//
1415  RecordsetEventsVt = interface(IUnknown)
1416  ['{00000403-0000-0010-8000-00AA006D2EA4}']
1417  function WillChangeField(cFields: Integer; Fields: OleVariant; var adStatus: EventStatusEnum;
1418  const pRecordset: Recordset15): HResult; stdcall;
1419  function FieldChangeComplete(cFields: Integer; Fields: OleVariant; const pError: Error;
1420  var adStatus: EventStatusEnum; const pRecordset: Recordset15): HResult; stdcall;
1421  function WillChangeRecord(adReason: EventReasonEnum; cRecords: Integer;
1422  var adStatus: EventStatusEnum; const pRecordset: Recordset15): HResult; stdcall;
1423  function RecordChangeComplete(adReason: EventReasonEnum; cRecords: Integer;
1424  const pError: Error; var adStatus: EventStatusEnum;
1425  const pRecordset: Recordset15): HResult; stdcall;
1426  function WillChangeRecordset(adReason: EventReasonEnum; var adStatus: EventStatusEnum;
1427  const pRecordset: Recordset15): HResult; stdcall;
1428  function RecordsetChangeComplete(adReason: EventReasonEnum; const pError: Error;
1429  var adStatus: EventStatusEnum; const pRecordset: Recordset15): HResult; stdcall;
1430  function WillMove(adReason: EventReasonEnum; var adStatus: EventStatusEnum;
1431  const pRecordset: Recordset15): HResult; stdcall;
1432  function MoveComplete(adReason: EventReasonEnum; const pError: Error;
1433  var adStatus: EventStatusEnum; const pRecordset: Recordset15): HResult; stdcall;
1434  function EndOfRecordset(var fMoreData: WordBool; var adStatus: EventStatusEnum;
1435  const pRecordset: Recordset15): HResult; stdcall;
1436  function FetchProgress(Progress: Integer; MaxProgress: Integer; var adStatus: EventStatusEnum;
1437  const pRecordset: Recordset15): HResult; stdcall;
1438  function FetchComplete(const pError: Error; var adStatus: EventStatusEnum;
1439  const pRecordset: Recordset15): HResult; stdcall;
1440  end;
1441 
1442 // *********************************************************************//
1443 // Interface: ADOConnectionConstruction15
1444 // Flags: (512) Restricted
1445 // GUID: {00000516-0000-0010-8000-00AA006D2EA4}
1446 // *********************************************************************//
1447  ADOConnectionConstruction15 = interface(IUnknown)
1448  ['{00000516-0000-0010-8000-00AA006D2EA4}']
1449  function Get_DSO(out ppDSO: IUnknown): HResult; stdcall;
1450  function Get_Session(out ppSession: IUnknown): HResult; stdcall;
1451  function WrapDSOandSession(const pDSO: IUnknown; const pSession: IUnknown): HResult; stdcall;
1452  end;
1453 
1454 // *********************************************************************//
1455 // Interface: ADOConnectionConstruction
1456 // Flags: (512) Restricted
1457 // GUID: {00000551-0000-0010-8000-00AA006D2EA4}
1458 // *********************************************************************//
1459  ADOConnectionConstruction = interface(ADOConnectionConstruction15)
1460  ['{00000551-0000-0010-8000-00AA006D2EA4}']
1461  end;
1462 
1463 // *********************************************************************//
1464 // Interface: _Record
1465 // Flags: (4432) Hidden Dual OleAutomation Dispatchable
1466 // GUID: {00000562-0000-0010-8000-00AA006D2EA4}
1467 // *********************************************************************//
1468  _Record = interface(_ADO)
1469  ['{00000562-0000-0010-8000-00AA006D2EA4}']
1470  function Get_ActiveConnection: OleVariant; safecall;
1471  procedure Set_ActiveConnection(const pvar: WideString); safecall;
1472  procedure _Set_ActiveConnection(const pvar: Connection15); safecall;
1473  function Get_State: ObjectStateEnum; safecall;
1474  function Get_Source: OleVariant; safecall;
1475  procedure Set_Source(const pvar: WideString); safecall;
1476  procedure _Set_Source(const pvar: IDispatch); safecall;
1477  function Get_Mode: ConnectModeEnum; safecall;
1478  procedure Set_Mode(pMode: ConnectModeEnum); safecall;
1479  function Get_ParentURL: WideString; safecall;
1480  function MoveRecord(const Source: WideString; const Destination: WideString;
1481  const UserName: WideString; const Password: WideString;
1482  Options: MoveRecordOptionsEnum; Async: WordBool): WideString; safecall;
1483  function CopyRecord(const Source: WideString; const Destination: WideString;
1484  const UserName: WideString; const Password: WideString;
1485  Options: CopyRecordOptionsEnum; Async: WordBool): WideString; safecall;
1486  procedure DeleteRecord(const Source: WideString; Async: WordBool); safecall;
1487  procedure Open(Source: OleVariant; ActiveConnection: OleVariant; Mode: ConnectModeEnum;
1488  CreateOptions: RecordCreateOptionsEnum; Options: RecordOpenOptionsEnum;
1489  const UserName: WideString; const Password: WideString); safecall;
1490  procedure Close; safecall;
1491  function Get_Fields: Fields15; safecall;
1492  function Get_RecordType: RecordTypeEnum; safecall;
1493  function GetChildren: Recordset15; safecall;
1494  procedure Cancel; safecall;
1495  property State: ObjectStateEnum read Get_State;
1496  property Mode: ConnectModeEnum read Get_Mode write Set_Mode;
1497  property ParentURL: WideString read Get_ParentURL;
1498  property Fields: Fields15 read Get_Fields;
1499  property RecordType: RecordTypeEnum read Get_RecordType;
1500  end;
1501 
1502 // *********************************************************************//
1503 // Interface: _Stream
1504 // Flags: (4432) Hidden Dual OleAutomation Dispatchable
1505 // GUID: {00000565-0000-0010-8000-00AA006D2EA4}
1506 // *********************************************************************//
1507  _Stream = interface(IDispatch)
1508  ['{00000565-0000-0010-8000-00AA006D2EA4}']
1509  function Get_Size: ADO_LONGPTR; safecall;
1510  function Get_EOS: WordBool; safecall;
1511  function Get_Position: ADO_LONGPTR; safecall;
1512  procedure Set_Position(pPos: ADO_LONGPTR); safecall;
1513  function Get_Type_: StreamTypeEnum; safecall;
1514  procedure Set_Type_(ptype: StreamTypeEnum); safecall;
1515  function Get_LineSeparator: LineSeparatorEnum; safecall;
1516  procedure Set_LineSeparator(pLS: LineSeparatorEnum); safecall;
1517  function Get_State: ObjectStateEnum; safecall;
1518  function Get_Mode: ConnectModeEnum; safecall;
1519  procedure Set_Mode(pMode: ConnectModeEnum); safecall;
1520  function Get_Charset: WideString; safecall;
1521  procedure Set_Charset(const pbstrCharset: WideString); safecall;
1522  function Read(NumBytes: Integer): OleVariant; safecall;
1523  procedure Open(Source: OleVariant; Mode: ConnectModeEnum; Options: StreamOpenOptionsEnum;
1524  const UserName: WideString; const Password: WideString); safecall;
1525  procedure Close; safecall;
1526  procedure SkipLine; safecall;
1527  procedure Write(Buffer: OleVariant); safecall;
1528  procedure SetEOS; safecall;
1529  procedure CopyTo(const DestStream: _Stream; CharNumber: ADO_LONGPTR); safecall;
1530  procedure Flush; safecall;
1531  procedure SaveToFile(const FileName: WideString; Options: SaveOptionsEnum); safecall;
1532  procedure LoadFromFile(const FileName: WideString); safecall;
1533  function ReadText(NumChars: Integer): WideString; safecall;
1534  procedure WriteText(const Data: WideString; Options: StreamWriteEnum); safecall;
1535  procedure Cancel; safecall;
1536  property Size: ADO_LONGPTR read Get_Size;
1537  property EOS: WordBool read Get_EOS;
1538  property Position: ADO_LONGPTR read Get_Position write Set_Position;
1539  property Type_: StreamTypeEnum read Get_Type_ write Set_Type_;
1540  property LineSeparator: LineSeparatorEnum read Get_LineSeparator write Set_LineSeparator;
1541  property State: ObjectStateEnum read Get_State;
1542  property Mode: ConnectModeEnum read Get_Mode write Set_Mode;
1543  property Charset: WideString read Get_Charset write Set_Charset;
1544  end;
1545 
1546 // *********************************************************************//
1547 // Interface: ADORecordConstruction
1548 // Flags: (4608) Restricted Dispatchable
1549 // GUID: {00000567-0000-0010-8000-00AA006D2EA4}
1550 // *********************************************************************//
1551  ADORecordConstruction = interface(IDispatch)
1552  ['{00000567-0000-0010-8000-00AA006D2EA4}']
1553  function Get_Row(out ppRow: IUnknown): HResult; stdcall;
1554  function Set_Row(const ppRow: IUnknown): HResult; stdcall;
1555  function Set_ParentRow(const Param1: IUnknown): HResult; stdcall;
1556  end;
1557 
1558 // *********************************************************************//
1559 // Interface: ADOStreamConstruction
1560 // Flags: (4608) Restricted Dispatchable
1561 // GUID: {00000568-0000-0010-8000-00AA006D2EA4}
1562 // *********************************************************************//
1563  ADOStreamConstruction = interface(IDispatch)
1564  ['{00000568-0000-0010-8000-00AA006D2EA4}']
1565  function Get_Stream(out ppStm: IUnknown): HResult; stdcall;
1566  function Set_Stream(const ppStm: IUnknown): HResult; stdcall;
1567  end;
1568 
1569 // *********************************************************************//
1570 // Interface: ADOCommandConstruction
1571 // Flags: (512) Restricted
1572 // GUID: {00000517-0000-0010-8000-00AA006D2EA4}
1573 // *********************************************************************//
1574  ADOCommandConstruction = interface(IUnknown)
1575  ['{00000517-0000-0010-8000-00AA006D2EA4}']
1576  function Get_OLEDBCommand: IUnknown; safecall;
1577  procedure Set_OLEDBCommand(const ppOLEDBCommand: IUnknown); safecall;
1578  property OLEDBCommand: IUnknown read Get_OLEDBCommand write Set_OLEDBCommand;
1579  end;
1580 
1581 // *********************************************************************//
1582 // Interface: ADORecordsetConstruction
1583 // Flags: (4608) Restricted Dispatchable
1584 // GUID: {00000283-0000-0010-8000-00AA006D2EA4}
1585 // *********************************************************************//
1586  ADORecordsetConstruction = interface(IDispatch)
1587  ['{00000283-0000-0010-8000-00AA006D2EA4}']
1588  function Get_Rowset(out ppRowset: IUnknown): HResult; stdcall;
1589  function Set_Rowset(const ppRowset: IUnknown): HResult; stdcall;
1590  function Get_Chapter(out plChapter: ADO_LONGPTR): HResult; stdcall;
1591  function Set_Chapter(plChapter: ADO_LONGPTR): HResult; stdcall;
1592  function Get_RowPosition(out ppRowPos: IUnknown): HResult; stdcall;
1593  function Set_RowPosition(const ppRowPos: IUnknown): HResult; stdcall;
1594  end;
1595 
1596 // *********************************************************************//
1597 // Interface: Field15
1598 // Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
1599 // GUID: {00000505-0000-0010-8000-00AA006D2EA4}
1600 // *********************************************************************//
1601  Field15 = interface(_ADO)
1602  ['{00000505-0000-0010-8000-00AA006D2EA4}']
1603  function Get_ActualSize: ADO_LONGPTR; safecall;
1604  function Get_Attributes: Integer; safecall;
1605  function Get_DefinedSize: ADO_LONGPTR; safecall;
1606  function Get_Name: WideString; safecall;
1607  function Get_Type_: DataTypeEnum; safecall;
1608  function Get_Value: OleVariant; safecall;
1609  procedure Set_Value(pvar: OleVariant); safecall;
1610  function Get_Precision: Byte; safecall;
1611  function Get_NumericScale: Byte; safecall;
1612  procedure AppendChunk(Data: OleVariant); safecall;
1613  function GetChunk(Length: Integer): OleVariant; safecall;
1614  function Get_OriginalValue: OleVariant; safecall;
1615  function Get_UnderlyingValue: OleVariant; safecall;
1616  property ActualSize: ADO_LONGPTR read Get_ActualSize;
1617  property Attributes: Integer read Get_Attributes;
1618  property DefinedSize: ADO_LONGPTR read Get_DefinedSize;
1619  property Name: WideString read Get_Name;
1620  property Type_: DataTypeEnum read Get_Type_;
1621  property Value: OleVariant read Get_Value write Set_Value;
1622  property Precision: Byte read Get_Precision;
1623  property NumericScale: Byte read Get_NumericScale;
1624  property OriginalValue: OleVariant read Get_OriginalValue;
1625  property UnderlyingValue: OleVariant read Get_UnderlyingValue;
1626  end;
1627 
1628 // *********************************************************************//
1629 // Declaration of CoClasses defined in Type Library
1630 // (NOTE: Here we map each CoClass to its Default Interface)
1631 // *********************************************************************//
1632  Connection = Connection15;
1633  Record_ = _Record;
1634  Stream = _Stream;
1635  Command = _Command;
1636  Recordset = Recordset15;
1637  Parameter = _Parameter;
1638 
1639 // *********************************************************************//
1640 // The Class CoConnection provides a Create and CreateRemote method to
1641 // create instances of the default interface Connection15 exposed by
1642 // the CoClass Connection. The functions are intended to be used by
1643 // clients wishing to automate the CoClass objects exposed by the
1644 // server of this typelibrary.
1645 // *********************************************************************//
1646  CoConnection = class
1647  class function Create: Connection15;
1648  class function CreateRemote(const MachineName: string): Connection15;
1649  end;
1650 
1651 // *********************************************************************//
1652 // The Class CoRecord_ provides a Create and CreateRemote method to
1653 // create instances of the default interface _Record exposed by
1654 // the CoClass Record_. The functions are intended to be used by
1655 // clients wishing to automate the CoClass objects exposed by the
1656 // server of this typelibrary.
1657 // *********************************************************************//
1658  CoRecord_ = class
1659  class function Create: _Record;
1660  class function CreateRemote(const MachineName: string): _Record;
1661  end;
1662 
1663 // *********************************************************************//
1664 // The Class CoStream provides a Create and CreateRemote method to
1665 // create instances of the default interface _Stream exposed by
1666 // the CoClass Stream. The functions are intended to be used by
1667 // clients wishing to automate the CoClass objects exposed by the
1668 // server of this typelibrary.
1669 // *********************************************************************//
1670  CoStream = class
1671  class function Create: _Stream;
1672  class function CreateRemote(const MachineName: string): _Stream;
1673  end;
1674 
1675 // *********************************************************************//
1676 // The Class CoCommand provides a Create and CreateRemote method to
1677 // create instances of the default interface _Command exposed by
1678 // the CoClass Command. The functions are intended to be used by
1679 // clients wishing to automate the CoClass objects exposed by the
1680 // server of this typelibrary.
1681 // *********************************************************************//
1682  CoCommand = class
1683  class function Create: _Command;
1684  class function CreateRemote(const MachineName: string): _Command;
1685  end;
1686 
1687 // *********************************************************************//
1688 // The Class CoRecordset provides a Create and CreateRemote method to
1689 // create instances of the default interface Recordset15 exposed by
1690 // the CoClass Recordset. The functions are intended to be used by
1691 // clients wishing to automate the CoClass objects exposed by the
1692 // server of this typelibrary.
1693 // *********************************************************************//
1694  CoRecordset = class
1695  class function Create: Recordset15;
1696  class function CreateRemote(const MachineName: string): Recordset15;
1697  end;
1698 
1699 // *********************************************************************//
1700 // The Class CoParameter provides a Create and CreateRemote method to
1701 // create instances of the default interface _Parameter exposed by
1702 // the CoClass Parameter. The functions are intended to be used by
1703 // clients wishing to automate the CoClass objects exposed by the
1704 // server of this typelibrary.
1705 // *********************************************************************//
1706  CoParameter = class
1707  class function Create: _Parameter;
1708  class function CreateRemote(const MachineName: string): _Parameter;
1709  end;
1710 
1711 implementation
1712 
1713 uses ComObj;
1714 
1715 class function CoConnection.Create: Connection15;
1716 begin
1717  Result := CreateComObject(CLASS_Connection) as Connection15;
1718 end;
1719 
1720 class function CoConnection.CreateRemote(const MachineName: string): Connection15;
1721 begin
1722  Result := CreateRemoteComObject(MachineName, CLASS_Connection) as Connection15;
1723 end;
1724 
1725 class function CoRecord_.Create: _Record;
1726 begin
1727  Result := CreateComObject(CLASS_Record_) as _Record;
1728 end;
1729 
1730 class function CoRecord_.CreateRemote(const MachineName: string): _Record;
1731 begin
1732  Result := CreateRemoteComObject(MachineName, CLASS_Record_) as _Record;
1733 end;
1734 
1735 class function CoStream.Create: _Stream;
1736 begin
1737  Result := CreateComObject(CLASS_Stream) as _Stream;
1738 end;
1739 
1740 class function CoStream.CreateRemote(const MachineName: string): _Stream;
1741 begin
1742  Result := CreateRemoteComObject(MachineName, CLASS_Stream) as _Stream;
1743 end;
1744 
1745 class function CoCommand.Create: _Command;
1746 begin
1747  Result := CreateComObject(CLASS_Command) as _Command;
1748 end;
1749 
1750 class function CoCommand.CreateRemote(const MachineName: string): _Command;
1751 begin
1752  Result := CreateRemoteComObject(MachineName, CLASS_Command) as _Command;
1753 end;
1754 
1755 class function CoRecordset.Create: Recordset15;
1756 begin
1757  Result := CreateComObject(CLASS_Recordset) as Recordset15;
1758 end;
1759 
1760 class function CoRecordset.CreateRemote(const MachineName: string): Recordset15;
1761 begin
1762  Result := CreateRemoteComObject(MachineName, CLASS_Recordset) as Recordset15;
1763 end;
1764 
1765 class function CoParameter.Create: _Parameter;
1766 begin
1767  Result := CreateComObject(CLASS_Parameter) as _Parameter;
1768 end;
1769 
1770 class function CoParameter.CreateRemote(const MachineName: string): _Parameter;
1771 begin
1772  Result := CreateRemoteComObject(MachineName, CLASS_Parameter) as _Parameter;
1773 end;
1774 
1775 end.
1776