storing radio button values in database - binary, int or varchar??

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default storing radio button values in database - binary, int or varchar??

    What is the best way to do this?

    Binary with 0 representing off and 1 on?
    Int16 with 1 representing first button, 2 the second, 3 ...
    varchar with a character values at certain positions in the string
    representing radio button values.

    Thanks,
    -hazz


    Hazzard Guest

  2. Similar Questions and Discussions

    1. Webservices: Timeout and storing values Q
      Hi! I have 2 questions: 1. Is there any way to set timeout value when I call web service? 2. Is there any way to store web service response...
    2. Storing .doc and .pdf in database
      Is anyone know how I can store Word Docs and PDF's in database, and how I can make link for visitor to download these files
    3. storing values non-globally
      Hi all, Sorry about subject line, it's the best I could do. Two (somewhat realted) questions... I have several types of user input values I am...
    4. Radio Button - Reading Pre Selected Values from db
      I am able to make a selection of information when entering a record, with radio buttons giving the option of yes, or no. Which stores their...
    5. Sending data to database via radio button choice.
      Hi all! I was wondering does anyone have any ideas on how I can send info to a SQL database by choosing a radio button. What I want to do is set...
  3. #2

    Default RE: storing radio button values in database - binary, int or varchar??

    Hello Hazz,

    I think you could define a structure to store all the data. Then read/write
    the structure as binary data from/to database.

    [url]http://support.microsoft.com/?id=317017[/url].

    Hope it helps.

    Best regards,
    yhhuang
    VS.NET, Visual C++
    Microsoft

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Got .Net? [url]http://www.gotdotnet.com[/url]
    --------------------
    !From: "Hazzard" <hazz@sonic.net>
    !Subject: storing radio button values in database - binary, int or varchar??
    !Date: Fri, 4 Jul 2003 19:42:06 -0700
    !Lines: 11
    !X-Priority: 3
    !X-MSMail-Priority: Normal
    !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    !Message-ID: <uuIMM8pQDHA.1624@tk2msftngp13.phx.gbl>
    !Newsgroups: microsoft.public.dotnet.framework.aspnet
    !NNTP-Posting-Host: dial-209-148-113-113.sonic.net 209.148.113.113
    !Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
    !Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.aspnet:32383
    !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    !
    !What is the best way to do this?
    !
    !Binary with 0 representing off and 1 on?
    !Int16 with 1 representing first button, 2 the second, 3 ...
    !varchar with a character values at certain positions in the string
    !representing radio button values.
    !
    !Thanks,
    !-hazz
    !
    !
    !

    Yan-Hong Huang[MSFT] Guest

  4. #3

    Default Re: storing radio button values in database - binary, int or varchar??

    Thank you Yan-Hong,

    Let me digest the code whose link you supplied - HOW TO: Read and Write a
    File to and from a BLOB Column by Using ADO.NET and Visual C++ .NET.

    An easy to understand structure at the presentation and business layer
    levels and an efficient database storage mechanism.

    I appreciate the response and the idea. I will let you know how this evolves
    for me.

    Greg Hazzard


    "Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message
    news:HAGUz8FRDHA.1828@cpmsftngxa09.phx.gbl...
    > Hello Hazz,
    >
    > I think you could define a structure to store all the data. Then
    read/write
    > the structure as binary data from/to database.
    >
    > [url]http://support.microsoft.com/?id=317017[/url].
    >
    > Hope it helps.
    >
    > Best regards,
    > yhhuang
    > VS.NET, Visual C++
    > Microsoft
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    rights.
    > Got .Net? [url]http://www.gotdotnet.com[/url]
    > --------------------
    > !From: "Hazzard" <hazz@sonic.net>
    > !Subject: storing radio button values in database - binary, int or
    varchar??
    > !Date: Fri, 4 Jul 2003 19:42:06 -0700
    > !Lines: 11
    > !X-Priority: 3
    > !X-MSMail-Priority: Normal
    > !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    > !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    > !Message-ID: <uuIMM8pQDHA.1624@tk2msftngp13.phx.gbl>
    > !Newsgroups: microsoft.public.dotnet.framework.aspnet
    > !NNTP-Posting-Host: dial-209-148-113-113.sonic.net 209.148.113.113
    > !Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
    > !Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.aspnet:32383
    > !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    > !
    > !What is the best way to do this?
    > !
    > !Binary with 0 representing off and 1 on?
    > !Int16 with 1 representing first button, 2 the second, 3 ...
    > !varchar with a character values at certain positions in the string
    > !representing radio button values.
    > !
    > !Thanks,
    > !-hazz
    > !
    > !
    > !
    >

    Hazzard Guest

  5. #4

    Default Re: storing radio button values in database - binary, int or varchar??

    Hi,

    You are welcome. :)

    Best regards,
    yhhuang
    VS.NET, Visual C++
    Microsoft

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Got .Net? [url]http://www.gotdotnet.com[/url]
    --------------------
    !From: "Hazzard" <hazz@sonic.net>
    !References: <uuIMM8pQDHA.1624@tk2msftngp13.phx.gbl>
    <HAGUz8FRDHA.1828@cpmsftngxa09.phx.gbl>
    !Subject: Re: storing radio button values in database - binary, int or
    varchar??
    !Date: Mon, 7 Jul 2003 08:05:08 -0700
    !Lines: 66
    !X-Priority: 3
    !X-MSMail-Priority: Normal
    !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    !Message-ID: <ePIzInJRDHA.704@tk2msftngp13.phx.gbl>
    !Newsgroups: microsoft.public.dotnet.framework.aspnet
    !NNTP-Posting-Host: dial-209-148-114-118.sonic.net 209.148.114.118
    !Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
    !Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.aspnet:32717
    !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    !
    !Thank you Yan-Hong,
    !
    ! Let me digest the code whose link you supplied - HOW TO: Read and Write a
    !File to and from a BLOB Column by Using ADO.NET and Visual C++ .NET.
    !
    !An easy to understand structure at the presentation and business layer
    !levels and an efficient database storage mechanism.
    !
    !I appreciate the response and the idea. I will let you know how this
    evolves
    !for me.
    !
    !Greg Hazzard
    !
    !
    !"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message
    !news:HAGUz8FRDHA.1828@cpmsftngxa09.phx.gbl...
    !> Hello Hazz,
    !>
    !> I think you could define a structure to store all the data. Then
    !read/write
    !> the structure as binary data from/to database.
    !>
    !> [url]http://support.microsoft.com/?id=317017[/url].
    !>
    !> Hope it helps.
    !>
    !> Best regards,
    !> yhhuang
    !> VS.NET, Visual C++
    !> Microsoft
    !>
    !> This posting is provided "AS IS" with no warranties, and confers no
    !rights.
    !> Got .Net? [url]http://www.gotdotnet.com[/url]
    !> --------------------
    !> !From: "Hazzard" <hazz@sonic.net>
    !> !Subject: storing radio button values in database - binary, int or
    !varchar??
    !> !Date: Fri, 4 Jul 2003 19:42:06 -0700
    !> !Lines: 11
    !> !X-Priority: 3
    !> !X-MSMail-Priority: Normal
    !> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    !> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    !> !Message-ID: <uuIMM8pQDHA.1624@tk2msftngp13.phx.gbl>
    !> !Newsgroups: microsoft.public.dotnet.framework.aspnet
    !> !NNTP-Posting-Host: dial-209-148-113-113.sonic.net 209.148.113.113
    !> !Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
    !> !Xref: cpmsftngxa09.phx.gbl
    microsoft.public.dotnet.framework.aspnet:32383
    !> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    !> !
    !> !What is the best way to do this?
    !> !
    !> !Binary with 0 representing off and 1 on?
    !> !Int16 with 1 representing first button, 2 the second, 3 ...
    !> !varchar with a character values at certain positions in the string
    !> !representing radio button values.
    !> !
    !> !Thanks,
    !> !-hazz
    !> !
    !> !
    !> !
    !>
    !
    !
    !

    Yan-Hong Huang[MSFT] Guest

  6. #5

    Default Re: storing radio button values in database - binary, int or varchar??

    nvarchar. Save the text string of the radio button list for a descriptive
    value of what the option is. A developer friendly solution without any need
    for a complicated or space efficient technique.

    "Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message
    news:xj5wqQTRDHA.1748@cpmsftngxa09.phx.gbl...
    > Hi,
    >
    > You are welcome. :)
    >
    > Best regards,
    > yhhuang
    > VS.NET, Visual C++
    > Microsoft
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    rights.
    > Got .Net? [url]http://www.gotdotnet.com[/url]
    > --------------------
    > !From: "Hazzard" <hazz@sonic.net>
    > !References: <uuIMM8pQDHA.1624@tk2msftngp13.phx.gbl>
    > <HAGUz8FRDHA.1828@cpmsftngxa09.phx.gbl>
    > !Subject: Re: storing radio button values in database - binary, int or
    > varchar??
    > !Date: Mon, 7 Jul 2003 08:05:08 -0700
    > !Lines: 66
    > !X-Priority: 3
    > !X-MSMail-Priority: Normal
    > !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    > !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    > !Message-ID: <ePIzInJRDHA.704@tk2msftngp13.phx.gbl>
    > !Newsgroups: microsoft.public.dotnet.framework.aspnet
    > !NNTP-Posting-Host: dial-209-148-114-118.sonic.net 209.148.114.118
    > !Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
    > !Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.aspnet:32717
    > !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    > !
    > !Thank you Yan-Hong,
    > !
    > ! Let me digest the code whose link you supplied - HOW TO: Read and Write
    a
    > !File to and from a BLOB Column by Using ADO.NET and Visual C++ .NET.
    > !
    > !An easy to understand structure at the presentation and business layer
    > !levels and an efficient database storage mechanism.
    > !
    > !I appreciate the response and the idea. I will let you know how this
    > evolves
    > !for me.
    > !
    > !Greg Hazzard
    > !
    > !
    > !"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message
    > !news:HAGUz8FRDHA.1828@cpmsftngxa09.phx.gbl...
    > !> Hello Hazz,
    > !>
    > !> I think you could define a structure to store all the data. Then
    > !read/write
    > !> the structure as binary data from/to database.
    > !>
    > !> [url]http://support.microsoft.com/?id=317017[/url].
    > !>
    > !> Hope it helps.
    > !>
    > !> Best regards,
    > !> yhhuang
    > !> VS.NET, Visual C++
    > !> Microsoft
    > !>
    > !> This posting is provided "AS IS" with no warranties, and confers no
    > !rights.
    > !> Got .Net? [url]http://www.gotdotnet.com[/url]
    > !> --------------------
    > !> !From: "Hazzard" <hazz@sonic.net>
    > !> !Subject: storing radio button values in database - binary, int or
    > !varchar??
    > !> !Date: Fri, 4 Jul 2003 19:42:06 -0700
    > !> !Lines: 11
    > !> !X-Priority: 3
    > !> !X-MSMail-Priority: Normal
    > !> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    > !> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    > !> !Message-ID: <uuIMM8pQDHA.1624@tk2msftngp13.phx.gbl>
    > !> !Newsgroups: microsoft.public.dotnet.framework.aspnet
    > !> !NNTP-Posting-Host: dial-209-148-113-113.sonic.net 209.148.113.113
    > !> !Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
    > !> !Xref: cpmsftngxa09.phx.gbl
    > microsoft.public.dotnet.framework.aspnet:32383
    > !> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    > !> !
    > !> !What is the best way to do this?
    > !> !
    > !> !Binary with 0 representing off and 1 on?
    > !> !Int16 with 1 representing first button, 2 the second, 3 ...
    > !> !varchar with a character values at certain positions in the string
    > !> !representing radio button values.
    > !> !
    > !> !Thanks,
    > !> !-hazz
    > !> !
    > !> !
    > !> !
    > !>
    > !
    > !
    > !
    >

    Hazzard Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139