Discussion:
[freetds] Where I can find examples of using dblib or ctlib?
Velichko Yuriy
2013-09-03 14:05:57 UTC
Permalink
Hello!

I'm new with freeTDS, so please sorry me for my silly question).

I need to connect to MSSQL server in my application(c/c++). For this
purpose I chose to use the FreeTDS libraries. As I understood the dblib
will be enough to work (select/insert/update data etc) with MSSQL server
(Am I right?).

But I can't find any examples how to do such things. In the FAQ said to
search in vendor's docs. But the links, in the FAQ, do not lead to the
necessary documentation.

Can anybody provides information about how to communicate with MSSQL Server
with FreeTDS's libs using c/c++ API.

I would be grateful for some code examples of how to connect to the server
and work with database.

Thanks!
--
Best Regards!
James K. Lowden
2013-09-05 03:17:11 UTC
Permalink
On Tue, 3 Sep 2013 17:05:57 +0300
Post by Velichko Yuriy
I need to connect to MSSQL server in my application(c/c++). For this
purpose I chose to use the FreeTDS libraries. As I understood the
dblib will be enough to work (select/insert/update data etc) with
MSSQL server (Am I right?).
Yes.
Post by Velichko Yuriy
I would be grateful for some code examples of how to connect to the
server and work with database.
You apparently didn't finish reading the fine manual. ;-)

http://www.freetds.org/userguide/samplecode.htm

HTH.

--jkl
Velichko Yuriy
2013-09-05 13:20:41 UTC
Permalink
Post by James K. Lowden
On Tue, 3 Sep 2013 17:05:57 +0300
Post by Velichko Yuriy
I need to connect to MSSQL server in my application(c/c++). For this
purpose I chose to use the FreeTDS libraries. As I understood the
dblib will be enough to work (select/insert/update data etc) with
MSSQL server (Am I right?).
Yes.
Post by Velichko Yuriy
I would be grateful for some code examples of how to connect to the
server and work with database.
You apparently didn't finish reading the fine manual. ;-)
http://www.freetds.org/userguide/samplecode.htm
Yes, thanks for the link.

And yes - you are right, I did not scroll down the page to this point )

Please, add the reference on this sample in the FAQ, it will be helpful for
other new users.
Post by James K. Lowden
HTH.
--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
--
Best Regards!
James K. Lowden
2013-09-06 01:31:18 UTC
Permalink
On Thu, 5 Sep 2013 16:20:41 +0300
Post by Velichko Yuriy
And yes - you are right, I did not scroll down the page to this point )
Please, add the reference on this sample in the FAQ, it will be
helpful for other new users.
Thanks for mentioning it. It's hard to anticipate how people go about
looking for stuff. The FAQ is a kind of quick subject index to the
project. I guess you're right that nowadays db-lib examples are rarer
than they once were because the vendors would like us to
forget about it.

--jkl

Loading...