📄 1768.html
字号:
<TR>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=296
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=76
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=100
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=98
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=79
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=103
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=26
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1
border=0></TD></TR>
<TR>
<TD colSpan=3><A title=linux知识宝库
href="index.html" tppabs="http://www.linuxhero.com/docs/index.html"><IMG height=83
src="images/header_r1_c1.gif" tppabs="http://www.linuxhero.com/docs/images/header_r1_c1.gif" width=472 border=0
name=header_r1_c1></A></TD>
<TD colSpan=3>
<form action="http://www.linuxhero.com/docs/search.html" method=get>
<table
style="BORDER-RIGHT: #c4c4c4 1px solid; BORDER-TOP: #c4c4c4 1px solid; BORDER-LEFT: #c4c4c4 1px solid; BORDER-BOTTOM: #c4c4c4 1px solid"
cellspacing=0 cellpadding=3 width="95%" border=0 align="center">
<tbody>
<tr>
<td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif">
<div align=center><font class=normalfont>搜索文章:
<input type=hidden value=result name=action2>
<input type=radio checked value=title name=type>标题
<input type=radio value=content name=type>内容
<input type=image src="images/button_go.gif" tppabs="http://www.linuxhero.com/docs/images/button_go.gif" border=0 name=image2>
</font></div>
</td>
</tr>
<tr>
<td noWrap>
<div align="center">
<input maxlength=100 size=30 name=keyword2>
</div>
</td>
</tr></tbody>
</table>
</form>
</TD>
<TD rowSpan=2><IMG src="images/header_r1_c7.gif" tppabs="http://www.linuxhero.com/docs/images/header_r1_c7.gif" width=26 border=0 name=header_r1_c7></TD>
<TD><IMG height=83 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 border=0></TD></TR>
<TR>
<TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif"><IMG height=22
src="images/header_r2_c1.gif" tppabs="http://www.linuxhero.com/docs/images/header_r2_c1.gif" width=296 border=0
name=header_r2_c1></TD>
<TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colSpan=5>
<DIV align=right><FONT class=normalfont>当前位置:
<A href="index.html" tppabs="http://www.linuxhero.com/docs/index.html">本站首页</A>
<font color="#FF6699">>></font>
<A href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</A> | <A href="copyright.html" tppabs="http://www.linuxhero.com/docs/copyright.html">版权说明</A></font></DIV>
</TD>
<TD><IMG height=22 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1
border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=10 cellPadding=0 width="100%" bgColor=#ffffff
border=0>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
<TR>
<TD vAlign=top align=middle width="60%">
<TABLE cellSpacing=0 cellPadding=0 width="100%"
background="images/back.gif" tppabs="http://www.linuxhero.com/docs/images/back.gif" border=0>
<TBODY>
<TR>
<TD vAlign=top width="80%">
<DIV align=center>
<FORM action="search.html" tppabs="http://www.linuxhero.com/docs/search.html" method=get>
</FORM>
<TABLE cellSpacing=0 cellPadding=0 width="95%"
border=0><TBODY>
<TR>
<TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif"
height=30></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=3 width="95%"
align=center border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%"
border=0>
<TBODY>
<TR>
<TD vAlign=top>
<p><FONT class=normalfont><B><font color=blue>用VC开发基于ORACLE数据库方法</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:作者<br>来自:Linux知识宝库<br>联系方式:无名<br><br>1. 引言<br>
<br>
ORACLE 公司自1979 年推出基于SQL 标准的关系数据库产品到1997 年版本8 的推出,ORACLE 数据库以其支持大数据库、多用户的高性能事务处理,对业界各项工业标准的支持,完整的安全和完整性控制,支持分布式数据库和分布处理,具有可移植性、可兼容性和可连接性等突出优点倍受用户喜爱,根据IDG1992 年全球UNIX 数据库的市场报告,ORACLE 占市场销售量的50%。而在客户端的开发工具方面,Visual C++ 也因其强大的功能和高度的灵活性等特点深受广大程序员的喜爱,因此本文旨在介绍使用Visual C++ 开发基于ORACLE 数据库应用程序的两种方法。<br>
<br>
2. 使用PRO*C 开发数据库应用<br>
<br>
2.1 PRO*C 工作原理<br>
<br>
PRO 系列是ORACLE 公司提供的在第三代高级程序设计语言中嵌入SQL 语句来访问数据库的一套预编译程序,包括PRO*Ada、PRO*C、PRO*COBOL、PRO*Fortran、PRO*Pascal 和PRO*PL/I 六种。程序员用相应的高级语言编写嵌入SQL 语句的PRO 源程序(若用C 语言则称为PRO*C 源程序)后运行相应的预编译程序,把嵌入的SQL 语句转换为标准的ORACLE 调用并生成目标源程序,即纯高级语言格式的源程序,然后就可以将这些源程序加入用户的程序中调用,其处理过程如下图。<br>
<br>
ORACLE 预编译程序提供如下功能:<br>
<br>
⑴能用六种通用的高级程序设计语言中的任何一种编写应用程序。<br>
<br>
⑵遵循ANSI 标准,在高级语言中嵌入SQL 语句。<br>
<br>
⑶可采用动态SQL 方法,让程序在运行时接受或构造一个有效的SQL 语句。<br>
<br>
⑷实现ORACLE 内部数据类型和高级语言数据类型之间的自动转换。<br>
<br>
⑸可通过在应用程序中嵌入PL/SQL 事物处理块来改进性能。<br>
<br>
⑹能在程序行和命令行上指定所需要的预编译可选项,并可在预编译的过程中改变它们的值。<br>
<br>
⑺能全面检查嵌入的SQL 数据操纵语句和PL/SQL 块的文法和语义。<br>
<br>
⑻可用SQL*Net 并行存取多个地点的ORACLE 数据库。<br>
<br>
⑼可把数组作为输入和输出程序变量使用。<br>
<br>
⑽能对应用程序中的代码段进行条件预编译。<br>
<br>
⑾提供了较强的异常处理功能。<br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -