Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Image byte() in dataset to ACCESS 2007 attachment

Posted on 2010-09-20
6
Medium Priority
?
505 Views
Last Modified: 2013-11-26
I have an image which is stored in a VB.NET dataset as a  byte().  The image displays well in the VB.NET program.  I would like to save this image out to an ACCESS 2007 database.  I have previsouly created databases which save images as the attachment type in ACCESS..
    How do I convert the byte() array so that it can eb saved as an ACCESS 2007 attachment?   Or perhaps there is another method?
0
Comment
Question by:Zimbug4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Expert Comment

by:systan
ID: 33717103
Have you tried that psuedo code snippet?
Dim MemS As New MemoryStream()
Dim pic As Image
pic = image1.Image
SavePhoto(pic, MemS)//get the buffer from pic image to MemS
Dim PicImage() As Byte = MemS.GetBuffer
sqlCom.Parameters.Add(New MySqlParameter("?pi", SqlDbType.Blob)).Value = PicImage

Open in new window

0
 

Accepted Solution

by:
Zimbug4 earned 0 total points
ID: 33721593
This appears to use the blob type which as I understand it is not recommended for ACCESS.  ACCESS2007 has the attachment type which is supposed to get around these issues but I can't figure out how to use it in VB.NET.   I tried creating a dummy table in ACCESS with the attachment type, but VB.NET will read this as a string type.
 
 I'm wondering if I'm not better off saving it as a hyperlink and the image in a file.
0
 
LVL 14

Expert Comment

by:systan
ID: 33723379
Its not recommended, but if its usable, why not use it.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Expert Comment

by:Mohamed Abowarda
ID: 33723400
0
 
LVL 16

Expert Comment

by:13598
ID: 33725235
0
 

Author Closing Comment

by:Zimbug4
ID: 38178261
After looking through everything I decided at the time loading the database would make it large quickly.  This was probably the best solution
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question