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
Solved

Storing byte[] into access table

Posted on 2007-04-07
3
184 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

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)…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
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…

809 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