By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,805 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,805 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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.

http://support.microsoft.com/?id=317017.

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? http://www.gotdotnet.com
--------------------
!From: "Hazzard" <ha**@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: <uu**************@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
!
!
!

Nov 17 '05 #2

P: n/a
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]" <yh*****@online.microsoft.com> wrote in message
news:HA**************@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.

http://support.microsoft.com/?id=317017.

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? http://www.gotdotnet.com
--------------------
!From: "Hazzard" <ha**@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: <uu**************@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
!
!
!

Nov 17 '05 #3

P: n/a
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? http://www.gotdotnet.com
--------------------
!From: "Hazzard" <ha**@sonic.net>
!References: <uu**************@tk2msftngp13.phx.gbl>
<HA**************@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: <eP*************@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]" <yh*****@online.microsoft.com> wrote in message
!news:HA**************@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.
!>
!> http://support.microsoft.com/?id=317017.
!>
!> 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? http://www.gotdotnet.com
!> --------------------
!> !From: "Hazzard" <ha**@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: <uu**************@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
!> !
!> !
!> !
!>
!
!
!

Nov 17 '05 #4

P: n/a
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]" <yh*****@online.microsoft.com> wrote in message
news:xj**************@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? http://www.gotdotnet.com
--------------------
!From: "Hazzard" <ha**@sonic.net>
!References: <uu**************@tk2msftngp13.phx.gbl>
<HA**************@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: <eP*************@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]" <yh*****@online.microsoft.com> wrote in message
!news:HA**************@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.
!>
!> http://support.microsoft.com/?id=317017.
!>
!> 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? http://www.gotdotnet.com
!> --------------------
!> !From: "Hazzard" <ha**@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: <uu**************@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
!> !
!> !
!> !
!>
!
!
!

Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.