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)
|