473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Help me read/write to text file

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
4 1406
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
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
Daniel,

Have a look at these pages

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

I hope this helps a little bit?

Cor
Nov 21 '05 #4
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Parker.Jim | last post by:
I need to write a program which performs word subsitutions on a text file. The program should input the names of three text files: the source file that will be "edited", a text file that contains...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
3
by: Joshua Nunn | last post by:
I am reading in a text file of about 25 megs, using a streamreader class. Now this text file was generated using a DataBUS programming language, now known as PL/B, and being used as a database,...
8
by: skumar434 | last post by:
i need to store the data from a data base in to structure .............the problem is like this ....suppose there is a data base which stores the sequence no and item type etc ...but i need only...
1
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include...
2
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include...
4
by: naknak4 | last post by:
Introduction This assignment requires you to develop solutions to the given problem using several different approaches (which actually involves using three different STL containers). You will...
5
by: B. Williams | last post by:
I need some assistance with random access file processing. I have a function that I would like to change from sequential file processing to random access. Thanks in advance. void...
3
by: Porkie999 | last post by:
-----------------------------------------------------------------------QUESTION hi i am really stuck with this and its only a small problem. i want to be able to type ......... dsfsjfjsjjfs in...
3
by: ibeehbk | last post by:
Hi. I have a form made in xhtml. I test via vbscript to make sure none of the fields are empty and properly formatted (ie email). All the regular fields work. However, I have two drop down menus...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.