Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 26th, 2005, 09:30 PM
Registered User
 
Join Date: Jul 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default any new idea about serialize(save) object into dat

hey!nice to meet you,everyone.you can call me bill.can we make friends?
recently i posted a problem on the forum and havenot had a better
answer.i know i am not clever.but could you please help me a little
more? my question is:how to serialize(save) object into database
field(SQL Server)?for a instance:
     <serializable()>_
   public class employee
     private _name as string
     private _age as string
   public property name() as string
     get
       return me._name
     end get
     set(byval value as string)
       me._name=value
     end set
     end property
   .........

then,i serialized(saved) them into file:

   public sub save(byval emp as employee,_
      byval filepath as string,byval overwrite as boolean)
      dim mode as filemode
      if overwrite then
      mode=filemiode.create
      else
      mode=filemode.createnew
      end if
      dim fs as new filestream(filepath,mode)
      dim bf as new binaryformatter()
      bf.serialize(fs,emp)
   fs.close()
   end sub
excitedly,i succeed.but,how to serialize(save) them into database
field(SQL Server)?i have tried for many times,but failed!(maybe add
dataset as interface,but i don't know how to do).please help me.i'm
worrying about it.thanks a lot!
    good luck and make more money! bill(in forum's name is:gooood)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Help. How to save and retrieve text from .dat file dextergaisie Pro VB 6 1 May 15th, 2007 11:45 AM
parameterized tableadapter wont save to access dat edubnmrg Pro VB Databases 0 June 13th, 2006 01:42 PM
how to serialize(save) object into SQL Server? gooood ADO.NET 2 July 21st, 2005 07:58 PM
how to serialize object into SQL Server? gooood SQL Server 2000 0 July 17th, 2005 10:28 PM
Trying to serialize CultureInfo object cgbissio C# 0 July 17th, 2003 10:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.