473,383 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Reading access ole fields

Along time ago I created an access database where I used the ole field type
to store images. If I look at the table data it has the work Picture in its
field. The image in that field displays properly if I display it from
inside of access but I can't figure out how to convert what's in there to
anything useful outside of access.

Is there some way to read what's in there from a .net application? I would
be content with just being able to display the picture in an application but
really I would like a way to extract them from there and converting them to
a real picture format. Can someone help me out with this dilemma please.
Thanks.
Nov 20 '05 #1
1 1663
Hi,

Access stores the images in binary format. Here is a function that
converts the binary data into a bitmap. I put a parameter for offset
because the northwind database has an offset of 78.

Private Function ConvertToBitmap(ByVal data() As Byte, ByVal offset As
Integer) As Bitmap

Dim ms As New System.IO.MemoryStream

Dim bm As Bitmap

ms = New MemoryStream

ms.Write(data, offset, data.Length - offset)

bm = New Bitmap(ms)

Return bm

End Function

Ken
-------------
"Marco Castro" <ma**************@benlan.com> wrote in message
news:uS**************@TK2MSFTNGP11.phx.gbl...
Along time ago I created an access database where I used the ole field type to store images. If I look at the table data it has the work Picture in its field. The image in that field displays properly if I display it from
inside of access but I can't figure out how to convert what's in there to
anything useful outside of access.

Is there some way to read what's in there from a .net application? I would be content with just being able to display the picture in an application but really I would like a way to extract them from there and converting them to a real picture format. Can someone help me out with this dilemma please.
Thanks.

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Dietrich Epp | last post by:
Are there any good modules for reading a bitstream? Specifically, I have a string and I want to be able to get the next N bits as an integer. Right now I'm using struct.unpack and bit operations,...
1
by: Boris Wilhelms | last post by:
Hello all, at first, sorry for my bad English, I’ll give my best  We have a strange problem reading Text- and VarChar-Fields. Our configuration: -Windows 2003 Server -MySQL Server 3.23.36...
6
by: Paul | last post by:
I was wondering if anyone has had an issue where using vba code to read an excel file and import the data into an access table some records are not imported from the excel file. It seems looking at...
2
by: Konstantinos | last post by:
How to use composite keys? How do they migrate as FKs, how to input them from a form etc... Cheers! Konstantinos
0
by: Thomas Zimmermann | last post by:
Hi I have an Accesss 97 database that imports data from an Oracle database. Some of the text fileds in the oreacle database have a fileds size larger than 255 characters. If I just link the...
16
by: Roy | last post by:
I use a Access 2K application.I am trying to use Chuck Grimsby(clsReadTextFile.txt)class utility to read a text file and then do a import of the same into my database.The question is how to call...
13
by: lare | last post by:
Hi, I am currently having one problem with my access application, which was developed in MS OFFICE ACCESS 2000 under the WINDOWS 2000 – PROFESSIONAL. When I copy and run my application on the laptop,...
0
by: Anish G | last post by:
Hi, I have an issue with reading CSV files. I am to reading CSV file and putting it in a Datatable in C#. I am using a regular expression to read the values. Below is the code. Now, it reads...
6
by: efrenba | last post by:
Hi, I came from delphi world and now I'm doing my first steps in C++. I'm using C++builder because its ide is like delphi although I'm trying to avoid the vcl. I need to insert new features...
1
by: CodeSeeker | last post by:
I have an application, which uses pop3 to read the messages from the mailbox, and it has been working fine for so many year. We recently have started changing this application to use java mail IMAP 4...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.