By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,194 Members | 884 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,194 IT Pros & Developers. It's quick & easy.

Database Query

P: n/a
Can anybody tell me how SQL query can be done using C

Sep 25 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a

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

Sep 25 '06 #2

P: n/a
"krish" <kr************@gmail.comwrites:
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) ks***@mib.org <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.
Sep 25 '06 #3

P: n/a

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/docu...l/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 '06 #4

P: n/a
"krish" <kr************@gmail.comwrote in message
news:11*********************@d34g2000cwd.googlegro ups.com...
Can anybody tell me how SQL query can be done using C
Use VB.

--
Mabden
Oct 2 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.