473,385 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

serialize object to MSDE binary datatype

I need to find a way of serializing an object to a field in an msde table.
What I'm serializing is a report definition of a 3rd party report generator.
It's normally stored as a file on the local file system (has built in
functionality to handle), but that's not an option for what I need. I'm
familiar with using a filestream to serialize and deserialize images to the
table, but this obviously isn't an image --- any help would be greatly
appreciated.
Dec 15 '06 #1
3 1266
Matt,

The way an image is serialized can be used in fact with any object.
You can as well however use often the binaryformater.

http://www.vb-tips.com/dbpages.aspx?...c-61641f5c8d9d

There are also more samples how to make a blob (image type(

I hope this helps,

Cor

"Matt Fielder" <mf****************@nospam.nospamschreef in bericht
news:ec**************@TK2MSFTNGP03.phx.gbl...
>I need to find a way of serializing an object to a field in an msde table.
What I'm serializing is a report definition of a 3rd party report
generator. It's normally stored as a file on the local file system (has
built in functionality to handle), but that's not an option for what I
need. I'm familiar with using a filestream to serialize and deserialize
images to the table, but this obviously isn't an image --- any help would
be greatly appreciated.

Dec 15 '06 #2
Hi Matt,

To serialize the object to a byte array, the object class must be marked
with SerializableAttribute. So that we can use the BinaryFormatter to
serialize it to the array and save it to database.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Dec 15 '06 #3
Cor, That gets me going in the right direction - thanks, I appreciate it.

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:uI**************@TK2MSFTNGP04.phx.gbl...
Matt,

The way an image is serialized can be used in fact with any object.
You can as well however use often the binaryformater.

http://www.vb-tips.com/dbpages.aspx?...c-61641f5c8d9d

There are also more samples how to make a blob (image type(

I hope this helps,

Cor

"Matt Fielder" <mf****************@nospam.nospamschreef in bericht
news:ec**************@TK2MSFTNGP03.phx.gbl...
>>I need to find a way of serializing an object to a field in an msde table.
What I'm serializing is a report definition of a 3rd party report
generator. It's normally stored as a file on the local file system (has
built in functionality to handle), but that's not an option for what I
need. I'm familiar with using a filestream to serialize and deserialize
images to the table, but this obviously isn't an image --- any help would
be greatly appreciated.


Dec 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tom Rahav | last post by:
Hi! My question is whether it's possible to serialize an object into a binary file from one application, and then deserialize this object in a different application that has the same class. I...
10
by: Dan | last post by:
All I Am Attempting To Serialize An Object To An XML File. Here Is The Code For That public string SaveNewSurvey( MutualSurveyObject mso_TempObject, int i_JobID ) { string s_RootFileName;...
0
by: Ken Durden | last post by:
I'm getting the following exception coming out of a block of unmanaged C++ code. Thread executed for 1.03 sec and died with the following exception: External component has thrown an exception. ...
3
by: Gordz | last post by:
I've been experiencing problems on some computers with XML Serialization. On some computers the files do not get created on the web server's hard drive and it's been driving me nuts trying to...
1
by: js | last post by:
Does anybody knows how to solve the problem? I added attribute to the following classes in Microsoft.Practices.EnterpriseLibrary.Data namespace, but I still get the error. Thanks. ...
1
by: Tim | last post by:
Could anyone tell me what this means and how do I correct it. Any suggestions? Thanks! Tim Richardson IT Developer and Consultant www.paladin3d.com Unable to serialize the session state. In...
2
by: Joe | last post by:
If I serialize an object from with the same class, any fields with the NonSerializableAttribute still get serialized but not if I serialize from outside the class. Why? This is a simple case to...
3
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi, I am using dotnet remoting with a binarry formatter. I have a property that returns a memorystream that has had a file loaded into it. When I try to access this property though I get an...
8
by: Andy B | last post by:
I have the following code in a default.aspx web form page_load event. There seems to be a problem with line 5 (NewsArticle.Date = line). //create a news article NewsArticle NewsArticle = new...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.