how to insert programmatic questions into database?

Posted by Tejamanimala under ASP.NET on 9/18/2013 | Points: 10 | Views : 563 | Status : [Member] | Replies : 3
hi,I am working on online examination project,i am adding questions into database from front end,it will add to database.

i have 6 columns ...Question,OptionA,OptionB,OptionC,OptionD,CorrectOption,and have two buttons insert and clear,when we need to enter question and answers one by one,and click on insert,then that question will be stored into database,here my problem iswhen i insert programs,like.......

What will be the output of the program ?

#include<stdio.h>

#include<string.h>

int main()

{

char sentence[80];

int i;

printf("enter a line of text");

gets(Sentence);

}

like this i want to insert step by step question in question textbox,but it is not inserting like this into database,it is stored like...................

#include<stdio.h>#include<string.h>int main(){char sentence[80];int i;printf("enter a line of text");gets(Sentence);}

how should i store step step by step into database

manimala


Responses

Posted by: Nismeh on: 9/18/2013 [Member] Starter | Points: 25

Up
0
Down
Is output also in unstepped form?

IT KNOWLEDGE IS APPLIED KNOWLEDGE
So Just Do It

Tejamanimala, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Tejamanimala on: 9/18/2013 [Member] Starter | Points: 25

Up
0
Down
yes

manimala

Tejamanimala, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 9/18/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
This link might help you
http://stackoverflow.com/questions/5078882/line-breaks-are-being-lost-when-sending-text-to-the-database

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Tejamanimala, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response