Solved

Storing byte[] into access table

Posted on 2007-04-07
3
179 Views
Last Modified: 2013-12-17
Hi,

I have a value of type:

byte[385]

I want to save that value into an access file. Then i need to retrieve it later in the same format of bytes. Since i am very new in .Net I couldn't do it myself. What could be the correct field type to hold such a value and how to assign it and retrieve it. Sample code is highly appreciated.

Could you please help?

Regards,
Hamid
0
Comment
Question by:HamidHossain
3 Comments
 
LVL 15

Expert Comment

by:deepaknet
Comment Utility
0
 

Author Comment

by:HamidHossain
Comment Utility
deepaknet

Thanks for contributing. I checked that page out. It is showing a sql server example, while i need ms access. sample code is written by VB.Net, while i need C#

Couldn't get advantage of that page.

Hamid
0
 
LVL 22

Accepted Solution

by:
p_davis earned 50 total points
Comment Utility
all of the .net languages are very similar per the link that deepaknet posted a conversion of that might look something like
using System.IO;
using System.Data;
using System.Data.Odbc;
public Int32 SaveDocument(Stream docData, string docFileName)
        {
            Byte Filedata = new Byte(docData.Length-1);
            docData.Read(Filedata, 0, docData.Length);
            docData.Close();
            //etc..........
        }

you can use the odbc to connect to an access db.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now