mysql
lauky asked:


I can use mysql C api’s
i want to upload file using C prg in BLOB field of mysql database.
I am able to successfully upload other data varchar, date, time, no and also can estabalish sql connection.

Comments

go bubba go on 12 November, 2008 at 1:21 pm #

First you open a connection to the database and pass it any necessary credentials. Once you have a connection object, you use the mysql APIs to encode the necessary SQL to insert your data into the database. Keep in mind that it may be more efficient to simply store the relative file paths in the database, and leave the files somewhere unmolested on the file system. If you truly need the entire file uploaded into the database, make sure you are putting it into a BLOB or TEXT field.


Post a Comment
Name:
Email:
Website:
Comments: