SQL using C

M

MJK

Hello All:

I am using SAS PROC SQL to work with database.

I was wondering if anyone has any comments on a good tutorial that I
can use to teach myself how to handle database using C language.

Thanks,
Mohsen
 
T

Tom St Denis

Hello All:

I am using SAS PROC SQL to work with database.

I was wondering if anyone has any comments on a good tutorial that I
can use to teach myself how to handle database using C language.

Thanks,
Mohsen

I don't know of any tutorials but what little DB work I have done in C
apps I pieced together by reading the HTML guides online [I use
postgresql].

Usually they seem to follow a similar form

1. connection to DB

2. format arguments in arrays of triple {column name, data, binary/
text} then you "exec" a query with your params (e.g. SELECT * from
table where blah = $1)

3. usually get some opaque "result" back which you then have to make
calls to extract columns from rows of the result.

It'd help to know which DB you're actually talking to. Any DB worth
it's weight has a C library binding of some sort.

Tom
 
V

Vincenzo Mercuri

Il 14/06/2010 19.14, MJK ha scritto:
Hello All:

I am using SAS PROC SQL to work with database.

I was wondering if anyone has any comments on a good tutorial that I
can use to teach myself how to handle database using C language.

Thanks,
Mohsen

Hi,
i hope you'll find these links helpful:

http://www.sqlite.org/c_interface.html

http://dev.mysql.com/doc/refman/5.5/en/c.html

http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html

http://www.kitebird.com/mysql-book/ch06-3ed.pdf
 
M

Moi

Hello All:

I am using SAS PROC SQL to work with database.



SAS PROC SQL does not work with a database.
It is just a proc that offers you SQL syntax to work
with SAS datasets.

SAS _does_ have modules to connect to
real databases, but these will effectively be
represented as SAS datasets.
I was wondering if anyone has any comments on a good tutorial that I can
use to teach myself how to handle database using C language.

I don't think you want C.
If you *do* want C, there are basically two ways:
1) use a library to do your SQL stuff
2) use embedded SQL

/off topic

HTH,
AvK
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top