The sum of all SQL Server matter that exist,
and the space in which all SQL Server events
occur or could occur.
Welcome to SQL Server Universe.com Sign in | Join | Help
in
Home SS SLUG Forums Articles Photos Downloads

Saving Custom Data Structures To SQL Server 2005

Last post 06-09-2008, 9:50 by manjuke. 2 replies.
Sort Posts: Previous
  • Saving Custom Data Structures To SQL Server 2005

     05-29-2008, 12:17

    • Joined on 03-13-2008
    • Posts 5
    • Points 0
    • Top 25 Contributor

    Hi, I have a custom data structure which I use in .Net (C# or VB). And it consist of following data types

    Structure Customer

    CustID (int)

    CustName (String)

    CustLocation (String)

     

    And the traditional way of saving the data is to Create a table with the above attributes and save each attribute to the relevant field. But What I really like to know is the following.

    Instead of saving each filed, is there a way of defining the above structure on the SQL Table and save the Customer Object to that table. If there's a way of doing it, please explain..

    I am using MS SQL 2005 and Visual Studio 2005 

    Thanks in Advance

     

     

     

  • Re: Saving Custom Data Structures To SQL Server 2005

     05-29-2008, 15:20

    • Joined on 11-22-2006
    • Colombo, Sri Lanka
    • Posts 219
    • Points 0
    • Top 10 Contributor
      Male

    You could create CLR data types using Visual Studio and import them into SQL Server 2005. CLR user-defined types are like .NET objects that can be used to store data in SQL Server.

    Try the following links:


    Gogula G. Aryalingam (MVP - SQL Server)

    DB Antics

  • Re: Saving Custom Data Structures To SQL Server 2005

     06-09-2008, 9:50

    • Joined on 03-13-2008
    • Posts 5
    • Points 0
    • Top 25 Contributor
    Gogula G. Aryalingam:

    You could create CLR data types using Visual Studio and import them into SQL Server 2005. CLR user-defined types are like .NET objects that can be used to store data in SQL Server.

    Try the following links:

    Thank you very much...  Smile
View as RSS news feed in XML

(Best viewed with a resolution of more than 1024 * 768)

Powered by Community Server, by Telligent Systems