Link to home
Start Free TrialLog in
Avatar of Cyber-Drugs
Cyber-DrugsFlag for United Kingdom of Great Britain and Northern Ireland

asked on

C# and MySQL - Storing a picture file into database

Hi guys 'n gals,

How would I go about saving a JPG picture into a MySQL Database, with C#? I know how to connect to the database, but I have no idea what I would go about converting the picture into data, which I can store into the database, let alone, reading it back out.


Any ideas?

Cheers!
ASKER CERTIFIED SOLUTION
Avatar of f_o_o_k_y
f_o_o_k_y
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of emrahtufan
emrahtufan

I dont know the exact needs of the application but I think, instead of inserting an image to the database, upploading it to the some server location and saving the path in the database is better.

Regards

emrah

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cyber-Drugs

ASKER

Thanks f_o_o_k_y and zajda82,

After a bit of tweaking, that did the trick!