store custom types in DB

  • Thread starter Thread starter neverstill
  • Start date Start date
N

neverstill

Hi-

I'm researching storing complex data types into a databasem tehn retrieving
them later. IE:
public class CMyClass
{
string m_name;
}

Obviously, for this example it would be easier to just store the string, but
that is not the point. The actual types are more complex. What I wanted to
ask you all is, how can I do this with ADO.Net? Do I need to Serialize the
class to a byte[] then save that to the DB or is there some other technique
that would be easier, cleaner? Anyone ever do this?

OK, thanks. Looking forward to any suggestions!!

-Steve
 
Hi,


neverstill said:
Hi-

I'm researching storing complex data types into a databasem tehn retrieving
them later. IE:
public class CMyClass
{
string m_name;
}

Obviously, for this example it would be easier to just store the string, but
that is not the point. The actual types are more complex. What I wanted to
ask you all is, how can I do this with ADO.Net? Do I need to Serialize the
class to a byte[] then save that to the DB or is there some other technique
that would be easier, cleaner? Anyone ever do this?

Serialization would be just fine.
 
good to know, thanks! I'll get started :)
Miha Markic said:
Hi,


neverstill said:
Hi-

I'm researching storing complex data types into a databasem tehn retrieving
them later. IE:
public class CMyClass
{
string m_name;
}

Obviously, for this example it would be easier to just store the string, but
that is not the point. The actual types are more complex. What I
wanted
to
ask you all is, how can I do this with ADO.Net? Do I need to Serialize the
class to a byte[] then save that to the DB or is there some other technique
that would be easier, cleaner? Anyone ever do this?

Serialization would be just fine.
 
Back
Top