Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 29th, 2006, 01:00 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Questionnaire how-to?

Hello,

I apologize if this question has already been answered.


I am just getting started with ASP/ADO.NET and have been given the assignment of developing a multi-page questionnaire.

I have decided to go with the following structure for my answer table:

id,
userId,
questionId,
value

What I am trying to do (and I apologize if I am phrasing this incorrectly) is pass a 2-dimensional array of questionIds and value pairs to a method, which I have defined in an Object Data Source (an Answer class). I would like to loop over this array and add the name/value pairs to the table.

I have looked everywhere for a real-world ASP.NET solution to this problem and have found nothing (Perhaps I am asking the wrong question, also!).

If any one can provide me with a solid example of how I can achieve this or point me to one, I would be most appreciative.

Any additional explanations, advice, in gathering information related to ASP and ADO.NET are welcome.

Thank you so much!
Reply With Quote
  #2 (permalink)  
Old August 29th, 2006, 01:14 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

You may want to take a look at the book ASP.NET 2.0 Instant Results: http://www.wrox.com/WileyCDA/WroxTit...471749516.html

It features a complete chapter about questionnaires called the SurveyEngine. It comes with the full source for the app and a thorough explanation about its inner workings and extensibility points.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #3 (permalink)  
Old August 31st, 2006, 11:13 AM
Friend of Wrox
 
Join Date: Feb 2006
Location: , , USA.
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I know this is a forum for assiting fellow programmers but you seem to be in the very, very early stages of a project and your questions are very general.

So another way to get this done is to submit a request for quote to a company that already does this sort of thing...like say...the company I work for :) We can make quick work of any survey project.

That being said, I see you have a basic answer table there. What data type are your answers? Are they all integers? varchar? What about the fact that likely some questions will have integer answers, some decimal answers, and others varchar answers? Some might even involve uploading some type of file...so this demands a more complicated database structure.

If you are planning to just covert everything to varchar and store all datatypes that way, stop and think about the repercussions of that decision. It can be done but it can make reporting and using the data tricky. It also opens the door much wider for corruption of the data, and survey's typically are only worth the cost if they are accurate. Just some food for thought...

Neil Timmerman
Programmer
Veris Consulting
Reply With Quote
  #4 (permalink)  
Old September 7th, 2006, 04:18 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the pointer Imar, the code samples from your book gave me valuable insight for this one particular issue. Nice plug too.

As for your reply, thenoseknows, I think what you're essentially saying is that I should pay you to do the thinking for me, which is absurd.

The schema I'm using is significantly more complex than the glimpse I've provided for this post. I should also think that someone with your "expertise" would be able to infer at least some the column data types by the way they are named.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off




All times are GMT -4. The time now is 10:55 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.