473,396 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

String, Array, DataGrid Question?

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!
Nov 16 '05 #1
2 1694
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...23/246815.aspx
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

"Leon" <vn*****@msn.com> wrote in message
news:O0**************@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!

Nov 16 '05 #2
match is not my biggest problem, but just the best way to store the number
sets and how to read them into the datgrid.
"Justin Rogers" <Ju****@games4dotnet.com> wrote in message
news:eL*************@TK2MSFTNGP11.phx.gbl...
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...23/246815.aspx
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

"Leon" <vn*****@msn.com> wrote in message
news:O0**************@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!


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lance | last post by:
Hi All, Suppose I have a dynamic string array Dim sa(,) as string I want to populate the first two columns of a datagrid control with the two columns of sa. I want the third column of the...
4
by: emma middlebrook | last post by:
Hi Straight to the point - I don't understand why System.Array derives from IList (given the methods/properties actually on IList). When designing an interface you specify a contract. Deriving...
3
by: Pol Bawin | last post by:
Hi All, One : I have a property that get/set a array of an abstract class A By default my array is null In the propertygrid, It is not works correctly when my array is null. (when my array...
0
by: Jeb Bushell | last post by:
I am building a wrapper for a multi-dimensional array so that it will bind to a datagrid. I'm starting with a 1-D string array and already the bind works, sorta, but the datagrid is populating with...
1
by: codymanix | last post by:
How can I bind a string-Array to a DataGrid? I've already set the MappingName in the to DataGridTablestyle to "Array", but the Grid seems to display only Garbage: Lenght| -------| 13 9 3 3
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
2
by: Pete Nelson | last post by:
Does anyone know of a way to bind a string collection to a datagrid? Basically, I have an object, CreditPlans, and a string collection, ModelNumbers. I'd like to bind the ModelNumbers collection...
3
by: AFN | last post by:
I need to manually create the data to be shown in a datagrid (or some data table object). Should I create an array and bind the array to the datagrid OR should I create a temporary dataset and...
4
by: Lance | last post by:
Hi All, Suppose I have a dynamic string array Dim sa(,) as string I want to populate the first two columns of a datagrid control with the two columns of sa. I want the third column of the...
10
by: Lyners | last post by:
Hello all, I have an ASP.NET website where one of my pages contain javascript that is a check to see if anydata within a datagrid has changed. My problem is that it takes a considerable amount of...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.