summaryrefslogtreecommitdiff
path: root/docs/html/xbc15.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/xbc15.html')
-rwxr-xr-xdocs/html/xbc15.html96
1 files changed, 0 insertions, 96 deletions
diff --git a/docs/html/xbc15.html b/docs/html/xbc15.html
deleted file mode 100755
index fde33b8..0000000
--- a/docs/html/xbc15.html
+++ /dev/null
@@ -1,96 +0,0 @@
-
-<!DOCTYPE HTML PUBLIC>
-<HTML>
-<TITLE>Xbase DBMS Chapter 15</TITLE>
-<BODY BGCOLOR=#FFFFFF>
-<H2><p align="center">Block Read Functionality</p></H2>
-<p align="center">Chapter Updated 2/1/23</p><hr>
-
-
-<h3>Block Reads</h3>
-
-As of release 4.1.1, the Xbase library includes functionality for reading a DBF file in blocks, rather than one record at a time.<br><br>
-
-This functionality can be used to improve application performance in situations where a data file is being read sequentially.
-For situations where records are retrieved randomly from the file, enabling this probably won't help much. In short, this
-can be turned on when accessing a file sequentially and should be left off when not processing sequentially.<br><br>
-
-The logic is all handled internally within the library, all that is needed is to enable it and the library handles the rest.<br><br>
-
-<h3>One Caveat</h3>
-This functionality was originally designed with reporting in mind and doesn't currently have any auto locking associated with it.
-<br><br>
-
-
-<h3>Sample Code</h3>
-See example code below for how to enable and disable the feature.
-
-
-<hr>
-
-#include "xbase.h"<br>
-using namespace xb;<br>
-<br>
-int main(int ac,char** av)<br>
-{<br>
- xbXBase x;<br>
- xbInt16 iRc;<br>
- x.EnableMsgLogging();<br>
- x.SetLogSize( 1000000L );<br>
-<br>
- if (ac <= 1) {<br>
- std::cout << "Usage: xb_dumprecs filename..." << std::endl;<br>
- return 1;<br>
- }<br>
-<br>
- xbDbf *MyFile = NULL;<br>
- if(( iRc = x.OpenHighestVersion( av[1], "", &MyFile )) != XB_NO_ERROR ){<br>
- std::cout << "Could not open file iRc = " << iRc << " file = " << av[1] << std::endl;<br>
- x.DisplayError( iRc );<br>
- return 0;<br>
- }<br>
-<br>
-// std::cout << "Processing file sequentially from beginning..." << std::endl;<br>
-<br>
-<br>
-<b>
- // turn on Block Read Processing<br>
- #ifdef XB_BLOCKREAD_SUPPORT<br>
- MyFile->EnableBlockReadProcessing();<br>
- #endif<br>
-</b>
-<br>
- xbUInt32 j = 0;<br>
- xbUInt32 ulRecCnt = 0;<br>
-<br>
- iRc = MyFile->GetRecordCnt( ulRecCnt );<br>
-<br>
- if( iRc < XB_NO_ERROR )<br>
- return iRc;<br>
- while( j < ulRecCnt ){<br>
- if( j == 0 )<br>
- iRc = MyFile->DumpRecord(++j, 2, 2 );<br>
- else<br>
- iRc = MyFile->DumpRecord(++j, 2, 1 );<br>
- if( iRc != XB_NO_ERROR ){<br>
- x.DisplayError( iRc );<br>
- return 1;<br>
- }<br>
- }<br>
- std::cout << j << " Records processed." << std::endl;<br>
-<br>
-<br><b>
- // optionally turn off Block Read Processing<br>
- #ifdef XB_BLOCKREAD_SUPPORT<br>
- MyFile->DisableBlockReadProcessing();<br>
- #endif<br></b>
-<br>
- MyFile->Close();<br>
- return 0;<br>
-}<br>
-<br>
-
-<hr>
-<p><img src="xbase.jpg"><hr>
-</BODY>
-</HTML>