How to save images in MySQL

Example requests & Code samples for GdPicture Toolkits.
Post Reply
regino
Posts: 1
Joined: Sat May 17, 2008 5:40 pm

How to save images in MySQL

Post by regino » Sat May 17, 2008 6:13 pm

You used OLE object in MS Access in your sample code.
What data type will you use in MySQL?
Please show us some code snippets in saving an image to/restoring an image from MySQL database in GDViewer Pro ActiveX

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: How to save images in MySQL

Post by Loïc » Mon May 19, 2008 1:42 pm

You used OLE object in MS Access in your sample code.
What data type will you use in MySQL?
Probably Blob. I am not an expert in MySql...
Please show us some code snippets in saving an image to/restoring an image from MySQL database in GDViewer Pro ActiveX
GdViewer Pro can only open image. It has not the hability to save. To write image you ca use GdPicture Light or GdPicture Pro.

To read I suggest you to find a way to store the content of a BLOB field of an sql table to an array of bytes.
Then, you will be able to open the image with GdViewer from this array using the DisplayFromByteArray() method.

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests