i am working on a project in which, i have a text area and when the user enters some details in that text area, the data should be saved in a text file and the path should be saved in the database, when another user wants to access that text file, he could retrieve that using that path.
I am using SQL SERVER management studio express 2008.
How can i do this??????

Please please help.........

Recommended Answers

All 3 Replies

Well the general idea would be to write 2 methods. One that saves the text file and the other saves the path. Those need to be independent with each other and with the rest of the program.
That means:

Write one method that takes as argument the text and the file path, write code that saves the text to the file and then test it seperately in a main method.

Then write another method that takes as argument the file(path) and saves it to the database. Again test it.

When you are done, all you have to do is call those methods when the user wants to save the text into the file.

Start by doing one at a time. Don't expect to write the full code all at once. Break you logic in methods like I explained. Try the above first. Show some code if you have questions and we'll take it from there. There are plenty of examples on how to write to a file in this forum, by the use of the classes BuffereWriter, FileWriter.

I am not familiar with "SQL SERVER management studio express 2008" but usually, you connect to the database, write the query and execute it.

i m doing a project, in which i have designed GUI using java swings, and connected to SQL 5.1 for my database use. here actuaaly i'm developing network based project, i want to save my all updates into a file or a database table, which i do in GUI. How do i do this.?
Please help me...

i m doing a project, in which i have designed GUI using java swings, and connected to SQL 5.1 for my database use. here actuaaly i'm developing network based project, i want to save my all updates into a file or a database table, which i do in GUI. How do i do this.?
Please help me...

Start a new thread; write a method that takes as argument what you want to save, and call it from your gui.
Which is it? File or database. There are plenty of examples. Plus you don't specify what is it that you don't know.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.