Retrieving and printing an image from an ODBC database(Access 97).

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to retrieve an image from an Access 97 database and printing it on
a report.

I'm using a 'System.Data.OleDb.OleDbConnection()' object to connect to the
database, a OleDb.OleDbCommand(queryString, dbconn) object to querry, and a
OleDb.OleDbDataReader object to read the image. The read is working but it's
returning a system.array object and I don't know how to convert to an image.
 
Hi Islay,

Commonly the Access did not stored the pure Image data into database, it
also stored the OLE header. When we insert the Image into the Access
database, we use the Insert/Object, when the Access will create a OLE
header and store it into the database.

We recommended to store the image into SQL server as BLOB or Access as
binary field. That is to say, do not use the access inert/object menu.

Here are a few links for your reference.
HOW TO: Copy a Picture from a Database Directly to a PictureBox Control
with Visual Basic .NET
http://support.microsoft.com/?kbid=317670

How To Retrieve Bitmap from Access and Display It in Web Page
http://support.microsoft.com/kb/q175261/

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top