📄 readme.html
字号:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Reghu">
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; I) [Netscape]">
<title>ReadMe</title>
</head>
<body>
<h1>
<b><u><font face="Arial,Helvetica"><font color="#000099">Passing LOB Parameters
From And To A Stored Procedure</font></font></u></b></h1>
<p><br> Contents of this
document:
<p> <a href="#1.Overview of the Sample">Overview
of the 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">Description
of files in the sample</a>
<br> <a href="#5. Prepare and Run the Sample">
Prepare and Run the sample</a>
<br> <a href="#Steps followed in the sample">Steps
in the sample</a>
<h2>
<a NAME="1.Overview of the Sample"></a><font face="Arial,Helvetica"><font color="#000099">Overview
of the Sample</font></font></h2>
This sample shows how
to pass LOB parameters to and from Oracle stored procedure
using Oracle Provider for OLEDB and ActiveX Data
<br> Objects
<br> (ADO) with VC++.
It also demonstrates that Oracle provider for OLEDB bypasses PL/SQL limitation
of parameter size greater 32K to a
<br> database
procedure.
<br> With OraOLEDB, for
passing the LOB variables as parameter to a SQL statement or stored procedure,
the property 'SPPrmsLOB' is to set to
<br> true to tell the provider
that a LOB parameter is being passed .
<p> The property can be set to
true as ADO command object property just before executing the command and
then set to false.
<p> The sample shows how to set
the 'SPPrmsLOB' property with command object.
<p> Note : The maximum size of image
that can be passed as OUT parameter to stored procedure with OraOLEDB
is 64K. Images greater than this
<br>
size may not be retrieved properly from database.
<br>
<h2>
<a NAME="Required Software"></a><font face="Arial,Helvetica"><font color="#000099">Required
Software</font></font></h2>
Oracle 8x database .
<br> Visual C++ 6.0
<br> Oracle Provider for
OLEDB Release 8.1.7
<br>
<h2>
<a NAME="Assumptions"></a><font face="Arial,Helvetica"><font color="#000099">Assumptions</font></font></h2>
1. A database user
e.g.. 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.
Refer db8setup.html for more information about
<br>
setting up the database tables and populating data.
<br>
<h2>
<font face="Arial,Helvetica"><font color="#000099"> <a NAME="Description of files in the sample"></a>Description
of files in the sample</font></font></h2>
<table BORDER COLS=4 WIDTH="100%" >
<tr>
<td WIDTH="4%">
<h4>
<font face="Arial,Helvetica"><font color="#000099">Sr No</font></font></h4>
</td>
<td WIDTH="10%">
<h4>
<font face="Arial,Helvetica"><font color="#000099">File Name</font></font></h4>
</td>
<td WIDTH="10%">
<h4>
<font face="Arial,Helvetica"><font color="#000099">Type</font></font></h4>
</td>
<td>
<h4>
<font face="Arial,Helvetica"><font color="#000099">File Description</font></font></h4>
</td>
</tr>
<tr>
<td>1</td>
<td> ReadMe.html</td>
<td>HTML File</td>
<td>ReadMe File for the project</td>
</tr>
<tr>
<td>2</td>
<td>ADODBHandler.h</td>
<td>C++ header file</td>
<td>Declares the class for handling database functions.</td>
</tr>
<tr>
<td>3</td>
<td>ADODBHandler.cpp</td>
<td>C++ source file</td>
<td>Contains implementation of the class for handling database functions.</td>
</tr>
<tr>
<td>4</td>
<td>LOBSample.h</td>
<td>C++ header file</td>
<td>This is the startup file for the implementation. It contains declaration
of class derived from CWinApp</td>
</tr>
<tr>
<td>5</td>
<td>LOBSample.cpp</td>
<td>C++ source file</td>
<td>Implementation file for class used to start up of the application</td>
</tr>
<tr>
<td>6</td>
<td>LOBSampleDlg.h</td>
<td>C++ header file</td>
<td>This file declares the class for start up dialog box of the application</td>
</tr>
<tr>
<td>7</td>
<td>LOBSampleDlg.cpp</td>
<td>C++ source file</td>
<td>This file contains the class implementation for start up dialog box.</td>
</tr>
<tr>
<td>8</td>
<td>Image.h</td>
<td>C++ header file</td>
<td>This file contains the declaration of class for drawing and displaying
the image on the dialog box.</td>
</tr>
<tr>
<td>9</td>
<td>Image.cpp</td>
<td>C++ source file</td>
<td>This file contains the implementation of class for drawing and displaying
the image on dialog box</td>
</tr>
<tr>
<td>10</td>
<td>LOBSample.rc</td>
<td>Resource script file</td>
<td>This file contains definition of application resources</td>
</tr>
<tr>
<td>11</td>
<td>Resource.h</td>
<td>C++ header file</td>
<td>This file defines the constants for the resources used by the application</td>
</tr>
<tr>
<td>12</td>
<td>ConnectionParams.h</td>
<td>C++ header file</td>
<td>This file contains connection parameters to connect to particular database. </td>
</tr>
<tr>
<td>13</td>
<td>StdAfx.h</td>
<td>C++ header file</td>
<td>This includes standard system include files or project specific include
files that are used frequently, but are changed infrequently</td>
</tr>
<tr>
<td>14</td>
<td>StdAfx.cpp</td>
<td>C++ source file</td>
<td>This is source file that contains the standard includes</td>
</tr>
<tr>
<td>15</td>
<td>StoredProcedure.sql</td>
<td>SQL script file</td>
<td>This file contains the sql script to create the stored procedures
required by the sample.</td>
</tr>
<tr>
<td>16</td>
<td>res/LOBSample.rc2</td>
<td>Resource script file</td>
<td>Resource file</td>
</tr>
<tr>
<td>17</td>
<td>res/LOBSample.ico</td>
<td>Image file</td>
<td>Icon file</td>
</tr>
<tr>
<td>18</td>
<td>LOBSample.dsp</td>
<td> Project file</td>
<td>VC++ Project file</td>
</tr>
<tr>
<td>19</td>
<td>LOBSample.dsw</td>
<td>Workspace file</td>
<td>VC++ workspace file</td>
</tr>
<tr>
<td>20</td>
<td>LOBSample.clw</td>
<td>CLW file</td>
<td>Contains class wizard information of the project</td>
</tr>
<tr>
<td>21</td>
<td>imageG30.jpg</td>
<td>Image File</td>
<td>Used by ReadMe.html</td>
</tr>
<tr>
<td>22</td>
<td>imageHHP.jpg</td>
<td>Image File</td>
<td>Used by ReadMe.html</td>
</tr>
<tr>
<td>23</td>
<td>imageJ3S.jpg</td>
<td>Image File</td>
<td>Used by ReadMe.html</td>
</tr>
</table>
<h3>
</h3>
<h2>
<a NAME="5. Prepare and Run the Sample"></a><font face="Arial,Helvetica"><font color="#000099">Prepare
and Run the Sample</font></font></h2>
<font face="Arial,Helvetica"><font color="#000099">
</font></font>1. Extract the Sample files.
<br>
Unzip VCADOLOBSample.zip using Winzip or command utility
<br>.
<br>
2<font color="#000000">. Connect to Oracle Sql*plus using <username>/<password>@<connectstring>
.</font>
<br><font color="#000000">
Here <username> refers to the user in which all the tables have been
created and <password> refers to the password given for the above</font>
<br><font color="#000000">
user .<connectstring> refers to the hostname.</font>
<p><font color="#000000">
3. Make sure that you have created the database tables required by this
sample.Refer db8setup.html for more information about setting up the</font>
<br><font color="#000000">
database tables and populating data.</font>
<p><font color="#000000"><font face="Arial,Helvetica"> </font>
4<font face="Arial,Helvetica">.</font> Create Database Stored Procedure
by running StoredProcedure.sql script.</font>
<br><font color="#000000">
SQL> @<path>StoredProcedure.sql</font>
<p> 5.
Open LOBSample.dsw using VC++ 6.0.
<p> 6.
Edit connectionParams.h file to change the database connection parameters
i.e. database name, user name and password
<br>
to database you want to use . Save the file.
<p> 7.
Build and Run the sample.
<br>
<h2>
<a NAME="Steps followed in the sample"></a><font face="Arial,Helvetica"><font color="#000099">Steps
in the sample</font></font></h2>
1. Select
product from the list. Its corresponding image should appear in the Existing
Image frame.
<center>
<p><img SRC="imageHHP.JPG" height=600 width=576></center>
<p>
fig 1
<p>
2. To select another image for update, click on "Browse " button,
a File Open Common Dialog appears.
<center>
<p><img SRC="imageG3O.JPG" height=601 width=576></center>
<p><br>
<br>
<br>
<br>
<br>
<br>
<p> 3. Once the image from the File
Open Common Dialog Box is selected it appears in the new image frame.
<center>
<p><img SRC="imageJ3S.JPG" height=602 width=576></center>
<p> 4. "Update Image" button
can be pressed to update the product image in the database
<p>
<hr WIDTH="100%">
<p><b>Please enter your comments about this sample in the OTN Sample code
discussion forum.</b>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -