Storing byte[] into access table

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
HamidHossainAsked:
Who is Participating?
 
p_davisCommented:
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
 
HamidHossainAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.