Vb.net 2008 how to save pic to mysql

i use vb.net 2008 how to save picture file to mysql server.
pls provide code. and what data type should i use on the mysql server.
aaronthamAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Sreedhar VengalaConnect With a Mentor Sr. Consultant - Business IntelligenceCommented:
0
 
Sreedhar VengalaSr. Consultant - Business IntelligenceCommented:
0
 
AxleWackConnect With a Mentor Commented:
Hi,

In your MrSQL DB, try saving the PATH where the images are being saved to. If all your pictures are being saved to your local pc : C:\Pictures, then save the path in the db. Example : If you have 2 column names :
 Car Types | Picture
  Ferarri      |  C:\Pictures\Ferarri.jpg
  Porsche   |  C:\Pictures\Porsche.jpg
  Bmw        |  C:\Pictures\Bmw.jpg

Just save he Path where the image is, under the Picture column in your DB. If you are saving the images to a server then your path would change to something like this : \\Servername\Pictures\Ferarri.jpg and so on.

Hope this helps in any way

0
 
aaronthamAuthor Commented:
hi AxleWack,

can i know the pro and con save pic direct to Mysql compare with your solution
0
 
AxleWackCommented:
Well the way I see it, is by saving the Path(which will be a text value) apposed to  saving an actual image, would be the speed to which your data will be loaded.

In your application you can use 1 picturebox/Image control, to load your images. All that needs to happen is, the picturebox/image control has to read the Path, and then display the image.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.