Database Query

Discussion in 'C Programming' started by krish, Sep 25, 2006.

  1. krish

    krish Guest

    Can anybody tell me how SQL query can be done using C
    krish, Sep 25, 2006
    #1
    1. Advertising

  2. krish

    kondal Guest

    krish wrote:
    > Can anybody tell me how SQL query can be done using C


    Can you re-frame the question please. This is a group for 'standard C
    language'

    -kondal
    kondal, Sep 25, 2006
    #2
    1. Advertising

  3. "krish" <> writes:
    > Can anybody tell me how SQL query can be done using C


    Yes, but not here. You'll need to ask in a newsgroup that deals with
    databases. There's a comp.database.* hierarchy; quite possibly some
    group there has an FAQ that answers your question.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Sep 25, 2006
    #3
  4. krish

    Guest

    krish wrote:
    > Can anybody tell me how SQL query can be done using C


    Usually, it is done by one of the following methods:

    1. A database specific API call
    2. A standards based API call (such as ODBC, OLEDB, etc.)
    3. Embedded SQL.

    How to accomplish #1 will depend on your database. Often, you will
    have more than one choice, even here. For instance, with PostgreSQL,
    you might use LIBPQ:
    http://www.postgresql.org/files/documentation/books/aw_pgsql/node147.html

    How to accomplish #2 will depend on what methods and drivers you
    choose.
    With PostgreSQL, you might use:
    http://pgfoundry.org/projects/psqlodbc/
    for ODBC (among many ODBC driver possibilities)
    or you might use:
    http://pgfoundry.org/projects/oledb/
    among many OLEDB possibilities,
    etc.

    How to accomplish #3 will depend on what sort of support your database
    vendor offers.
    For instance, ECPG is the PostgreSQL embedded SQL processor.

    Note that none of this has anything to do with the C language, per se.
    Probably, a group that targets your exact database system is more
    appropriate. If you want to generically attach to arbitrary database
    systems, then you definitely want to use a standards based approach
    like ODBC or OLEDB.
    , Sep 27, 2006
    #4
  5. krish

    Mabden Guest

    "krish" <> wrote in message
    news:...
    > Can anybody tell me how SQL query can be done using C


    Use VB.

    --
    Mabden
    Mabden, Oct 2, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U1M=?=
    Replies:
    3
    Views:
    3,799
    Juan T. Llibre
    May 15, 2005
  2. Learner
    Replies:
    1
    Views:
    966
    Marina Levit [MVP]
    Jan 30, 2006
  3. Anonymous
    Replies:
    0
    Views:
    1,425
    Anonymous
    Oct 13, 2005
  4. David Gordon

    xpath query query

    David Gordon, May 18, 2005, in forum: XML
    Replies:
    2
    Views:
    768
    David Gordon
    May 18, 2005
  5. Eric Nelson
    Replies:
    5
    Views:
    1,497
    Alexey Smirnov
    Feb 4, 2009
Loading...

Share This Page