📄 db8setup.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> <a href="#Overview">Overview of File</a>
<br> <font color="#000000"><a href="#Create user">To Create a New
Database User</a></font>
<br><font color="#000000"><b> </b><a href="#create tables">To Create
Database Tables Required for the OLEDB Samples</a></font>
<br><font color="#000000"> <a href="#populate blob data">To Populate
BLOB data in Product_Information table</a></font>
<br>
<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> 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>
<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@<connect string>
<p><b>Step 2.</b> Execute
<br>
<i>syntax:</i> SQL> CREATE USER <username> IDENTIFIED BY <password>
DEFAULT TABLESPACE <tablespace name>;
<br>
<i>eg.</i> SQL> CREATE USER Oraole IDENTIFIED BY Oraole DEFAULT TABLESPACE
users;
<p><b>Step 3</b>. Grant privileges to the user created
<br>
<i>syntax:
</i>SQL> GRANT CONNECT, RESOURCE TO <username>;
<br>
<i>eg: </i> SQL> GRANT CONNECT, RESOURCE TO Oraole;
<br>
<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 <username>/<password>@<connect
string>
<br>
eg. Oraole/Oraole@mydatabase
<p><b>Step 2. </b>Execute SQL> @<path>Ora8OLEDBScript.sql
<br>
This script should create the following tables with data
<br>
a) Language
<br>
b) Supplier
<br>
c) Orders
<br>
d) Product_Information
<br>
e) Product_Descriptions
<br>
<p><b>Step 3.</b> To verify whether tables have been successfully created.
<br>
execute SQL> SELECT * FROM tab;
<br>
<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> For setting up LOB data in the Product_Information table the
required files are:
<br>
<table BORDER WIDTH="80%" >
<tr>
<td WIDTH="30%"><b> File Name</b></td>
<td><b>Description</b></td>
</tr>
<tr>
<td>setupLOB.vbp </td>
<td>The VB project file</td>
</tr>
<tr>
<td>frmSetup.frm </td>
<td>The VB form file</td>
</tr>
<tr>
<td>connectionParams.bas </td>
<td>Module containing connection information</td>
</tr>
<tr>
<td>Image\<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>. Mention datasource, username, password eg. myDatabase,
Oraole, Oraole
<p><b>Step 5. </b> Save connectionParams.bas
<p><b>Step 6.</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 7.</b> 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>
On successful updation a message is displayed.
<br>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -