📄 readme.html
字号:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Author" content="Jagriti">
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; I) [Netscape]">
<title>Chunk Size Versus Value Property</title>
</head>
<body>
<h1>
<b><u><font face="Arial,Helvetica"><font color="#000099">ADO ChunkSize
Property Versus ADO Value Property</font></font></u></b></h1>
<p><br> This document contains the following topics :
<p> <a href="#Overview">Overview of
ADO ChunkSize versus ADO Value Property Sample</a>
<br> <a href="#Required Software">Required
Software</a>
<br> <a href="#Assumptions">Assumptions</a>
<br> <a href="#Description of files in the Sample">Descriptions
of Files Used in the Sample</a>
<br> <a href="#Preparing and running the Sample">Preparing
and Running the Sample</a>
<br> <a href="#Steps followed">Steps
in the Sample</a>
<p><a NAME="Overview"></a><b><font face="Arial,Helvetica"><font color="#000099"><font size=+2>Overview
of ADO ChunkSize Property Versus ADO Value Property Sample</font></font></font></b>
<p>This sample aims at demonstrating the use of ADO ChunkSize property
versus ADO Value Property. With ADO Value Property the whole column value
is fetched in a single network round-trip from the database, though the
data retrieval performance is always high but this requires more memory
at the client side. So it is not feasible for huge column data like LOBs.With
ADO ChunkSize Property the data is retrieved in chunks of bytes and the
number of round trips made is equal to (Size of Data/ ChunkSize). This
requires less memory at client side but degrades the performance as more
roundtrips to the database. Therefore by providing an optimized value of
chunk size helps in efficiently utilizing the resources where system memory
is limited.
<p>When this application runs, a list of products populated from database
appears. The user can select a product from the list. Then choose the option
of either Value property or ChunkSize property. If Value property is chosen
then directly the "Display Image" button can be pressed and time taken
to get the image can be noted. Else if ChunkSize Property is chosen then
a value for ChunkSize can be entered and the time taken and No. of roundtrips
can be noted after clicking the "Display Image" button. Therefore a comparison
can be made between the Value Property and ChunkSize Property and an optimized
ChunkSize value can be found for retrieving images.
<p><a NAME="Required Software"></a><b><font face="Arial,Helvetica"><font color="#000099"><font size=+2>Required
Software</font></font></font></b>
<ul>
<li>
Visual Basic 6.0 ,</li>
<li>
Oracle 8.x or above - client and server,</li>
<li>
Oracle Provider for OLEDB for Oracle Database</li>
</ul>
Install the above required software and continue with the instructions
below.
<h2>
<a NAME="Assumptions"></a><font face="Arial,Helvetica"><font color="#000099">Assumptions</font></font></h2>
1. A database user eg. Oraole with password Oraole has already been
created.
<br>2. The tables with data used by the sample have already been created
using the SQL scripts
<br> Refer db8setup.html for more information about setting
up the database tables and populating data.
<h2>
<a NAME="Description of files in the Sample"></a><font face="Arial,Helvetica"><font color="#000099">Description
of files in the Sample</font></font></h2>
The sample is provided as a zip file ChunkSize.zip<b> </b>which
contains the following files required for the sample :
<br>
<table BORDER WIDTH="80%" >
<tr>
<td WIDTH="30%"><b>File Name</b></td>
<td><b>Description</b></td>
</tr>
<tr>
<td>ChunkSizesample.vbp </td>
<td>The VB project file</td>
</tr>
<tr>
<td>ChunkSize.frm </td>
<td>The VB form file</td>
</tr>
<tr>
<td>connectionParams.bas </td>
<td>Module containing connection information</td>
</tr>
<tr>
<td>Readme.html</td>
<td>This file</td>
</tr>
</table>
<h2>
<a NAME="Preparing and running the Sample"></a><font face="Arial,Helvetica"><font color="#000099">Preparing
and Running the Sample</font></font></h2>
<b>Step 1. </b> Unzip the ChunkSize.zip file using Winzip .
<p><b>Step 2.</b> Open MS-Visual Basic 6.0
<p><b>Step 3.</b> Open ChunkSizesample.vbp from the current sample
path.
<p><b>Step 4</b>. Open module connectionParams.bas.
<p><b>Step 5. </b>Mention datasource, username, password e.g.. myDatabase,
Oraole, Oraole
<p><b>Step 6.</b> Save connectionParams.bas
<p><b>Step 7.</b> Go to project -> References -> Select Microsoft
ActiveX Data Objects 2.0 Library or above
<br>
and select Microsoft ActiveX Data Objects Recordset 2.0 Library or
above
<p><b>Step 8.</b> Run the project.
<br>
<h2>
<a NAME="Steps followed"></a><font color="#000099">Steps in the Sample</font></h2>
<b> Step 1.</b> Select a product from the list that gets
populated while loading form.
<p> <b>Step 2. </b>Select either Value Property or ChunkSize
Property option.
<p> <b>Step 3.</b> If Value property option is checked then directly
click the
<br>
"Display Image" button. Note the Time Taken to fetch the image.
<p><img SRC="imageFF8.JPG" height=535 width=946>
<br>
<p><b> Step 4.</b> If ChunkSize property is checked then enter
a value for the ChunkSize in
<br>
the text box and click the "Display Image" button. Note the Time Taken
and
<br>
No. of Round Trips displayed in the label.
<p><img SRC="imageR26.JPG" height=542 width=957>
<p><b> Step 5.</b> By repeating the above steps with different
ChunkSize values an optimal value of ChunkSize can be found, for
efficient system memory utilization.
<p>
<hr WIDTH="100%">
<p><b>Please enter your comments about this sample in the OTN Sample code
discussion forum.</b>
<br>
<br>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -