Click here to Skip to main content
12,634,888 members (28,167 online)
Rate this:
 
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 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 17 Dec 2012
Copyright © CodeProject, 1999-2016
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