Need Expert Help and Advice. Thank You.

Discussion in 'ASP .Net' started by shapper, Feb 27, 2007.

  1. shapper

    shapper Guest

    Hello,

    Consider I have a String:

    Dim MyString As String = "Hello"

    or an Integer:

    Dim MyInteger As Integer = 100

    or a class which its properties:

    Dim MyClass As New MyCustomClass
    MyClass.Property1 = "Hello"
    MyClass.Property2 = Unit.Pixel(100)
    MyClass.Property3 = 100

    Or even a control:

    Dim MyLabel As Label
    MyLabel.Id = "MyLabel"
    MyLabel.CssClass = "MyLabelCssClass"

    Is there a way to save a String, an Integer, a Boolean, a Class, a
    Control in an SQL database?

    Something like:

    Define something (Integer, String, Class, Control, etc)

    Save in SQL 2005 Database

    Later in code Retrive from database given its ID

    Is this possible?

    How should I do this?

    What type of SQL 2005 table field should be used to store the
    information?

    Thanks,

    Miguel
     
    shapper, Feb 27, 2007
    #1
    1. Advertising

  2. Search for ADO.NET


    Peter

    "shapper" <> wrote in message
    news:...
    > Hello,
    >
    > Consider I have a String:
    >
    > Dim MyString As String = "Hello"
    >
    > or an Integer:
    >
    > Dim MyInteger As Integer = 100
    >
    > or a class which its properties:
    >
    > Dim MyClass As New MyCustomClass
    > MyClass.Property1 = "Hello"
    > MyClass.Property2 = Unit.Pixel(100)
    > MyClass.Property3 = 100
    >
    > Or even a control:
    >
    > Dim MyLabel As Label
    > MyLabel.Id = "MyLabel"
    > MyLabel.CssClass = "MyLabelCssClass"
    >
    > Is there a way to save a String, an Integer, a Boolean, a Class, a
    > Control in an SQL database?
    >
    > Something like:
    >
    > Define something (Integer, String, Class, Control, etc)
    >
    > Save in SQL 2005 Database
    >
    > Later in code Retrive from database given its ID
    >
    > Is this possible?
    >
    > How should I do this?
    >
    > What type of SQL 2005 table field should be used to store the
    > information?
    >
    > Thanks,
    >
    > Miguel
    >
     
    Peter Bradley, Feb 27, 2007
    #2
    1. Advertising

  3. shapper

    shapper Guest

    On Feb 27, 1:11 pm, "Peter Bradley" <> wrote:
    > Search for ADO.NET
    >
    > Peter
    >
    > "shapper" <> wrote in message
    >
    > news:...
    >
    > > Hello,

    >
    > > Consider I have a String:

    >
    > > Dim MyString As String = "Hello"

    >
    > > or an Integer:

    >
    > > Dim MyInteger As Integer = 100

    >
    > > or a class which its properties:

    >
    > > Dim MyClass As New MyCustomClass
    > > MyClass.Property1 = "Hello"
    > > MyClass.Property2 = Unit.Pixel(100)
    > > MyClass.Property3 = 100

    >
    > > Or even a control:

    >
    > > Dim MyLabel As Label
    > > MyLabel.Id = "MyLabel"
    > > MyLabel.CssClass = "MyLabelCssClass"

    >
    > > Is there a way to save a String, an Integer, a Boolean, a Class, a
    > > Control in an SQL database?

    >
    > > Something like:

    >
    > > Define something (Integer, String, Class, Control, etc)

    >
    > > Save in SQL 2005 Database

    >
    > > Later in code Retrive from database given its ID

    >
    > > Is this possible?

    >
    > > How should I do this?

    >
    > > What type of SQL 2005 table field should be used to store the
    > > information?

    >
    > > Thanks,

    >
    > > Miguel


    Yes, I use ADO.NET for creating code which work either with SQL/Oracle/
    Access database, etc.
    However I have no idea how to start this.

    For example, I don't know:
    1. Which data type should I use in the SQL 2005 database
    2. How should I define the object in my C# / VB.NET and send it to the
    database.

    Thanks,
    Miguel
     
    shapper, Feb 27, 2007
    #3
  4. shapper

    shapper Guest

    On Feb 27, 1:26 pm, "shapper" <> wrote:
    > On Feb 27, 1:11 pm, "Peter Bradley" <> wrote:
    >
    >
    >
    > > Search for ADO.NET

    >
    > > Peter

    >
    > > "shapper" <> wrote in message

    >
    > >news:...

    >
    > > > Hello,

    >
    > > > Consider I have a String:

    >
    > > > Dim MyString As String = "Hello"

    >
    > > > or an Integer:

    >
    > > > Dim MyInteger As Integer = 100

    >
    > > > or a class which its properties:

    >
    > > > Dim MyClass As New MyCustomClass
    > > > MyClass.Property1 = "Hello"
    > > > MyClass.Property2 = Unit.Pixel(100)
    > > > MyClass.Property3 = 100

    >
    > > > Or even a control:

    >
    > > > Dim MyLabel As Label
    > > > MyLabel.Id = "MyLabel"
    > > > MyLabel.CssClass = "MyLabelCssClass"

    >
    > > > Is there a way to save a String, an Integer, a Boolean, a Class, a
    > > > Control in an SQL database?

    >
    > > > Something like:

    >
    > > > Define something (Integer, String, Class, Control, etc)

    >
    > > > Save in SQL 2005 Database

    >
    > > > Later in code Retrive from database given its ID

    >
    > > > Is this possible?

    >
    > > > How should I do this?

    >
    > > > What type of SQL 2005 table field should be used to store the
    > > > information?

    >
    > > > Thanks,

    >
    > > > Miguel

    >
    > Yes, I use ADO.NET for creating code which work either with SQL/Oracle/
    > Access database, etc.
    > However I have no idea how to start this.
    >
    > For example, I don't know:
    > 1. Which data type should I use in the SQL 2005 database
    > 2. How should I define the object in my C# / VB.NET and send it to the
    > database.
    >
    > Thanks,
    > Miguel


    I have been also using the Enterprise Library Data Access Application
    block.
    I think I can do this using this ...

    Thanks,
    Miguel
     
    shapper, Feb 27, 2007
    #4
  5. shapper

    Mark Rae Guest

    "shapper" <> wrote in message
    news:...

    >> Yes, I use ADO.NET for creating code which work either with SQL/Oracle/
    >> Access database, etc.
    >> However I have no idea how to start this.
    >>
    >> For example, I don't know:
    >> 1. Which data type should I use in the SQL 2005 database
    >> 2. How should I define the object in my C# / VB.NET and send it to the
    >> database.

    >
    > I have been also using the Enterprise Library Data Access Application
    > block.
    > I think I can do this using this ...


    I've been following this thread with interest, but am really struggling to
    work out what you're trying to achieve here... Maybe a bit of an explanation
    as to what you're actually trying to do would be helpful...

    Things tend to work best when they are used for the purpose for which they
    were designed, so storing *data* in a database is good idea... :) However,
    what are you actually trying to store in your database here...? What is the
    purpose of doing so...? What do you intend to do with it later...? What
    value is this adding to anything...? What is the overall goal...?
     
    Mark Rae, Feb 27, 2007
    #5
  6. shapper

    shapper Guest

    On Feb 27, 1:43 pm, "Mark Rae" <> wrote:
    > "shapper" <> wrote in message
    >
    > news:...
    >
    > >> Yes, I use ADO.NET for creating code which work either with SQL/Oracle/
    > >> Access database, etc.
    > >> However I have no idea how to start this.

    >
    > >> For example, I don't know:
    > >> 1. Which data type should I use in the SQL 2005 database
    > >> 2. How should I define the object in my C# / VB.NET and send it to the
    > >> database.

    >
    > > I have been also using the Enterprise Library Data Access Application
    > > block.
    > > I think I can do this using this ...

    >
    > I've been following this thread with interest, but am really struggling to
    > work out what you're trying to achieve here... Maybe a bit of an explanation
    > as to what you're actually trying to do would be helpful...
    >
    > Things tend to work best when they are used for the purpose for which they
    > were designed, so storing *data* in a database is good idea... :) However,
    > what are you actually trying to store in your database here...? What is the
    > purpose of doing so...? What do you intend to do with it later...? What
    > value is this adding to anything...? What is the overall goal...?


    Mark,

    Consider a web site with various pages.
    Consider for example the homepage where I have an introduction text.
    If the web site is multilanguage I would need to have that text in
    more than one language.

    So far so good. I created a control which inserts the text in various
    languages in a SQL 2005 database.
    for changing that text I have a form which my clients uses to edit
    that text.

    So all these small isolated content in my projects are saved on a SQL
    2005 table.
    Of course I have table for Documents or the Membership tables for
    users, etc.
    I use only this method for isolated content in web site pages.
    Now I am trying to extend this to other data types, not just string.
    For example, an integer, a control definition, a class, etc.
    Of course only some of these elements will be available for the user
    to edit.

    Basically, I am trying to create a control which inserts various types
    of resources into an SQL 2005 database.
    They can be used only on my programming for saving singular
    definitions or even expose the values to the user on CMS.

    And of course I will use multilanguage for all of them. So I have two
    tables:
    One for common information on each record. For example data type, etc.
    The other for the localized content, i.e., the object (string, class,
    etc)

    Anyway, any feedback would be great.

    Thanks,
    Miguel
     
    shapper, Feb 27, 2007
    #6
  7. shapper

    Mark Rae Guest

    Mark Rae, Feb 27, 2007
    #7
  8. shapper

    shapper Guest

    On Feb 27, 4:08 pm, "Mark Rae" <> wrote:
    > "shapper" <> wrote in message
    >
    > news:...
    >
    > > If the web site is multilanguage I would need to have that text in
    > > more than one language.

    >
    > Have you considered resource files...?http://www.google.co.uk/search?sourceid=navclient&aq=t&ie=UTF-8&rls=G...


    Sure, of course. I use them.
    But as I said I need to allow the client to access the data through
    CMS and I prefer to use a database.

    Resource files are ok for saving control properties and so on but not
    to save content.

    This that I am trying to do would be a mixture of saving various
    resources (including objects) and content to be edited on CMS.

    Anyway, I think this is possible ... ADO.NET, Enterprise Library,
    etc...

    For example, in ASP.NET 2.0 the profile classes are saved in the
    database.

    This would be something similar but saving not only classes but
    objects ...

    Or maybe I could create a container class which would have various
    properties each one of a different type: string, integer, control, a
    class, etc.

    Then I would use the property or properties that I want and save that
    class.

    Anyway, these are just ideas ...

    .... I have no idea how to start.

    Any suggestions or help are welcome.

    Thanks,
    Miguel
     
    shapper, Feb 27, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shapper
    Replies:
    1
    Views:
    335
    =?Utf-8?B?QWxpZW4yXzUx?=
    Mar 16, 2005
  2. Miguel Dias Moura
    Replies:
    0
    Views:
    366
    Miguel Dias Moura
    Jan 28, 2006
  3. Replies:
    27
    Views:
    785
    Andy Dingley
    Oct 31, 2007
  4. shapper

    Need Advice, Please. Thank You!

    shapper, Nov 23, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    317
    shapper
    Nov 23, 2007
  5. Replies:
    29
    Views:
    359
    Andy Dingley
    Oct 31, 2007
Loading...

Share This Page