Re: String, Array, DataGrid Question?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Justin Rogers (Justin_at_games4dotnet.com)
Date: 11/01/04


Date: Mon, 1 Nov 2004 04:21:20 -0800

This most likely won't help you, but it details a packing order for minimizing
the amount of space
required to store your series. If you are just looking for a perfect match, you
can even compare
the permutation identity instead of comparing each item independently.

http://weblogs.asp.net/justin_rogers/archive/2004/10/23/246815.aspx

-- 
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers
"Leon" <vnality@msn.com> wrote in message 
news:O0Yv0LAwEHA.1340@TK2MSFTNGP10.phx.gbl...
> Ok I have six textbox controls on my web-form that allows the user to enter 
> the numbers 1-47 non-duplicates in each box ("meaning if the user enters 3 in 
> one textbox they can't enter 3 in another"). However, I'm trying to figure-out 
> the best way I could allow the user to insert their distinctly six selected 
> number ("in which six number between 1 and 47 equals a set") into a database 
> in which my form also contain a data-grid control which allows the user to 
> view, edit, and delete their previous posted numbers. On the backend, I need 
> to be able to search through these sets ("being the user sets") and look for 
> matches to my backend selected six number set.
>
>
>
> First, is it best to store the user set of six numbers in the database as.
>
> NumID-PK, Num1, Num2, Num3, Num4, Num5, Num6
>
> {1-PK, 1, 35, 23, 5, 4, 17 respectfully in each columns in the row in the 
> database} or.
>
> NumID-PK, NumSet
>
> {1-PK, 1, 35, 23, 5, 4, 17 respectfully stored separated by commas in the 
> column in the database}?
>
>
>
> Second, when I read the user set of numbers from the database to my web-form 
> data-grid should I read them first to an array then to the data-grid or 
> directly to the data-grid?
>
>
>
> Extra Information:
>
> I also thought about storing the set of six numbers as a string of twelve 
> numbers ("013523050417") then when reading the number form the database to the 
> page separate the string after every two literals then read them to the 
> data-grid.
>
>
>
> Please weight in on the best way to handle this situation, and if you would 
> fully explain your solution. Thanks!
>
> 


Relevant Pages

  • Re: String, Array, DataGrid Question?
    ... "Justin Rogers" wrote in message ... > required to store your series. ... is it best to store the user set of six numbers in the database ...
    (microsoft.public.dotnet.languages.csharp)
  • String, Array, DataGrid Question?
    ... Ok I have six textbox controls on my web-form that allows the user to enter ... into a database in which my form also contain a data-grid control which ... database} or. ... I also thought about storing the set of six numbers as a string of twelve ...
    (microsoft.public.dotnet.languages.csharp)
  • String, Array, DataGrid Question?
    ... Ok I have six textbox controls on my web-form that allows the user to enter ... into a database in which my form also contain a data-grid control which ... database} or. ... I also thought about storing the set of six numbers as a string of twelve ...
    (microsoft.public.dotnet.languages.vb)
  • String, Array, DataGrid Question?
    ... Ok I have six textbox controls on my web-form that allows the user to enter ... into a database in which my form also contain a data-grid control which ... database} or. ... I also thought about storing the set of six numbers as a string of twelve ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: can not open user default database?!
    ... You'll get this error if the default database associated with the login is ... Try specifying the desired default database for the login ... I have a user set up as a db_owner for one of our ...
    (microsoft.public.sqlserver.programming)