By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,175 Members | 1,710 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,175 IT Pros & Developers. It's quick & easy.

Help me read/write to text file

P: n/a
I want to make a program that has 3 textboxes for inputting: Name, ID,
Amount, and then when I click "Add Item" button, it adds it to a text file,
and shows up on the list box. When I close and reopen the program, the text
file should fill the listbox with the records.

How do I do this? Is this a "Sequential Access file" ?

thanks
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Daniel,

without making things too complicated for what seems to be a relatively
simple app, why not use a database. you can use your three textboxes, bound
to three fields of a database (Access/Jet or MSDE2000 come to mind). You
could use a Grid to display the records in the DB rather than using a list
box to display lines from a text file.

you could even skip the textboxes and add the data directly to the grid.

HTH
Lee

PS - Of course, if you really want to use a text file, post back and we'll
work on this from a text file point of view.

"Daniel Kaseman" <da*@cfaith.com> wrote in message
news:uT**************@TK2MSFTNGP14.phx.gbl...
I want to make a program that has 3 textboxes for inputting: Name, ID,
Amount, and then when I click "Add Item" button, it adds it to a text
file,
and shows up on the list box. When I close and reopen the program, the
text
file should fill the listbox with the records.

How do I do this? Is this a "Sequential Access file" ?

thanks

Nov 21 '05 #2

P: n/a
But what if I don't have these programs?

"lgbjr" <lg***@online.nospam> wrote in message
news:eM**************@TK2MSFTNGP09.phx.gbl...
Daniel,

without making things too complicated for what seems to be a relatively
simple app, why not use a database. you can use your three textboxes, bound to three fields of a database (Access/Jet or MSDE2000 come to mind). You
could use a Grid to display the records in the DB rather than using a list
box to display lines from a text file.

you could even skip the textboxes and add the data directly to the grid.

HTH
Lee

PS - Of course, if you really want to use a text file, post back and we'll
work on this from a text file point of view.

"Daniel Kaseman" <da*@cfaith.com> wrote in message
news:uT**************@TK2MSFTNGP14.phx.gbl...
I want to make a program that has 3 textboxes for inputting: Name, ID,
Amount, and then when I click "Add Item" button, it adds it to a text
file,
and shows up on the list box. When I close and reopen the program, the
text
file should fill the listbox with the records.

How do I do this? Is this a "Sequential Access file" ?

thanks


Nov 21 '05 #3

P: n/a
Daniel,

Have a look at these pages

http://samples.gotdotnet.com/quickstart/

I hope this helps a little bit?

Cor
Nov 21 '05 #4

P: n/a
Well, that could be a problem :-)

MSDE 2000 is free though:
http://msdn.microsoft.com/library/de.../usingmsde.asp

http://www.microsoft.com/downloads/d...DisplayLang=en

And this is a link to a free tool for managing MSDE 2000:

http://www.asql.biz/DbaMgr.shtm

Though, even using a scaled back version of SQL Server, it does seem like a
bit of overkill for three fields of data, but....

it could be a great learning experience!!

Have a look at the above links. If you're interested, download and install.
If not, we'll go with the text file.

Cheers,
Lee

"Daniel Kaseman" <da*@cfaith.com> wrote in message
news:u5**************@TK2MSFTNGP15.phx.gbl...
But what if I don't have these programs?

"lgbjr" <lg***@online.nospam> wrote in message
news:eM**************@TK2MSFTNGP09.phx.gbl...
Daniel,

without making things too complicated for what seems to be a relatively
simple app, why not use a database. you can use your three textboxes,

bound
to three fields of a database (Access/Jet or MSDE2000 come to mind). You
could use a Grid to display the records in the DB rather than using a
list
box to display lines from a text file.

you could even skip the textboxes and add the data directly to the grid.

HTH
Lee

PS - Of course, if you really want to use a text file, post back and
we'll
work on this from a text file point of view.

"Daniel Kaseman" <da*@cfaith.com> wrote in message
news:uT**************@TK2MSFTNGP14.phx.gbl...
>I want to make a program that has 3 textboxes for inputting: Name, ID,
> Amount, and then when I click "Add Item" button, it adds it to a text
> file,
> and shows up on the list box. When I close and reopen the program, the
> text
> file should fill the listbox with the records.
>
> How do I do this? Is this a "Sequential Access file" ?
>
> thanks
>
>



Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.