sue
02-03-2008, 07:32 AM
I really would appreciate your help to solve my dilemma --
1. What I have is a table named questions in a SQLlite database. The table has three columns - QuestionID, QuestionText and QuestionStatus.
2. I have a page in my project that has a listbox populated with the questiontext from the database. The user doubleclicks on the questiontext in listbox and is then presented with a page where they can type in their answer to the question.
3. The user types their answer into an input box - clicks on a save button - the answer is then saved as the Question's QuestionID DOT txt (12.txt for example) and the database is updated with a status of A for the answered question.
4. What I Need: An additional page where a RichText object is populated with the text of each question (pulled from the database where status = A) followed by the related text from the text file .
For Example - my end result should be a CompleteDocument.rtf file that is something like:
WHAT IS YOUR NAME? <-- pulled from Database with questionID 1
My name is john doe <-- pulled from text file (1.txt for example)
WHO IS YOUR FAVORITE AUTHOR? <-- pulled from database with questionid 2
My favorite author is Stephen King <--pulled from text file (2.txt)
WHAT IS YOUR FAVORITE COLOR?
My favorite color is Red
...
MY DILEMMA:
How do I merge the text from the questions (held in the database) and the text for each answer for the question to a RTF file that has all the questions and answers in one object like the example above?
Is there a way to merge RTF files and then open them in the richtext object in my page described in item 4 above?
If I saved the answer to an RTF file by having the user type their answer into an RTF object and saving as an RTF file (a change to item 3) would that simplify merging the files - how would I merge multiple RTF files?
I would consider using the database for the answer also but the text for the answer could be 1000's of characters and may not fit into the database field.
Can anyone help me, please? I'm at a stand still on this project until I figure out a solution to this step. If there's a better way to accomplish the same thing I'd also like to hear it.
Thanks for your assistance!!!
Sue
1. What I have is a table named questions in a SQLlite database. The table has three columns - QuestionID, QuestionText and QuestionStatus.
2. I have a page in my project that has a listbox populated with the questiontext from the database. The user doubleclicks on the questiontext in listbox and is then presented with a page where they can type in their answer to the question.
3. The user types their answer into an input box - clicks on a save button - the answer is then saved as the Question's QuestionID DOT txt (12.txt for example) and the database is updated with a status of A for the answered question.
4. What I Need: An additional page where a RichText object is populated with the text of each question (pulled from the database where status = A) followed by the related text from the text file .
For Example - my end result should be a CompleteDocument.rtf file that is something like:
WHAT IS YOUR NAME? <-- pulled from Database with questionID 1
My name is john doe <-- pulled from text file (1.txt for example)
WHO IS YOUR FAVORITE AUTHOR? <-- pulled from database with questionid 2
My favorite author is Stephen King <--pulled from text file (2.txt)
WHAT IS YOUR FAVORITE COLOR?
My favorite color is Red
...
MY DILEMMA:
How do I merge the text from the questions (held in the database) and the text for each answer for the question to a RTF file that has all the questions and answers in one object like the example above?
Is there a way to merge RTF files and then open them in the richtext object in my page described in item 4 above?
If I saved the answer to an RTF file by having the user type their answer into an RTF object and saving as an RTF file (a change to item 3) would that simplify merging the files - how would I merge multiple RTF files?
I would consider using the database for the answer also but the text for the answer could be 1000's of characters and may not fit into the database field.
Can anyone help me, please? I'm at a stand still on this project until I figure out a solution to this step. If there's a better way to accomplish the same thing I'd also like to hear it.
Thanks for your assistance!!!
Sue