473,388 Members | 1,198 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.

Key/Value Pairs - data types and validation

Can someone point me to some resources or help out with the design for
this issue?

I'm using asp.net 1.1, C# and SQL Server. I need to persist about 30
values for each user. These values do not really relate to any of the
other data.
So I'd like to place all these "misc" values in single db table
(CustomerValues).

CREATE TABLE [CustomerValues] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Key] [varchar] (50) NOT NULL ,
[Value] [varchar] (255) NULL
)

Some of these Values would actually be int, some varchar, some bit.
I'm thinking they would be put into a hashtable in the client app.
First of all, is this a good idea and if not what are my options?
Also, how would I enforce/validate the different data types in my
client app?

Thanks!

Nov 19 '05 #1
1 1251
you should manualy type cast the values to the type as you want,
"heromull" <he******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Can someone point me to some resources or help out with the design for
this issue?

I'm using asp.net 1.1, C# and SQL Server. I need to persist about 30
values for each user. These values do not really relate to any of the
other data.
So I'd like to place all these "misc" values in single db table
(CustomerValues).

CREATE TABLE [CustomerValues] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Key] [varchar] (50) NOT NULL ,
[Value] [varchar] (255) NULL
)

Some of these Values would actually be int, some varchar, some bit.
I'm thinking they would be put into a hashtable in the client app.
First of all, is this a good idea and if not what are my options?
Also, how would I enforce/validate the different data types in my
client app?

Thanks!

Nov 19 '05 #2

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

Similar topics

6
by: Equis Uno | last post by:
Hi, Assume I'm given a 100k file full of key-value pairs: date,value 26-Feb-04,36.47 25-Feb-04,36.43 24-Feb-04,36.30 23-Feb-04,37.00 20-Feb-04,37.00
8
by: Matt Herson | last post by:
I have been trying to find a way to use JavaScript to change the value of a hidden field on submit. I am already invoking a JavaScript to handle the validation on submit. The reason I need to...
1
by: dpakpaul | last post by:
Hi, I have an XSD schema where I have attributes that are declared to contain non string values such as integers etc. Take for example, this declaration - <xs:attribute name="IsThisTrue"...
16
by: TTroy | last post by:
Hello, I'm relatively new to C and have gone through more than 4 books on it. None mentioned anything about integral promotion, arithmetic conversion, value preserving and unsigned preserving. ...
5
by: Robert Oschler | last post by:
I am converting a Perl script over to "C" for a potential open source project. I need some open source "C" code that will give me the same functionality of a Perl Style associative array: ...
6
by: Andy Sutorius via DotNetMonster.com | last post by:
Hi, What collection can I use to store name value pairs that contain duplicates in both columns? Thanks, Andy --
3
by: Jeff L. | last post by:
I have an interesting problem and I'm not coming up with any answers in my searches, so hopefully someone can give me a hand with this. I have a feeling it's easy, but I usually get my nose stuck...
5
by: Bosconian | last post by:
I have a textarea form field for inputting (or pasting) pairs of data. I need a regular expression pattern to validate each line for the following double quote number double quote comma...
0
by: =?Utf-8?B?SGVucnlDQw==?= | last post by:
We are trying to develop a set of C# 2.0 web services that are data driven, loosely coupled, easy to maintain, and somewhat high preferment (I'm sure that's either an oxymoron or everyone else's...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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.