# using java to get data from notepad.



## overtone (Jul 8, 2007)

Hi, I was wondering I could get help in that topic. 

I wanted to use java retrieve data from a table but it seems too complex to use OCDB to work. So I wanted to try getting the data from a notepad (.txt) file. 

The followings are the data I had to get. I want to type the entries into a notepad so I can use a java application to retrieve it. (They are taken from my database, supposingly to be shown in a table form.)

Catalogue No. | Movie Title | Category | Cost ($)
C0001 | The OH in Ohio | Comedy | 10
C0002 | Bring It On | Comedy | 10

I would want to key in, for e.g. 'Bring It' and the program should be get the - data, catalogue No., the whole movie title, category and cost.

I know I can't use a class file since many variables can be in there. I need help in both the java application codings and the notepad file. Could someone help me out? I would appreciate guidelines and java codings. Thank you.


----------



## little_cruden (Jul 23, 2007)

Before I start ramblign off some code, I jsut want to make sure I have the right idea...

You want to read in the info from a notepad file, put it into an array or list of some sort and then be able to input a search that will take the text and display a full record of any film that contaisn your search criteria?

Am I right? If so then I should manage to help you there.


----------



## overtone (Jul 8, 2007)

I'm so sorry to bother but yes. what you said is right. I want to be able to extract and input data into a notepad file.


----------



## little_cruden (Jul 23, 2007)

Cool, that's straight forward enough, I'll get some code done and post it soon for you. :grin:


----------



## little_cruden (Jul 23, 2007)

Sorry for the delay in this one, jsut been a bit busy. hopefully have the code done by tomorrow night.:smile:


----------



## overtone (Jul 8, 2007)

That is very nice of you to help me, so I won't mind delays since this is a part of programming which I'm learning. And further more, if there is no need to rush this learning, the more you should take your time so I won't feel so bad. 

_Sorry for my poor english_


----------



## little_cruden (Jul 23, 2007)

Oh shoot. I forgot about this. :upset:

My apologies mate. I'll get to work in it soon. 

Actually I should have some code archived somewhere I can just copy and then explain....mmm.... wil have to take a look when I get home from work.


----------



## overtone (Jul 8, 2007)

oh...it's ok. i'm just learning this out of interest. please take your time. no rush


----------

