You have to use the C interface that's built into the database manager you are using. In other words, it depends on what DBM you are interfacing to: Oracle, SQL Server, DB2, etc. They should provide a "C language developers kit" or some such thing, that will have the appropriate headers in it. It's not generic, although the SQL standard (the X-Open version anyway) has a few things to say about interfacing with C (and other programming languages also).