Thread: Help required in connecting to oracle db

  1. #1
    Registered User
    Join Date
    Jan 2006

    Help required in connecting to oracle db


    I want to know how should i connect to Oracle DB from C program. I have installed Oracle client on my machine but could not find any references as to how to connect oracle db servres through the C program.

    Can anyone please let me know if i have to install any drivers or something like that.


  2. #2
    Registered User
    Join Date
    Nov 2005

    If you can connect

    If you can connect form the terminal window using
    "connect username/password"

    You should use the binary supplied by oracle.
    look in $OARCLE_HOME/bin for a binary named proc !

    The proc takes a *.pc file and compile it into *.c file.
    In the *.pc file use

    EXEC SQL CONNECT user/pass;

    Read more on proc

  3. #3
    Registered User
    Join Date
    Jan 2006
    It worked.

    Thanks Dude

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Connecting and disconnecting from DB: good coding?
    By fekkesh in forum C Programming
    Replies: 6
    Last Post: 03-14-2009, 05:50 AM
  2. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  3. Replies: 10
    Last Post: 05-18-2006, 11:23 PM
  4. problem connecting to db using odbc
    By WaterNut in forum Windows Programming
    Replies: 4
    Last Post: 05-28-2004, 02:37 PM
  5. if is faster than switch?
    By skorman00 in forum C++ Programming
    Replies: 32
    Last Post: 03-06-2004, 01:15 PM