Xbase64 4.0.1
C++ Library for handling Xbase (DBF) format type files
xbdbf.h
Go to the documentation of this file.
1/* xbdbf.h
2
3XBase64 Software Library
4
5Copyright (c) 1997,2003,2014,2022,2023 Gary A Kunkel
6
7The xb64 software library is covered under the terms of the GPL Version 3, 2007 license.
8
9Email Contact:
10
11 XDB-devel@lists.sourceforge.net
12 XDB-users@lists.sourceforge.net
13
14*/
15
16
17#ifndef __XB_XBDBF_H__
18#define __XB_XBDBF_H__
19
20//#ifdef CMAKE_COMPILER_IS_GNUCC
21//#pragma interface
22//#endif
23
24namespace xb{
25
26/*****************************/
27/* Field Types */
28
29#define XB_CHAR_FLD 'C'
30#define XB_LOGICAL_FLD 'L'
31#define XB_NUMERIC_FLD 'N'
32#define XB_DATE_FLD 'D'
33#define XB_MEMO_FLD 'M'
34#define XB_FLOAT_FLD 'F'
35
36/*****************************/
37/* File Status Codes */
38
39#define XB_CLOSED 0
40#define XB_OPEN 1
41#define XB_UPDATED 2
42
43
44/*****************************/
45/* File Access Modes */
46// #define XB_SINGLE_USER 0 // file buffering on
47// #define XB_MULTI_USER 1 // file buffering off
48
49/*****************************/
50/* File Lock Functions */
51#define XB_LOCK 0
52#define XB_UNLOCK 1
53
54#define LK_DBASE 1
55#define LK_CLIPPER 2 // future
56#define LK_FOX 3 // future
57#define LK_XBASE64 9 // future
58
59/*****************************/
60/* Record retrieve options */
61#define XB_ALL_RECS 0
62#define XB_ACTIVE_RECS 1
63#define XB_DELETED_RECS 2
64
65
66/*****************************/
67/* Other defines */
68
69#define XB_OVERLAY 1
70#define XB_DONTOVERLAY 0
71#define XB_CHAREOF '\x1A' /* end of DBF */
72#define XB_CHARHDR '\x0D' /* header terminator */
73
74
76
95struct XBDLLEXPORT xbSchema {
96 char cFieldName[11];
97 char cType;
98 xbInt16 iFieldLen; /* fields are stored as one byte on record*/
99 xbInt16 iNoOfDecs;
100};
101
103struct XBDLLEXPORT xbSchemaRec {
104 char cFieldName[11]; /* ASCIIZ field name */
105 char cType; /* field type */
106 char *pAddress; /* pointer to field in record buffer 1 */
107 unsigned char cFieldLen; /* fields are stored as one byte on record */
108 unsigned char cNoOfDecs;
109 char *pAddress2; /* pointer to field in record buffer 2 */
110 xbInt16 iLongFieldLen; /* to handle long field lengths */
111 unsigned char cIxFlag; /* DBase IV Index field flag */
112};
114
115
116
118#ifdef XB_INDEX_SUPPORT
119class XBDLLEXPORT xbIx;
120// structure for file list, each open DBF file can have one or more index files
121struct XBDLLEXPORT xbIxList {
122 xbIxList *next;
123 xbIx *ix;
124 xbString *sFmt;
125};
126#endif // XB_INDEX_SUPPORT
128
129
131
150class XBDLLEXPORT xbDbf : public xbFile {
151
152 public:
153 xbDbf( xbXBase *x );
154 virtual ~xbDbf();
155
156 virtual xbInt16 Abort();
157 virtual xbInt16 AppendRecord();
158 virtual xbInt16 BlankRecord();
159 virtual xbInt16 Commit();
160 virtual xbInt16 Close();
161 virtual xbInt16 CopyDbfStructure( xbDbf *dNewTable, const xbString &sTableName, const xbString &sTableAlias, xbInt16 iOverlay, xbInt16 iShareMode );
162 virtual xbInt16 CreateTable ( const xbString &sTableName, const xbString &sAlias, xbSchema *pSchema, xbInt16 iOverlay, xbInt16 iShareMode ) = 0;
163 virtual xbInt16 DeleteTable ();
164 virtual xbInt16 DeleteAll ( xbInt16 iOption );
165 virtual xbInt16 DeleteAllRecords ();
166 virtual xbInt16 DeleteRecord ();
167 virtual xbInt16 DumpHeader ( xbInt16 iOption );
168 virtual xbInt16 DumpRecord ( xbUInt32 ulRecNo, xbInt16 iOutputDest = 0, xbInt16 iOutputFmt = 0 );
169 virtual xbInt16 GetAutoCommit () const;
170 virtual xbInt16 GetAutoCommit ( xbInt16 iOption ) const;
171 virtual xbBool GetBof ();
172 virtual xbUInt32 GetCurRecNo () const;
173 virtual xbInt16 GetDbfStatus () const;
174 virtual xbBool GetEof ();
175 virtual xbInt32 GetFieldCnt () const;
176 virtual xbInt16 GetFirstRecord ();
177 virtual xbInt16 GetFirstRecord ( xbInt16 iOption );
178 virtual xbUInt16 GetHeaderLen () const;
179 virtual xbInt16 GetLastRecord ();
180 virtual xbInt16 GetLastRecord ( xbInt16 iOption );
181
182 virtual xbInt16 GetNextRecord ();
183 virtual xbInt16 GetNextRecord ( xbInt16 iOption );
184 virtual xbInt16 GetNextRecord ( xbInt16 iOption, xbUInt32 ulStartRec );
185 virtual xbInt16 GetPrevRecord ();
186 virtual xbInt16 GetPrevRecord ( xbInt16 iOption );
187 virtual xbInt16 GetRecord ( xbUInt32 ulRecNo );
188
189 // virtual xbUInt32 GetRecordCount ();
190 virtual xbInt16 GetRecordCnt ( xbUInt32 & ulRecCnt );
191
192 virtual char * GetRecordBuf ( xbInt16 iOpt = 0 ) const;
193 virtual xbUInt16 GetRecordLen () const;
194 virtual const xbString &GetTblAlias() const;
195 virtual xbInt16 GetVersion () const = 0;
196 virtual xbXBase *GetXbasePtr () const; // return xbase pointer
197
198
199 virtual xbBool MemoFieldsExist () const;
200
201 virtual xbInt16 Open ( const xbString &sTableName );
202 virtual xbInt16 Open ( const xbString &sTableName, const xbString &sAlias );
203 virtual xbInt16 Open ( const xbString &sTableName, const xbString &sAlias, xbInt16 iOpenMode, xbInt16 iShareMode ) = 0;
204 virtual xbInt16 Pack ();
205 virtual xbInt16 Pack ( xbUInt32 &ulDeletedRecCnt );
206
207
208 virtual xbInt16 PutRecord (); // Put record to current location
209 virtual xbInt16 PutRecord ( xbUInt32 ulRecNo );
210// virtual xbInt16 ReadHeader ( xbInt16 iFilePositionOption, xbInt16 iReadOption );
211 virtual xbInt16 RecordDeleted ( xbInt16 iOpt = 0 ) const;
212 virtual xbInt16 Rename ( const xbString sNewName ) = 0;
213
214 virtual xbInt16 SetAutoCommit ( xbInt16 iAutoCommit );
215
216 virtual xbInt16 UndeleteAllRecords();
217 virtual xbInt16 UndeleteRecord ();
218 virtual xbInt16 Zap ();
219
220
221 /* field methods */
222 //virtual xbInt16 GetRawField( xbInt16 iFieldNo, char *Buf, xbUInt32 BufSize, xbInt16 iRecBufSw ) const;
223 virtual xbInt16 GetField(xbInt16 iFieldNo, xbString &sFieldValue, xbInt16 iRecBufSw ) const;
224 virtual xbInt16 GetField(xbInt16 iFieldNo, xbString &sFieldValue) const;
225 virtual xbInt16 GetField(const xbString &sFieldName, xbString &sFieldValue) const;
226 virtual xbInt16 GetFieldDecimal( xbInt16 iFieldNo, xbInt16 &iFieldDecimal ) const;
227 virtual xbInt16 GetFieldDecimal( const xbString &sFieldName, xbInt16 &iFieldDecimal ) const;
228 virtual xbInt16 GetFieldLen( xbInt16 iFieldNo, xbInt16 &iFieldLen ) const;
229 virtual xbInt16 GetFieldLen( const xbString &sFieldName, xbInt16 &iFieldLen ) const;
230 virtual xbInt16 GetFieldName( xbInt16 iFieldNo, xbString &sFieldName ) const;
231
232 virtual xbInt16 GetFieldNo( const xbString &sFieldName, xbInt16 &iFieldNo ) const;
233 virtual xbInt16 GetFieldNo( const xbString &sFieldName ) const;
234
235 virtual xbInt16 GetFieldType( xbInt16 iFieldNo, char &cFieldType ) const;
236 virtual xbInt16 GetFieldType( const xbString &sFieldName, char &cFieldType ) const;
237 virtual xbInt16 PutField( const xbString &sFieldName, const xbString &sFieldData );
238 virtual xbInt16 PutField( xbInt16 iFieldNo, const xbString &sFieldData );
239
240 virtual xbInt16 PutLogicalField( xbInt16 iFieldNo, const xbString &sFieldData );
241 virtual xbInt16 PutLogicalField( const xbString &sFieldName, const xbString &sFieldData );
242 virtual xbInt16 GetLogicalField( xbInt16 iFieldNo, xbString &sFieldData ) const;
243 virtual xbInt16 GetLogicalField( const xbString &sFieldName, xbString &sFieldData) const;
244
245 virtual xbInt16 PutLogicalField( xbInt16 iFieldNo, xbBool bFieldData );
246 virtual xbInt16 PutLogicalField( const xbString &sFieldName, xbBool bFieldData );
247 virtual xbInt16 GetLogicalField( xbInt16 iFieldNo, xbBool &bFieldData ) const;
248 virtual xbInt16 GetLogicalField( xbInt16 iFieldNo, xbBool &bFieldData, xbInt16 iRecBufSw ) const;
249 virtual xbInt16 GetLogicalField( const xbString &sFieldName, xbBool &bFieldData) const;
250
251 virtual xbInt16 GetLongField( xbInt16 iFieldNo, xbInt32 &lFieldValue ) const;
252 virtual xbInt16 GetLongField( const xbString &sFieldName, xbInt32 &lFieldValue ) const;
253 virtual xbInt16 PutLongField( xbInt16 iFieldNo, xbInt32 lFieldValue );
254 virtual xbInt16 PutLongField( const xbString &sFieldName, xbInt32 lFieldValue );
255
256 virtual xbInt16 GetULongField( xbInt16 iFieldNo, xbUInt32 &lFieldValue ) const;
257 virtual xbInt16 GetULongField( const xbString &sFieldName, xbUInt32 &lFieldValue ) const;
258 virtual xbInt16 PutULongField( xbInt16 iFieldNo, xbUInt32 lFieldValue );
259 virtual xbInt16 PutULongField( const xbString &sFieldNo, xbUInt32 lFieldValue );
260
261 virtual xbInt16 GetDoubleField( xbInt16 FieldNo, xbDouble &dFieldValue ) const;
262 virtual xbInt16 GetDoubleField( xbInt16 FieldNo, xbDouble &dFieldValue, xbInt16 iRecBufSw ) const;
263 virtual xbInt16 GetDoubleField( const xbString &sFieldName, xbDouble &dFieldValue ) const;
264 virtual xbInt16 PutDoubleField( xbInt16 FieldNo, xbDouble dFieldValue );
265 virtual xbInt16 PutDoubleField( const xbString &FieldName, xbDouble dFieldValue );
266
267 virtual xbInt16 GetFloatField( xbInt16 iFieldNo, xbFloat &fFieldValue ) const;
268 virtual xbInt16 GetFloatField( const xbString &sFieldName, xbFloat &fFieldValue ) const;
269 virtual xbInt16 PutFloatField( xbInt16 iFieldNo, xbFloat fFieldValue );
270 virtual xbInt16 PutFloatField( const xbString &sFieldName, xbFloat fFieldValue );
271
272 virtual xbInt16 GetDateField( xbInt16 iFieldNo, xbDate &dt ) const;
273 virtual xbInt16 GetDateField( const xbString &sFieldName, xbDate &dt ) const;
274 virtual xbInt16 PutDateField( xbInt16 iFieldNo, const xbDate &dt );
275 virtual xbInt16 PutDateField( const xbString &sFieldName, const xbDate &dt );
276
277 virtual xbInt16 GetNullSts( xbInt16 iFieldNo, xbBool &bIsNull ) const;
278 virtual xbInt16 GetNullSts( const xbString &sFieldName, xbBool &bIsNull ) const;
279 virtual xbInt16 GetNullSts( xbInt16 iFieldNo, xbBool &bIsNull, xbInt16 iRecBufSw ) const;
280
281
282
283 #ifdef XB_MEMO_SUPPORT
284 virtual xbInt16 GetMemoFieldCnt () const;
285 virtual xbMemo *GetMemoPtr ();
286 virtual xbUInt32 GetCreateMemoBlockSize() const;
287 virtual xbInt16 GetMemoField ( xbInt16 iFldNo, xbString &sMemoData );
288 virtual xbInt16 GetMemoField ( const xbString & sFldName, xbString &sMemoData );
289 virtual xbInt16 GetMemoFieldLen ( xbInt16 iFldNo, xbUInt32 &ulMemoFieldLen );
290 virtual xbInt16 GetMemoFieldLen ( const xbString & sFldName, xbUInt32 &ulMemoFieldLen );
291 virtual xbBool MemoFieldExists ( xbInt16 iFieldNo ) const;
292 virtual xbBool MemoFieldExists ( const xbString &sFieldName ) const;
293 virtual xbInt16 SetCreateMemoBlockSize( xbUInt32 ulBlockSize ) = 0;
294 virtual xbInt16 UpdateMemoField ( xbInt16 iFldNo, const xbString &sMemoData );
295 virtual xbInt16 UpdateMemoField ( const xbString & sFldName, const xbString &sMemoData );
296 #endif // XB_MEMO_SUPPORT
297
298
299 #ifdef XB_LOCKING_SUPPORT
300 virtual xbInt16 LockTable ( xbInt16 iLockFunction );
301 virtual xbInt16 LockRecord ( xbInt16 iLockFunction, xbUInt32 ulRecNo );
302 virtual xbInt16 LockAppend ( xbInt16 iLockFunction );
303 virtual xbInt16 LockHeader ( xbInt16 iLockFunction );
304
305 #ifdef XB_MEMO_SUPPORT
306 virtual xbInt16 LockMemo ( xbInt16 iLockFunction );
307 virtual xbBool GetMemoLocked () const;
308 #endif // XB_MEMO_LOCK
309
310 #ifdef XB_INDEX_SUPPORT
311 virtual xbInt16 LockIndices ( xbInt16 iLockFunction );
312 #endif // XB_INDEX_SUPPORT
313
314 xbInt16 GetAutoLock () const;
315 void SetAutoLock ( xbInt16 iAutoLock );
316 xbInt16 GetLockFlavor () const;
317 void SetLockFlavor ( xbInt16 iLockFlavor );
318 xbBool GetTableLocked () const;
319 xbBool GetHeaderLocked () const;
320 xbUInt32 GetAppendLocked () const;
321 xbLinkListNode<xbUInt32> * GetFirstRecLock () const;
322
323 #ifdef XB_DEBUG_SUPPORT
324 void DumpTableLockStatus() const;
325 #endif // XB_DEBUG_SUPPORT
326 #endif // XB_LOCKING_SUPPORT
327
328
329 #ifdef XB_INDEX_SUPPORT
330 virtual xbInt16 CheckTagIntegrity( xbInt16 iTagOpt, xbInt16 iOutputOpt );
331 virtual xbInt16 CloseIndexFile( xbIx *pIx );
332 virtual xbInt16 CreateTag( const xbString &sIxType, const xbString &sName, const xbString &sKey, const xbString &sFilter,
333 xbInt16 iDescending, xbInt16 iUnique, xbInt16 iOverLay, xbIx **xbIxOut, void **vpTagOut );
334 virtual xbInt16 DeleteTag( const xbString &sIxType, const xbString &sName );
335 virtual xbInt16 DeleteAllIndexFiles();
336 virtual xbInt16 Find( xbString &sKey );
337 virtual xbInt16 Find( xbDate &dtKey );
338 virtual xbInt16 Find( xbDouble &dKey );
339 virtual xbIx *GetCurIx() const;
340 virtual void *GetCurTag() const;
341
342 virtual xbInt16 GetFirstKey();
343 virtual xbInt16 GetNextKey();
344 virtual xbInt16 GetPrevKey();
345 virtual xbInt16 GetLastKey();
346
347 virtual const xbString &GetCurIxType() const;
348 virtual const xbString &GetCurTagName() const;
349 virtual xbIxList *GetIxList() const;
350 virtual xbInt32 GetPhysicalIxCnt () const;
351 xbLinkListNode<xbTag *> *GetTagList () const;
352
353 virtual xbInt16 OpenIndex( const xbString &sIxType, const xbString &sIndexName );
354 virtual xbInt16 Reindex( xbInt16 iTagOpt = 0, xbInt16 iErrorOpt = 1, xbIx **pIx = NULL, void **vpTag = NULL );
355 virtual xbInt16 SetCurTag( const xbString &sTagName );
356 virtual void SetCurTag( const xbString &sIxType, xbIx *pIx, void *vpTag );
357
358 #endif // XB_INDEX_SUPPORT
359
360 #ifdef XB_INF_SUPPORT
361 virtual xbInt16 AssociateIndex( const xbString &sType, const xbString &sName, xbInt16 iOption );
362 xbLinkListNode<xbString> *GetInfList() const;
363 #endif // XB_INF_SUPPORT
364
365 //#ifdef XB_MDX_SUPPORT
366 //virtual xbInt16 GetCreateMdxBlockSize() const;
367 //virtual xbInt16 SetCreateMdxBlockSize( xbInt16 ulBlockSize );
368 //#endif
369
370 #ifdef XB_BLOCKREAD_SUPPORT
371 xbInt16 DisableBlockReadProcessing();
372 xbInt16 EnableBlockReadProcessing();
373 xbBool GetBlockReadStatus() const;
374 #endif // XB_BLOCKREAD_SUPPORT
375
376 protected:
377 #ifdef XB_INDEX_SUPPORT
378 friend class xbIx;
379 friend class xbIxMdx;
380 friend class xbIxTdx;
381
382 xbInt16 AddIndex( xbIx *ix, const xbString &sFmt );
383 void ClearTagList();
384 xbInt16 RemoveIndex( xbIx * ix );
385 void UpdateSchemaIxFlag( xbInt16 iFldNo, unsigned char cVal );
386
387
388 virtual xbInt16 UpdateTagList ();
389 #endif // XB_INDEX_SUPPORT
390
391 virtual xbInt16 ReadHeader ( xbInt16 iFilePositionOption, xbInt16 iReadOption );
392
393
394 #ifdef XB_INF_SUPPORT
395 virtual xbInt16 GetInfFileName( xbString &sNdxIdxFileName );
396 #endif // XB_INF_SUPPORT
397
398 #ifdef XB_BLOCKREAD_SUPPORT
399 friend class xbBlockRead;
400 #endif // XB_BLOCKREAD_SUPPORT
401
402
403 #ifdef XB_LOCKING_SUPPORT
404 void SetHeaderLocked ( xbBool bTableLocked );
405 void SetTableLocked ( xbBool bTableLocked );
406 #endif // XB_LOCKING_SUPORT
407
408 #ifdef XB_MEMO_SUPPORT
409 xbInt16 iMemoFieldCnt; // Memo field cnt in the table
410 xbMemo *Memo; // Pointer to memo class
411 xbUInt32 ulCreateMemoBlockSize; // blocksize to use when creating dbt file
412 #endif
413
414 #ifdef XB_INF_SUPPORT
415 virtual xbInt16 DeleteInfData();
416 virtual xbInt16 LoadInfData();
417 virtual xbInt16 SaveInfData();
418 #endif // XB_INF_SUPPORT
419
420/*
421 #ifdef XB_MDX_SUPPORT
422 xbInt16 iCreateMdxBlockSize;
423 #endif // XB_MDX_SUPPORT
424*/
425
426 virtual xbInt16 GetRawField( xbInt16 iFieldNo, char *Buf, xbUInt32 BufSize, xbInt16 iRecBufSw ) const;
427 virtual void InitVars();
428 virtual xbInt16 SetVersion() = 0;
429 virtual xbInt16 ValidateSchema( xbSchema * s ) = 0;
430 xbInt16 WriteHeader( xbInt16 iPositionOption, xbInt16 iWriteOption );
431
433 xbUInt32 ulCurRec; // Current record or zero
434 xbInt16 iAutoCommit; // Auto commit updates if not explicitly performed before moving off record?
435 // -1 --> Use DBMS default
436 // 0 --> No auto update on this table, regardless of DBMS setting
437 // 1 --> Auto update on this table, regardless of DBMS setting
439 xbInt16 iFileVersion; // xBase file version - which class is in play
440
442 xbString sAlias; // table alias
443 xbInt16 iNoOfFields;
444 xbInt16 iDbfStatus; // 0 = closed
445 // 1 = open
446 // 2 = updates pending
448 xbSchemaRec *SchemaPtr; // Pointer to field data
449 char *RecBuf; // Pointer to record buffer
450 char *RecBuf2; // Pointer to original rec buf allocation
451
452
453/* Next several variables are database header fields, up through dbase V */
454 unsigned char cVersion;
455 char cUpdateYY;
456 char cUpdateMM;
457 char cUpdateDD;
458 xbUInt32 ulNoOfRecs;
459 xbUInt16 uiHeaderLen;
460 xbUInt16 uiRecordLen;
461 char cTransactionFlag;
462 char cEncryptionFlag;
463 char cIndexFlag;
464 char cLangDriver; // dbase 7 sets to 1B
465
466
467
468 private:
469 void ResetNoOfRecords();
470
471
472 #ifdef XB_LOCKING_SUPPORT
473 xbInt16 iAutoLock; // 0 - autolock off, 1 - autolock on
474 xbInt16 iLockFlavor;
475 xbBool bTableLocked; // is the table locked
476 xbBool bHeaderLocked; // is the header locked
477 xbUInt32 ulAppendLocked; // record number of the new record for the append lock operation
478 xbLinkListOrd<xbUInt32> lloRecLocks; // ordered link list of locked records
479 #endif
480
481 #ifdef XB_INDEX_SUPPORT
482 xbIxList *ixList; // pointer to a list of indices associated with the table
483 xbIx *pCurIx; // Pointer to current index class
484 void *vpCurIxTag; // Pointer to current tag
485 xbString sCurIxType; // Current index type
486 xbLinkList<xbTag *> llTags; // linked list of open tags
487 #endif // XB_INDEX_SUPPORT
488
489 #ifdef XB_INF_SUPPORT
490 xbLinkList<xbString> llInfData; // linked list of strings containing ndx file entries
491 #endif // XB_INF_SUPPORT
492
493 #ifdef XB_BLOCKREAD_SUPPORT
494 xbBlockRead *pRb;
495 xbBool bBlockReadEnabled; // if true, then block read mode is on
496 #endif
497
498
499
500};
501
502
503#ifdef XB_DBF3_SUPPORT
505
511class XBDLLEXPORT xbDbf3 : public xbDbf {
512 public:
513 xbDbf3(xbXBase *x);
514 ~xbDbf3();
515 virtual xbInt16 CreateTable ( const xbString &sTableName, const xbString &sAlias, xbSchema *, xbInt16 iOverlay, xbInt16 iShareMode );
516 virtual xbInt16 GetVersion () const;
517 virtual xbInt16 Open ( const xbString &sTableName, const xbString &sAlias, xbInt16 iOpenMode, xbInt16 iShareMode );
518 virtual xbInt16 Rename ( const xbString sNewName );
519
520 #ifdef XB_MEMO_SUPPORT
521 virtual xbInt16 SetCreateMemoBlockSize( xbUInt32 iBlockSize );
522 #endif
523
524 protected:
525 xbInt16 SetVersion ();
526 virtual xbInt16 ValidateSchema( xbSchema *s );
527
528 private:
529
530};
531#endif /* XB_DBF3_SUPPORT */
532
533
534#ifdef XB_DBF4_SUPPORT
536
541class XBDLLEXPORT xbDbf4 : public xbDbf {
542 public:
543 xbDbf4( xbXBase *x );
544
545 ~xbDbf4();
546
547 virtual xbInt16 CreateTable ( const xbString &sTableName, const xbString &sAlias, xbSchema *, xbInt16 iOverlay, xbInt16 iShareMode );
548 virtual xbInt16 GetVersion () const;
549 virtual xbInt16 Open ( const xbString &sTableName, const xbString &sAlias, xbInt16 iOpenMode, xbInt16 iShareMode );
550 virtual xbInt16 Rename ( const xbString sNewName );
551
552 #ifdef XB_MEMO_SUPPORT
553 virtual xbInt16 SetCreateMemoBlockSize( xbUInt32 iBlockSize );
554 #endif
555
556 protected:
557 // void InitVars ();
558 xbInt16 SetVersion();
559 virtual xbInt16 ValidateSchema ( xbSchema *s );
560
561 private:
562
563};
564
565#endif /* XB_DBF4_SUPPORT */
566
567} /* namespace xb */
568#endif /* __XB_DBF_H__ */
xbDate class.
Definition: xbdate.h:62
Base class for handling dbf files/tables.
Definition: xbdbf.h:150
virtual xbInt16 GetVersion() const =0
virtual xbInt16 Open(const xbString &sTableName, const xbString &sAlias, xbInt16 iOpenMode, xbInt16 iShareMode)=0
virtual xbInt16 CreateTable(const xbString &sTableName, const xbString &sAlias, xbSchema *pSchema, xbInt16 iOverlay, xbInt16 iShareMode)=0
virtual xbUInt16 GetHeaderLen() const
virtual xbInt16 Rename(const xbString sNewName)=0
Class for handling low level file I/O.
Definition: xbfile.h:56
Class for handling string data.
Definition: xbstring.h:50
xbXbase class.
Definition: xbxbase.h:123
Definition: xbdate.cpp:19
double xbDouble
Definition: xbtypes.h:23
float xbFloat
Definition: xbtypes.h:22
class XBDLLEXPORT xbXBase
Definition: xbssv.h:27
short int xbBool
Definition: xbtypes.h:24
class XBDLLEXPORT xbDbf
Definition: xbtblmgr.h:28
Schema used for defining tables with CreateTable methods.
Definition: xbdbf.h:95
char cType
Definition: xbdbf.h:97
xbInt16 iFieldLen
Definition: xbdbf.h:98
xbInt16 iNoOfDecs
Definition: xbdbf.h:99