[freetds] (newbie) Using tsql in C/C++

Ben Borofka bborofka at gmail.com
Thu Apr 21 17:37:37 EDT 2005


I'm writing an app (in Objective-C/Cocoa) that needs to connect to a
MS SQL 2000 Server. I'm able to compile and run tsql on OS X and it
works fine. I can connect to the server and issue SQL commands. Now I
just need to figure out how to put this functionality in my program.

This is where I'm getting really confused. I need to find some C/C++
code to do this, and the source code for freetds is really
overwhelming and complicated. All I need to be able to do is connect
to the server, exec a few stored procedures and get some output. I'm
looking for some samples, but the Documentation doesn't explain much
of using freetds w/ C at all.

Someone mentioned using the OTL wrappers but I can't get it to
compile. I've tried looking at the tsql source and it's pretty
confusing. Does anyone have a simple example doing what I'm trying to
do? Or can at least tell me the steps I need to take?

Thanks!

Ben


More information about the FreeTDS mailing list