Objects in SQL Server - funny

Posts   
 
    
JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 26-Aug-2005 22:49:23   

I'm resigned to storing some objects directly into an image field in SQL Server. I figured that would mean serializing to a data stream and then store the byte array into field in my LLBLGenPro entity. I went a'googling like I always do just to see what other folks are doing and found this:

Diego F. wrote:

[Original message clipped]

Use binary formatter to serialize the object to a memory stream. Then store

the byte array in teh memory stream in an Image field in sqlserver. To read an object back, first create a memory stream from the Image field's data, then deserialize the data using the binary formatter. simple_smile

    Frans.

-- Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com My .NET Blog: http://weblogs.asp.net/fbouma Microsoft C# MVP

sunglasses

[Edit - I meant to type "memory stream" not "data stream" flushed ]

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 27-Aug-2005 04:57:28   

Jim, are you suprised? All road lead back to Frans and LLBLGen!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 27-Aug-2005 11:49:45   

smile

and I was thinking I was just stating the obvious wink

Frans Bouma | Lead developer LLBLGen Pro