how to connect c++ program with database(Oracle)

Discussion in 'C++' started by shyam_oec, Jan 20, 2010.

  1. shyam_oec

    shyam_oec New Member

    Joined:
    Nov 26, 2007
    Messages:
    89
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Software Developer, .NET Framework
    Location:
    Jamshedpur
    hi,
    i am using Oracle 9i release 2, and Windows XP OS.For developing C++ application i am using eclipse IDE with MinGW toolkit. I want to know how to connect a c++ program to a database like Oracle. Database connectivity is quite easy in java or .net, but it seems quite difficult here. Any help?
    Thanks.
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    Have a look at the Oracle Call Interface (OCI).
    Assuming of course "a database like Oracle" means simply "Oracle". OCI won't work for other databases; it's Oracle-specific.
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    After a long break. Good to see you back :D
     
  4. shyam_oec

    shyam_oec New Member

    Joined:
    Nov 26, 2007
    Messages:
    89
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Software Developer, .NET Framework
    Location:
    Jamshedpur
    hi,
    I browsed through sufficient sited that have information about oracle call interface. From oracle's site i downloaded occi for gcc compiler.but i am feeling myself completely helpless regarding how to implement connectivity in c++ .
    please explain me if possible step by step (not necessarily in one day) how to retrieve data from oracle through my c++ program.
    Thanks:disappoin
     
  5. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    Yes, you will get confused if you confuse technologies. I said OC(one C)I, not OCC(two C's)I. These are not the same, and I don't recommend OCC(two C's)I.

    If you download the Companion disk (10g) or Examples disk (11g), this includes OCI examples that you can try out and study. These are good for getting you started. Also have a good read of the Oracle OCI Programmer's Guide.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice