The information in this article applies to:
SUMMARYBefore Microsoft Access was available, many Basic programs read disk files into string arrays. Then wrote them back to disk. You may be able to improve the speed and flexibility of file operations by instead using a Microsoft Access database with a RAM cache. MORE INFORMATION
Visual Basic limits variable-length string arrays to 64K bytes. However,
fixed-length string arrays are limited only by memory, and a Microsoft
Access database can contain many megabytes of data. PERFORM.TXT and Visual and BasicUsing a table object variable usually gives faster access to a database than using a data control bound to a database. Using a Microsoft Access Data Buffer in RAMYou can specify the size of the Microsoft Access buffer, or cache, in RAM by adding an [ISAM] section to your initialization file. Specify the [ISAM] section in the VB.INI file for Visual Basic, or in the <appname>.INI file for your Visual Basic application. For example, use the following cache if your computer has at least eight megabytes of RAM installed:MAXBUFFERSIZE = 4096This gives the Microsoft Access engine a four-megabyte dedicated cache. You can also specify ReadAheadPages and other parameters. Please read the PERFORM.TXT file for more information. Using the above Microsoft Access caching scheme can be faster than using Basic file input/output statements with a disk-caching product such as the SMARTDRV.SYS driver that ships with most MS-DOS versions 4.x and later. In one test on a PC with a 486 chip and 50-megahertz clock speed, a Seek method used on a cached table took less than .6 milliseconds. FindFirst methods with simple criteria took only .7 to .9 milliseconds. Performance is about the same whether you use the primary key or any other index that is either defined as unique or resolves to a single record pointer. For sample data manager source code, please see the following article in the Microsoft Knowledge Base: Q99643 Data Manager Source Code Available on the Internet Additional query words: 3.00
Keywords : |
Last Reviewed: September 17, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |