473,388 Members | 1,375 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,388 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 18 '05 #1
0 722

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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.