Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

storing byte array (byte[] C#) in database Expand / Collapse
Author
Message
Posted Tuesday, June 10, 2008 12:04 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, October 15, 2009 12:32 AM
Points: 14, Visits: 45
How to store byte[] values into database (single column) and How to convert back to byte[]?
Post #514694
Posted Tuesday, June 10, 2008 1:18 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, January 07, 2014 2:21 PM
Points: 169, Visits: 813
I looked up reading and writing images to and from the database, because I think the concept would be similar. A nice explanation with some C# code is here:
http://www.akadia.com/services/dotnet_read_write_blob.html
Post #514770
Posted Tuesday, June 10, 2008 1:27 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, January 07, 2014 2:21 PM
Points: 169, Visits: 813
One more thing...this article uses the"image" data type. You should also research the binary and varbinary datatypes that I believe can be written and read in the same way. Someone correct me if I'm wrong.
Hope this helps.
Post #514778
Posted Tuesday, June 10, 2008 2:09 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Monday, April 14, 2014 1:34 PM
Points: 15,442, Visits: 9,588
Yeah, use varbinary instead of image.

- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #514812
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse