Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
Hello FRNDS !!
 
Am working on Asp.net, C# , SqlServer 2005.
 
I have Survey Form on my Asp.net Webpage...In this I have total 15 Questions with Radio Button Options and a submit button.
 
So, In this 15 Questions.... Last 2 Questions are used for entering Comments (I used Textboxes here for last 2 questions to enter the comments)
 

In SqlServer 2005 Database, I have Two Tables with Name
1)SurveyAnswers (Table1)
2)Comments (Table2)
 

So, my requirement is i want to save last 2 comments data entered by user in Comments table. and the left over answers must be saved in Survey Answers Table.
 
I WANT TO SAVE THE DATA IN TWO DIFFERENT TABLES.
 

Please help,
 
Thanks in Advance.
Posted 17-Dec-12 10:17am
Comments
ryanb31 at 17-Dec-12 15:36pm
   
Use a SQLConnection to connect to the DB, write a stored proc to write to the different tables, then use a SQLCommand object to execute it.
adriancs at 17-Dec-12 22:22pm
   
So?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Fire two queries as per your requirements or else as Graus said, you can do that as well... Where are you stuck at ??
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This is trivial. You call a stored proc that stores the data in the tables you want. Where is the issue ?
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 380
1 OriginalGriff 230
2 DamithSL 220
3 Zoltán Zörgő 170
4 Maciej Los 135
0 OriginalGriff 7,740
1 DamithSL 5,694
2 Sergey Alexandrovich Kryukov 5,404
3 Maciej Los 5,061
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 17 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100