Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello,
I want to write a C program in Linux Platform to update a database server. Is it technically possible to access a database server
using C- Programming?
Assuming that you want to update the data at the database, just look for C bindings for your database server. For MySQL C API, have a look at http://dev.mysql.com/doc/refman/5.1/en/c.html. Contact your vendor for further information.
By the way, you post on embedded systems session. Will this be used from a embedded device? Would you explain the purpose of it?
Hello,
Actually I need to update a data in a database using C program in Linux platform. This is for an embedded device running a Linux OS. Since the memory is low we are thinking about C-Programming. Any c,c++ variants can be used. If you please, tell me the logic how a database accessing works?
As someone already described, most database servers have C bindings to allow your application to access the database. In the two cases I have tried, the API allows you to compose SQL queries to manipulate the database in much the same way you would do it interactively with any other tool. You send queries as strings, and read the replies as strings, arrays, etc.
What DBMS are you using?
i would assume the mysql client is written in c so of course re-implimenting another client to connect to a mysql database server is possible (i suppose other database servers should work as well). mysql can connect to other hosts on a network.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.