Re: How to store objects created with C# in database in .NET Framework

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



May this helps you,
- Serialize your object at run-time using binary formatter into byte stream
- Store the binary data into sql server database as BLOB like how you store
images etc as binary data
- On extraction, get the binary data stream as byte[] and deseializer it to
get actual object

Or You may want to use the way given in the following link,
http://www.codeproject.com/cs/database/persistedobject.asp

HTH,

"basulasz" <basulasz@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:70B8BE55-A0BA-4BAF-8283-E67B0C9B7782@xxxxxxxxxxxxxxxx
> I want to store the objects that i create in run time in database. In a
way
> that, for a product a create an object from a class written with C#,
define
> its properties and functions that it has, and want to store it in a
database
> (SQL Server 2K). I want the columns to be created and filled dynamically
when
> an object is inserted in db (Just like in J2EE, which is called i think
> relational mapping, or something like this).
>
> How can I do that?


.



Relevant Pages

  • Re: meta data & full text search
    ... There are more issues (transaction control, change control, audit of ... storing the files in a SQL Server table's column defined with an IMAGE ... if you store the files ... consistency of the database, indices, backup, restore, etc. ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Database options
    ... > be able synchronize the Pocket PC database with its PC counterpart. ... > app to be a stand-alone app not needing an MS SQL server. ... we supply an object database engine that allows you to store C# ... objects directly: db4o. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Database options
    ... > be able synchronize the Pocket PC database with its PC counterpart. ... > app to be a stand-alone app not needing an MS SQL server. ... we supply an object database engine that allows you to store C# ... objects directly: db4o. ...
    (microsoft.public.pocketpc.developer)
  • Re: Storing Negative vs. Positive Values in DB
    ... I would store the ... > Thanks, Tom, but are you suggesting that maybe Access does have problems? ... > We give our users the option of using either Access or SQL Server. ... >> Perhaps a stupid database design question, ...
    (microsoft.public.vb.database.ado)
  • Variable to store binary data.
    ... I'm opening a binary file (jpg image) with the Open statement. ... What I'm trying to do next is to store the files's contents on a SQL Server table. ... What confuses me is what type of variable to use in the Get statement to store the binary data and then pass it to the ADO parameter. ...
    (microsoft.public.vb.syntax)