473,387 Members | 1,520 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,387 software developers and data experts.

Confused myself!

Hi All

I need your help please, i've been thinking about this one for so long I
have confused myself!

I have a web app that contains a clients table in SQL server.

When a new client is entered onto the system I want to take all the usual
details(already complete) and on the next page I have 135 questions which
could warrant a yes, no or not asked answer and store the answers to the 135
questions in a DB table linked to the customer.

What is the quickest way for me to code this page and the best DB structure
to do this. I have the 135 questions in a DB table also.

Thanks

Leon

Jan 9 '07 #1
4 934
I would store all of the results in to one column of type varchar(135)
rather than creating 135 separate columns for each answer (if that many
is even possible) and use one character per answer e.g. 0 = yes, 1 = no
and 2 = not asked.
As for inputting the answers, I guess a datagrid might be the easiest
way.

Jan 9 '07 #2


"matt urbanowski" <sa***@matturbanowski.co.ukwrote in message
news:11**********************@m30g2000cwm.googlegr oups.com...
>I would store all of the results in to one column of type varchar(135)
rather than creating 135 separate columns for each answer (if that many
is even possible) and use one character per answer e.g. 0 = yes, 1 = no
and 2 = not asked.
As for inputting the answers, I guess a datagrid might be the easiest
way.
Since the op has the questions in a table, he could create another table
that has the customer's id, question id, and answer. This way, there would
be one row per question per customer and a lookup is much easier for any of
the three (question, customer, or answer) using basic sql and no parsing of
the text would be required.

For the UI, you should be able to easily use a repeater control by fetching
the questions from the database and populating the "answers" in the repeater
by fetching the data from the "question, customer, and answer" table.
Relationships are your friend.

HTH,
Mythran
Jan 9 '07 #3
Leonaisse,

Most probably would I use as well that string of char that the others
describe.

Probably is than the most simple to use a datalist and use in that the
indexer from that char string to bind.

Not tested.

Cor

"leonaisse" <le*******@hotmail.comschreef in bericht
news:OT**************@TK2MSFTNGP02.phx.gbl...
Hi All

I need your help please, i've been thinking about this one for so long I
have confused myself!

I have a web app that contains a clients table in SQL server.

When a new client is entered onto the system I want to take all the usual
details(already complete) and on the next page I have 135 questions which
could warrant a yes, no or not asked answer and store the answers to the
135
questions in a DB table linked to the customer.

What is the quickest way for me to code this page and the best DB
structure
to do this. I have the 135 questions in a DB table also.

Thanks

Leon

Jan 10 '07 #4
Leon,

Storing the answers in a 135 character string would be the simplest,
but if you want any kind of data mining capabilities you'll need one
row per answer.

Brian

leonaisse wrote:
Hi All

I need your help please, i've been thinking about this one for so long I
have confused myself!

I have a web app that contains a clients table in SQL server.

When a new client is entered onto the system I want to take all the usual
details(already complete) and on the next page I have 135 questions which
could warrant a yes, no or not asked answer and store the answers to the 135
questions in a DB table linked to the customer.

What is the quickest way for me to code this page and the best DB structure
to do this. I have the 135 questions in a DB table also.

Thanks

Leon
Jan 10 '07 #5

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

Similar topics

16
by: Rod Carrol | last post by:
Hello all, As a beginner I've been exeperiencing lots of errors while building my website, (I'm currently attempting to implement a member login/registration piece for my site using mySQL and...
5
by: Haoyu Zhang | last post by:
Dear Friends, Python assignment is a reference assignment. However, I really can't explain the difference in the following example. When the object is a list, the assignment seems to be a...
15
by: G. Peter | last post by:
Hi there, I've a 'funny' error message of my compiler (g++ 2.95.4) that tells me: robot.cpp: In method `Robot::Robot()': robot.cpp:19: warning: deprecated conversion from string constant to...
11
by: James Gregory | last post by:
I'm pretty sure this is non-totally-trivial enough and standard-C++ enough to post here, however much it may initially look like a "how do I make a computer game?" question, though I may be wrong....
2
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP...
1
by: leonaisse | last post by:
Hi All I need your help please, i've been thinking about this one for so long I have confused myself! I have a web app that contains a clients table in SQL server. When a new client is...
3
by: Paul | last post by:
Hello All, I am working through the SAMS "ASP.NET 2.0 - Unleased" book to teach myself ASP.NET. It is a great book, but Chapter 21 "Using ASP.NET Membership" is causing me problems - or maybe I...
2
by: abshirf2 | last post by:
Hello all, I am really confused, please help! :( I have tomcat 5.5 installed on my machine and i have the JDK/JRE installed. Everything is working fine. Now what i want to do is install php...
6
by: ryanbayona | last post by:
I really wanted to learn C++ thats why i took the initiative to self- study. I am currently following the tutorial at this site: http://www.cprogramming.com/tutorial.html#c++tutorial but im...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.