⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 db8setup.html

📁 LOB objects for oracle database,inserting them to database
💻 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="Reghu">
   <meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; I) [Netscape]">
   <title>Database setup</title>
</head>
<body>
<b><u><font face="Arial,Helvetica"><font color="#000099"><font size=+2>INSTRUCTIONS
FOR SETTING UP DATABASE TABLES REQUIRED BY THE OLEDB SAMPLES</font></font></font></u></b>
<p>This file has the following sections:
<p>&nbsp;<a href="#Overview">Overview of File</a>
<br>&nbsp;<font color="#000000"><a href="#Create user">To Create a New
Database User</a></font>
<br><font color="#000000"><b>&nbsp;</b><a href="#create tables">To Create
Database Tables Required for the OLEDB Samples</a></font>
<br><font color="#000000">&nbsp;<a href="#populate blob data">To Populate
BLOB data in Product_Information table</a></font>
<br>&nbsp;
<p><a NAME="Overview"></a><b><u><font face="Arial,Helvetica"><font color="#000099"><font size=+1>Overview
of File</font></font></font></u></b>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This file provides information about
how to setup the database tables used in OLEDB samples. This file can be
used with Oracle 8.x and above.
<br>&nbsp;
<p><a NAME="Create user"></a><b><u><font face="Arial,Helvetica"><font color="#000099"><font size=+1>To
Create a New Database User</font></font></font></u></b>
<p><b>Step 1.</b> Connect to SQL*Plus as a user with DBA privileges e.g..
system/manager@&lt;connect string>
<p><b>Step 2.</b> Execute
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>syntax:</i> SQL> CREATE USER &lt;username> IDENTIFIED BY &lt;password>
DEFAULT TABLESPACE &lt;tablespace name>;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>eg.</i> SQL> CREATE USER Oraole&nbsp; IDENTIFIED BY Oraole DEFAULT TABLESPACE
users;
<p><b>Step 3</b>. Grant privileges to the user created
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>syntax:
</i>SQL> GRANT CONNECT, RESOURCE&nbsp; TO &lt;username>;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>eg:&nbsp;</i> SQL> GRANT CONNECT, RESOURCE TO Oraole;
<br>&nbsp;
<p><a NAME="create tables"></a><b><u><font face="Arial,Helvetica"><font color="#000099"><font size=+1>To
Create Database Tables Required for the OLEDB Samples</font></font></font></u></b>
<p><b>Step 1</b>. Connect to SQL*Plus using &lt;username>/&lt;password>@&lt;connect
string>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
eg. Oraole/Oraole@mydatabase
<p><b>Step 2. </b>Execute&nbsp; SQL> @&lt;path>Ora8OLEDBScript.sql
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
This script should create the following tables with data
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
a) Language
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
b) Supplier
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
c) Orders
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
d) Product_Information
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
e) Product_Descriptions
<br>&nbsp;
<p><b>Step 3.</b> To verify whether tables have been successfully created.
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
execute&nbsp;&nbsp; SQL> SELECT * FROM tab;
<br>&nbsp;
<p><a NAME="populate blob data"></a><b><u><font face="Arial,Helvetica"><font color="#000099"><font size=+1>To
Populate BLOB data in Product_Information table</font></font></font></u></b>
<p>&nbsp; For setting up LOB data in the Product_Information table the
required files are:
<br>&nbsp;
<table BORDER WIDTH="80%" >
<tr>
<td WIDTH="30%"><b>&nbsp;File Name</b></td>

<td><b>Description</b></td>
</tr>

<tr>
<td>setupLOB.vbp&nbsp;</td>

<td>The VB project file</td>
</tr>

<tr>
<td>frmSetup.frm&nbsp;</td>

<td>The VB form file</td>
</tr>

<tr>
<td>connectionParams.bas&nbsp;</td>

<td>Module containing connection information</td>
</tr>

<tr>
<td>Image\&lt;FileName.gif></td>

<td>Product Images are supplied for few products for initial setup.</td>

<td></td>
</tr>
</table>

<p><b>Step 1</b>. Open MS-Visual Basic 6.0 .
<p><b>Step 2.</b> Open setupLOB.vbp from the current sample path.
<p><b>Step 3.</b> Open module connectionParams.bas.
<p><b>Step 4</b>.&nbsp; Mention datasource, username, password eg. myDatabase,
Oraole, Oraole
<p><b>Step 5.&nbsp;</b> Save connectionParams.bas
<p><b>Step 6.</b> Go to project -> References -> Select Microsoft ActiveX
Data Objects 2.0&nbsp; Library or above
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
and select&nbsp; Microsoft ActiveX Data Objects Recordset 2.0 Library or
above
<p><b>Step 7.</b>&nbsp; Run the project.
<p><b>Step 8.</b> Click the "Populate Data" button. The Product_image column
should get loaded in the Product_Information table.
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
On successful updation a message is displayed.
<br>&nbsp;
<br>&nbsp;
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -