Home » Developer & Programmer » Precompilers, OCI & OCCI » Example for OCI or OCCI needed
Example for OCI or OCCI needed [message #182289] Fri, 14 July 2006 03:26 Go to next message
ora_fan
Messages: 4
Registered: July 2006
Location: Heidelberg, Germany
Junior Member
Hi,

I need simple examples of c and c++ programms for OCI and OCCI application. A connect statement and a select statement in the code are all right. Tell me please how to compile it and which lib should be linked (on Linux). I'm new in this area.

Thanks.
Re: Example for OCI or OCCI needed [message #189524 is a reply to message #182289] Fri, 25 August 2006 00:36 Go to previous messageGo to next message
kmohan
Messages: 28
Registered: July 2005
Junior Member
use Instant client SDK and runtime (Basic) to build and run your OCI and OCCI applications. You can download it here:
http://www.oracle.com/technology/tech/oci/instantclient/index.html

I think it has samples too, otherwise you can get some OCCI samples here:
http://www.oracle.com/technology/tech/oci/occi/index.html
Re: Example for OCI or OCCI needed [message #359127 is a reply to message #182289] Thu, 13 November 2008 17:16 Go to previous messageGo to next message
landonmkelsey
Messages: 4
Registered: November 2008
Location: Texas
Junior Member
I have an OCI C++ program that works under Redhat Linux Fedora 9.

The code also works under MS Visual Studio (I have not tried it lately!).

Difficult for me since I have Oracle 11g1 installed under Linux.

I may do the Windows 11g1 install soon!

Requires installing a 11g1 client(easy) and telling Visual Studio where the libraries and include files are

Code attached

download code
unzip
untar
run a simple sql create script
make
oci_oop_main...bingo

I am developing classes for embedded dynamic SQL using

OCI(Oracle Call Interface) which are simple to use. The complexity of

OCI/RDB is hidden and OCI access is fast!

RDB* rdbx = new RDB("landon/password@sid"); // instantiate

// create array of structures, one structure per row
// structure elements are column values...then:

rdbx->insert_structs(address of array of structures); or reverse

rdbx->select_structs(address of array of structures);


Re: Example for OCI or OCCI needed [message #359128 is a reply to message #182289] Thu, 13 November 2008 17:17 Go to previous messageGo to next message
landonmkelsey
Messages: 4
Registered: November 2008
Location: Texas
Junior Member
what are your Linux and Oracle versions?
Re: Example for OCI or OCCI needed [message #359158 is a reply to message #359128] Thu, 13 November 2008 23:22 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Do you really think that someone that have posted this 2 years ago and then never connected will answer your question?

Regards
Michel
Re: Example for OCI or OCCI needed [message #359288 is a reply to message #359158] Fri, 14 November 2008 09:34 Go to previous messageGo to next message
landonmkelsey
Messages: 4
Registered: November 2008
Location: Texas
Junior Member
and...did it occur to you that a new guy on the forum might not have noticed the date?

I've seen this type of angry contentious attitude in other forums and I do not need it. These types of forums seem to dry up to nothing fast!

Usually some little boy off his meds or lost his skateboard and his mommy cannot find it.

OR "lack of degree itis"

I am out of this forum!

I am finding that the people who can answer questions are usually not inclined to!
Re: Example for OCI or OCCI needed [message #359296 is a reply to message #359288] Fri, 14 November 2008 10:40 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
did it occur to you that a new guy on the forum might not have noticed the date?

I thought new guys try to answer to new question and not to find the oldest one.

Quote:
These types of forums seem to dry up to nothing fast!

This forum is more thann 6 years old and contains more than 70000 registered members, almost 95000 topics and 350000 posts.

Quote:
I am out of this forum!

Guess who lose more.

Regards
Michel
Re: Example for OCI or OCCI needed [message #359298 is a reply to message #359296] Fri, 14 November 2008 10:49 Go to previous messageGo to next message
landonmkelsey
Messages: 4
Registered: November 2008
Location: Texas
Junior Member
the manners of the French...bingo

btw learn to read english
Re: Example for OCI or OCCI needed [message #359303 is a reply to message #359298] Fri, 14 November 2008 11:15 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
btw learn to read english

Teach me.

By the way, learn to read Forum Guide (and try to be less racist).

Regards
Michel

[Updated on: Fri, 14 November 2008 11:15]

Report message to a moderator

Previous Topic: How can I compile simple PRO*C code in Linux
Next Topic: Problem connect to Database!Please help me
Goto Forum:
  


Current Time: Sun Dec 04 12:22:46 CST 2016

Total time taken to generate the page: 0.10673 seconds