How do you store .JPG in ACCESS using VB.NET

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

Guest

I have written a program to store images. But it stores them as long which
does not allow them to be automatically rendered on a form or a report.

I know they will bloat as they have to be de-compressed and stored in DMP
EMF format. Storing them in a database is a no. no but it is easier for
maintenance and security for what I am doing.

I have to do this in VB.NET. The current program is using a data set and
adding the image raw.

The actual requirement is store ID photo's in a single database to allow
access and browsing by HTML on PDA'S and by a local smart client for PC's

I have a whole set of photo's to add that are in JPG format, the program
zips through them fast enough but they can't be rendered. If I add them
manually using ACCESS it works a dream, but I don't want to add them
manually,.


I want to provide the solution initially in ACCESS before proposing to do it
properly in SQL server. It just allows me to knock up some simple forms and
reports quicker.
 
Hi.
I have to do this in VB.NET.

You've mistakenly posted your question in the Microsoft Access (the database
application that's part of MS Office Professional) newsgroup. Access uses
VBA, Jet SQL or any SQL dialect of the database server the front end is
connected to via a SQL Pass-through query. No other programming languages
are currently supported.

Please post your question in a more appropriate newsgroup.

HTH.

Gunny
 
Yeah I just get bounced around.

I thought if I could find a solution hear in VBA land I could convert to .NET

Which is the way it it heading.
 
Hi.

By the time you finish a prototype in Access, then convert the code to
VB.Net manually, you probably could have built a working VB.Net application
that connects to SQL Server directly.

You may find some helpful VBA code and information at Stephen Lebans' Web
site. Try the following Web page:

http://www.lebans.com/loadjpeggif.htm

For the table of contents on his other VBA code samples and tips, please see
the following Web page:

http://www.lebans.com/toc.htm

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that the first and
best answers are often given to those who have a history of rewarding the
contributors who have taken the time to answer questions correctly.
 
You won't find anything like a "direct translation" because in VB.NET, I am
sure you will be using ADO.NET for your I/O to the Jet database (often
mistakenly referred to as "Access" database, even by 'softies). Not only is
ADO.NET not supported in any version of Access, it is built on a different
object model than either the "classic ADO" of Access or Access' DAO.

But, just in case it might help with storing images in Jet, you could take a
look at the example databases you'll find at http://accdevel.tripod.com.
They are freely downloadable. But, again, I don't think you'll find much
that "translates" to .NET.

Larry Linson
Microsoft Office Access MVP
 
Back
Top