如何使用C从数据库中检索数据 [英] how to retrieve data from database using C
本文介绍了如何使用C从数据库中检索数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从数据库中检索一组数据,并且有人可以共享用于检索数据的代码......我将在ubuntu中运行代码。
解决方案
好吧,鉴于你告诉我们你有哪些品种/类型的数据库/想要从中检索数据,我们只能采取疯狂的猜测
a)下载适用于数据库的Linux驱动程序 - 例如,对于MySQL,从这里开始 http://dev.mysql.com/downloads/ connector / c / [ ^ ](还有RedHat,FreeBSD和SUSE驱动程序可用)
b)安装驱动程序/连接器包
c)玩样本 - MySQL通常有一些例子说明如何做基础知识
d)为你自己的情况编写代码
I want to retrieve a set of data from database and can someone share the code for retrieving data... and i am going to run the code in ubuntu.
解决方案
well, given you havnt told us which breed/type of database you have/want to retrieve data from, we can only take a wild guess
a) download the appropriate Linux driver for the database - eg, for MySQL, start here http://dev.mysql.com/downloads/connector/c/[^] (there are RedHat, FreeBSD & SUSE drivers available as well)
b) Install driver/connector package
c) play with the samples - MySQL usually has some examples showing how to do the basics
d) write code for your own situation
这篇关于如何使用C从数据库中检索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文