📄 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 (ADO) with
Visual CSharp Beta2 version . It also demonstrates that Oracle provider
for OLEDB bypasses PL/SQL limitation of
<br> parameter size greater
than 32K to a database stored 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 as
ADO command object property just before executing the procedure. This way
the extra network trip is performed for
<br> executionof that command
only. So it is a better practice to set the property to 'True' just
before execution of the procedure and then setting it to
<br> '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"><font size=+2>Required
Software</font></font></font></h2>
Oracle 8x database .
<br> Visual CSharp.Net Beta 2
version
<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. Referdb8setup.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 application</td>
</tr>
<tr>
<td>2</td>
<td>ADODBHandler.cs</td>
<td>CSharp class file</td>
<td>Declares and defines the class for handling database functions.</td>
</tr>
<tr>
<td>3</td>
<td>StartForm.cs</td>
<td>CSharp class file</td>
<td>This file contains the definition of class for the form used by application..</td>
</tr>
<tr>
<td>4</td>
<td>AssemblyInfo.cs</td>
<td>CSharp class file</td>
<td>Generated by compiler, this file contains assembly information for
project.</td>
</tr>
<tr>
<td>5</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>6</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>7</td>
<td>StartForm.resx</td>
<td>Resource file</td>
<td>Resource template used by StartForm form</td>
</tr>
<tr>
<td>8</td>
<td>licenses.licx</td>
<td>licx file</td>
<td>Used by resource file</td>
</tr>
<tr>
<td>9</td>
<td>LOBSample.csproj</td>
<td>CSharp Project file</td>
<td>CSharp Project file</td>
</tr>
<tr>
<td>10</td>
<td>LOBSample.sln</td>
<td>CSharp solution file</td>
<td>CSharp Solution file</td>
</tr>
<tr>
<td>11</td>
<td>imageG30.jpg</td>
<td>Image file</td>
<td>Used by ReadMe.html</td>
</tr>
<tr>
<td>12</td>
<td>imageHHP.jpg</td>
<td>Image file</td>
<td>Used by ReadMe.html</td>
</tr>
<tr>
<td>13</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. Unzip CSharpLOBSample.zip
using Winzip or command utility
<p> 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 user</font>
<br><font color="#000000">
<connectstring> refers to the hostname.</font>
<p><font color="#000000"> 3.
Make sure 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">
4.</font> Create Database Stored Procedure by running StoredProcedure.sql
script.</font>
<br><font color="#000000">
SQL> @<path>StoredProcedure.sql</font>
<p> 5. Open LOBSample.sln
using VCSharp.Net Beta2..
<p> 6. Edit ConnectionParams.csfile
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> 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 + -