Help required in connecting to oracle db

This is a discussion on Help required in connecting to oracle db within the C Programming forums, part of the General Programming Boards category; Hi, I want to know how should i connect to Oracle DB from C program. I have installed Oracle client ...

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    2

    Help required in connecting to oracle db

    Hi,

    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.

    Thanks

  2. #2
    Registered User
    Join Date
    Nov 2005
    Posts
    95

    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
    http://www-db.stanford.edu/~ullman/f...e/or-proc.html

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    2
    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, 06:50 AM
  2. Replies: 28
    Last Post: 07-17-2006, 12:35 AM
  3. Replies: 10
    Last Post: 05-19-2006, 12:23 AM
  4. problem connecting to db using odbc
    By WaterNut in forum Windows Programming
    Replies: 4
    Last Post: 05-28-2004, 03:37 PM
  5. if is faster than switch?
    By skorman00 in forum C++ Programming
    Replies: 32
    Last Post: 03-06-2004, 01:15 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21