aspose file tools*
The moose likes JDBC and the fly likes Upload data into notepad Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Upload data into notepad" Watch "Upload data into notepad" New topic
Author

Upload data into notepad

duhit Choudhary
Ranch Hand

Joined: Apr 01, 2012
Posts: 64
Hi all,
I have to upload the data from database(MYSQL) into the notepad.the data is coming from website which i m entering into the database but at the same time i want to fetch the same dta from database and upload that itno the notepad. Please tell me how to do it.

here is what i am doing...


in the line where i am inserting data, i am trying to insert that data into an excel sheet but i want to do the same in notepad.. what to do and where do i need to change the code??

thanks in advance..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42635
    
  65
What does it mean to "insert data into Notepad"? Do you want to create a text file that can be edited in Notepad? While there are ways to use JDBC to insert data into an Excel file, AFAIK, the same isn't true for text files. But you can use the classes in the java.io package to create and write to text files.


Ping & DNS - my free Android networking tools app
duhit Choudhary
Ranch Hand

Joined: Apr 01, 2012
Posts: 64
Ulf Dittmer wrote:
What does it mean to "insert data into Notepad"? Do you want to create a text file that can be edited in Notepad? While there are ways to use JDBC to insert data into an Excel file, AFAIK, the same isn't true for text files. But you can use the classes in the java.io package to create and write to text files.



i just want to insert the column values with the column name same in the database.. isn't it possible?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42635
    
  65
Sorry, not following. Where does the data come from and where do you want it to end up? Now it sounds as if the data should end up in the DB... ?
duhit Choudhary
Ranch Hand

Joined: Apr 01, 2012
Posts: 64
i am getting all the data from a website. url and its id. now i wnt to get these two column value in the notepad & want to end it up in notepad?? i think now you got my point!!!
duhit Choudhary
Ranch Hand

Joined: Apr 01, 2012
Posts: 64
ok.. now to be more precise can we directly got those values from website and put it in notepad???
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42635
    
  65
While I'm still not entirely sure what you mean by "put it in notepad", I'll assume that you want the data to go into a file that can be opened by Notepad. Notepad being very limited, that would be a text file. So the advice I gave in my first post applies - use the classes in the java.io package to write to that file, particularly some combination of File, FileOutputStream, OutputStreamWriter and BufferedWriter.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Upload data into notepad