資源簡介
客戶端 oracle sdk
代碼片段和文件信息
#ifdef?RCSID
static?char?*RCSid?=
???“$Header:?rdbms/demo/cdemo81.c?/main/10?2015/03/16?04:25:04?gak?Exp?$?“;
#endif?/*?RCSID?*/
/*?Copyright?(c)?1996?2015?Oracle?and/or?its?affiliates.?
All?rights?reserved.*/
/*
???NAME
?????cdemo81.c?-?Basic?OCI?V8?functionality
???DEscriptION
?*??An?example?program?which?adds?new?employee
?*??records?to?the?personnel?data?base.??Checking
?*??is?done?to?insure?the?integrity?of?the?data?base.
?*??The?employee?numbers?are?automatically?selected?using
?*??the?current?maximum?employee?number?as?the?start.
?*
?*??The?program?queries?the?user?for?data?as?follows:
?*
?*??Enter?employee?name:
?*??Enter?employee?job:
?*??Enter?employee?salary:
?*??Enter?employee?dept:
?*
?*??The?program?terminates?if?return?key?(CR)?is?entered
?*??when?the?employee?name?is?requested.
?*
?*??If?the?record?is?successfully?inserted?the?following
?*??is?printed:
?*
?*??“ename“?added?to?department?“dname“?as?employee?#?“empno“
???Demonstrates?creating?a?connection?a?session?and?executing?some?SQL.
???Also?shows?the?usage?of?allocating?memory?for?application?use?which?has?the
???life?time?of?the?handle.
???MODIFIED???(MM/DD/YY)
???gak?????????02/16/15?-?Bug?20364067
???aliu????????02/04/14?-?fix?bug?18181823
???aliu????????09/03/13?-?XbranchMerge?aliu_bug-16007835?from?st_rdbms_12.1.0.1
???aliu????????01/04/13?-?fix?bug?16007835?-?add?an?variable?for?connect?string?
??????????????????????????in?OCIServerAttach
???lburgess????04/14/06?-?lowercase?passwords?
???aliu????????04/21/06?-?use?OCIEnvCreate?and?exit?if?it?fails?
???mjaeger?????07/14/99?-?bug?808870:?OCCS:?convert?tabs?no?long?lines
???dchatter????10/14/98?-?add?the?usage?of?xtrmemsz?and?usrmempp
???azhao???????06/23/97?-?Use?OCIBindByPos?OCIBindByName;?clean?up
???echen???????12/17/96?-?OCI?beautification
???dchatter????07/18/96?-?delete?spurious?header?files
???dchatter????07/15/96?-?hda?is?a?ub4?array?to?prevent?bus?error
???mgianata????06/17/96?-?change?ociisc()?to?OCISessionBegin()
???aroy????????04/26/96?-?change?OCITransCommitt?->?OCITransCommit
???slari???????04/24/96?-?use?OCITransCommitt
???aroy????????02/21/96?-?fix?bug?in?get?descriptor?handle?call
???lchidamb????02/20/96?-?cdemo81.c?converted?for?v8?OCI
???lchidamb????02/20/96?-?Creation
*/
#include?
#include?
#include?
#include?
static?text?*username?=?(text?*)?“SCOTT“;
static?text?*password?=?(text?*)?“tiger“;
??/*?this?dbname?can?be?changed?to?point?to?a?remote?DB?for?demo?to?run?with?*/
static?text?*dbname???=?(text?*)?““;
/*?Define?SQL?statements?to?be?used?in?program.?*/
static?text?*insert?=?(text?*)“INSERT?INTO?emp(empno?ename?job?sal?deptno)\
??VALUES?(:empno?:ename?:job?:sal?:deptno)“;
static?text?*seldept?=?(text?*)“SELECT?dname?FROM?dept?WHERE?deptno?=?:1“;
static?text?*maxemp?=?(text?*)“SELECT?NVL(MAX(empno)?0)?FROM?emp“;
static?text?*selemp?=?(text?*)“SELECT?ename?job?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-03-08?13:36??instantclient_12_2\
?????目錄???????????0??2017-03-08?13:36??instantclient_12_2\sdk\
?????目錄???????????0??2017-03-08?13:36??instantclient_12_2\sdk\include\
?????文件???????10678??2005-07-07?11:39??instantclient_12_2\sdk\include\oci8dp.h
?????文件???????36602??2013-04-10?08:08??instantclient_12_2\sdk\include\occiCommon.h
?????文件???????74740??2012-09-14?07:41??instantclient_12_2\sdk\include\occiControl.h
?????文件????????7385??2005-09-25?18:59??instantclient_12_2\sdk\include\oci1.h
?????文件??????449732??2015-10-03?12:47??instantclient_12_2\sdk\include\ociap.h
?????文件??????161913??2014-06-27?20:40??instantclient_12_2\sdk\include\orl.h
?????文件????????7570??2017-03-07?22:46??instantclient_12_2\sdk\include\oratypes.h
?????文件???????81343??2017-03-07?22:46??instantclient_12_2\sdk\include\nzt.h
?????文件???????10092??2006-09-06?03:59??instantclient_12_2\sdk\include\xa.h
?????文件???????33254??2016-05-31?12:28??instantclient_12_2\sdk\include\odci.h
?????文件????????2193??2002-10-15?10:19??instantclient_12_2\sdk\include\occi.h
?????文件????????6359??2005-09-25?18:58??instantclient_12_2\sdk\include\ociapr.h
?????文件???????46071??2012-09-13?09:33??instantclient_12_2\sdk\include\ldap.h
?????文件??????113546??2016-08-13?01:03??instantclient_12_2\sdk\include\ocixstream.h
?????文件????????8366??2014-10-15?20:35??instantclient_12_2\sdk\include\ocixm
?????文件???????43761??2014-06-27?20:40??instantclient_12_2\sdk\include\oro.h
?????文件????????7830??2012-08-01?05:43??instantclient_12_2\sdk\include\ocixm
?????文件??????198229??2016-10-28?21:25??instantclient_12_2\sdk\include\oci.h
?????文件???????12028??2013-08-23?16:56??instantclient_12_2\sdk\include\occiAQ.h
?????文件???????43887??2005-09-25?19:58??instantclient_12_2\sdk\include\ocidef.h
?????文件????????9235??2005-07-07?11:38??instantclient_12_2\sdk\include\ociextp.h
?????文件???????15456??2006-08-02?05:13??instantclient_12_2\sdk\include\orid.h
?????文件??????126497??2011-07-09?01:43??instantclient_12_2\sdk\include\ort.h
?????文件????????4161??2005-07-07?10:38??instantclient_12_2\sdk\include\ocidem.h
?????文件????????6659??2005-09-25?18:58??instantclient_12_2\sdk\include\ocikpr.h
?????文件???????25688??2007-10-30?03:29??instantclient_12_2\sdk\include\occiob
?????文件???????12044??2013-03-12?09:17??instantclient_12_2\sdk\include\ocidfn.h
?????文件??????104870??2006-08-02?05:13??instantclient_12_2\sdk\include\ori.h
............此處省略29個文件信息
評論
共有 條評論