Connect to DATA BASE (ORACLE)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sanjay

    Connect to DATA BASE (ORACLE)

    Hi to all the people. please will u tell how can i Connect to the
    Database through C program. i have No clarity in that.
  • Walter Roberson

    #2
    Re: Connect to DATA BASE (ORACLE)

    In article <g17fr6$pq5$1@a ioe.org>, sanjay <nospam@nospam. comwrote:
    >Hi to all the people. please will u tell how can i Connect to the
    >Database through C program. i have No clarity in that.
    It is not possible using only routines that are part of standard C.
    You will need to use routines that are not part of C itself
    (though, of course, calling those routines from within your C program).

    For some operating systems and some databases, you can use
    operating-system supplied routines to make the connection, with
    the operating system providing a standard connection interface
    that is database independant.

    For other operating systems, or for databases that do not have
    that kind of interface available, or for doing operations that are
    not within the scope of those operating-system supplied interfaces,
    you will have to use routines supplied by the database manufacturer.

    Some databases provide an interface that is based upon TCP/IP
    network protocols, with it being expected that you will do all
    the hand-coding to open a network connection and communicate back
    and forth with the database.

    Clearly the details of how you should proceed vary, based upon
    product and operating system differences. There is no standard way
    to communicate with -all- kinds of databases (though some have
    evolved well-defined interfaces intended for use amongst multiple
    competing products.)

    For further details, you will need to consult a newsgroup
    that deals with your particular database, and possibly also a
    newsgroup that deals with your operating system.
    --
    "He wove a great web of knowledge, linking everything together,
    and sat modestly at a switchboard at the center, eager to help."
    -- Walter Kerr

    Comment

    • CBFalconer

      #3
      Re: Connect to DATA BASE (ORACLE)

      sanjay wrote:
      >
      Hi to all the people. please will u tell how can i Connect to the
      Database through C program. i have No clarity in that.
      Better make up your mind. Do you want u to help you, or do you
      want 'all the people' to help you? U hasn't posted here for quite
      some time. In addition, a Database is probably off-topic in this
      newsgroup. At any rate, I would consider using text.

      --
      [mail]: Chuck F (cbfalconer at maineline dot net)
      [page]: <http://cbfalconer.home .att.net>
      Try the download section.


      ** Posted from http://www.teranews.com **

      Comment

      • user923005

        #4
        Re: Connect to DATA BASE (ORACLE)

        On May 23, 3:18 pm, sanjay <nos...@nospam. comwrote:
        Hi to all the people. please will u tell how can i Connect to the
        Database through C program. i have No clarity in that.
        Probably, one of the oracle or database newsgroups is a better bet
        than news:comp.lang. c

        The language itself does not offer any pre-defined method to do that.

        There are ways to connect to a database that have standards for them:

        1. Embedded C or Module Language C : http://www.itl.nist.gov/div897/ctg/sql_form.htm
        2. ODBC or SQL/CLI (see : http://www.sqlsummit.com/DataAcce.htm )
        3. OLEDB (see : http://www.sqlsummit.com/DataAcce.htm )
        4. .NET (assumes Windows or MONO) (see : http://www.sqlsummit.com/DataAcce.htm
        )

        You can also connect with a database specific API. Oracle's API is
        called OCI: http://www.oracle.com/technology/tech/oci/index.html
        You can also connect with a tool designed for that sort of thing like
        OTL: http://otl.sourceforge.net/

        Probably, you will want to find a newsgroup that caters to your exact
        question (which is not really about the C programming language at
        all).

        Comment

        • sanjay

          #5
          Re: Connect to DATA BASE (ORACLE)

          Hi walter thx for ur reply. it is interesting to read but when i go back
          to coding it still hasnt helped me know what to type :(

          Walter Roberson wrote:
          In article <g17fr6$pq5$1@a ioe.org>, sanjay <nospam@nospam. comwrote:
          >
          >>Hi to all the people. please will u tell how can i Connect to the
          >>Database through C program. i have No clarity in that.
          >
          >
          It is not possible using only routines that are part of standard C.
          You will need to use routines that are not part of C itself
          (though, of course, calling those routines from within your C program).
          >
          For some operating systems and some databases, you can use
          operating-system supplied routines to make the connection, with
          the operating system providing a standard connection interface
          that is database independant.
          >
          For other operating systems, or for databases that do not have
          that kind of interface available, or for doing operations that are
          not within the scope of those operating-system supplied interfaces,
          you will have to use routines supplied by the database manufacturer.
          >
          Some databases provide an interface that is based upon TCP/IP
          network protocols, with it being expected that you will do all
          the hand-coding to open a network connection and communicate back
          and forth with the database.
          >
          Clearly the details of how you should proceed vary, based upon
          product and operating system differences. There is no standard way
          to communicate with -all- kinds of databases (though some have
          evolved well-defined interfaces intended for use amongst multiple
          competing products.)
          >
          For further details, you will need to consult a newsgroup
          that deals with your particular database, and possibly also a
          newsgroup that deals with your operating system.

          Comment

          • kk

            #6
            Re: Connect to DATA BASE (ORACLE)

            Hello,

            By using pro*c you can connect database. what's ur os. first create a
            file and save it with extension name is .pc and compile it with proc
            <filename.pcthe n compile it with cc and execute it with a.out if u r
            using unix os.

            the code looks like this:

            #include <sqlca.h>
            main()
            {

            varchar uid[]="system",passw d[]="manager";

            EXEC SQL connect :uid identified by :passwd;

            printf("success fully connected to database");

            /* u r code goes here */

            }


            sanjay wrote:
            Hi walter thx for ur reply. it is interesting to read but when i go back
            to coding it still hasnt helped me know what to type :(
            >
            Walter Roberson wrote:
            >
            >In article <g17fr6$pq5$1@a ioe.org>, sanjay <nospam@nospam. comwrote:
            >>
            >>Hi to all the people. please will u tell how can i Connect to the
            >>Database through C program. i have No clarity in that.
            >>
            >>
            >>
            >It is not possible using only routines that are part of standard C.
            >You will need to use routines that are not part of C itself
            >(though, of course, calling those routines from within your C program).
            >>
            >For some operating systems and some databases, you can use
            >operating-system supplied routines to make the connection, with
            >the operating system providing a standard connection interface
            >that is database independant.
            >>
            >For other operating systems, or for databases that do not have
            >that kind of interface available, or for doing operations that are
            >not within the scope of those operating-system supplied interfaces,
            >you will have to use routines supplied by the database manufacturer.
            >>
            >Some databases provide an interface that is based upon TCP/IP
            >network protocols, with it being expected that you will do all
            >the hand-coding to open a network connection and communicate back
            >and forth with the database.
            >>
            >Clearly the details of how you should proceed vary, based upon
            >product and operating system differences. There is no standard way
            >to communicate with -all- kinds of databases (though some have
            >evolved well-defined interfaces intended for use amongst multiple
            >competing products.)
            >>
            >For further details, you will need to consult a newsgroup
            >that deals with your particular database, and possibly also a
            >newsgroup that deals with your operating system.

            Comment

            • Default User

              #7
              Re: Connect to DATA BASE (ORACLE)

              sanjay wrote:
              Hi walter thx for ur reply. it is interesting to read but when i go
              back to coding it still hasnt helped me know what to type :(
              You still aren't getting the message. You are in the wrong group.
              Either find a group or mailing list for your software package, or try
              comp.databases.

              Drop the text-speak.

              Please don't top-post. Your replies belong following or interspersed
              with properly trimmed quotes. See the majority of other posts in the
              newsgroup, or:
              <http://www.caliburn.nl/topposting.html >




              Brian

              Comment

              • Default User

                #8
                Re: Connect to DATA BASE (ORACLE) - TPA

                kk wrote:
                Hello,
                Please don't top-post. Your replies belong following or interspersed
                with properly trimmed quotes. See the majority of other posts in the
                newsgroup, or:
                <http://www.caliburn.nl/topposting.html >

                Comment

                Working...