Solved

Storing byte[] into access table

Posted on 2007-04-07
3
187 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
ID: 18870903
0
 

Author Comment

by:HamidHossain
ID: 18871330
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
ID: 18877149
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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

733 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