473,651 Members | 2,635 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

storing plain text data in its own file

Hi all i am just starting to get back into VB and i need a little help.

I am writing a program that asks a user to type in a set of numbers/letters
(in this case shipping containers).

Once the data is entered i have my 4 letters and i want to be able to call
up data relating to the 4 letters.

Basically i want it to show who the container belongs to and any other data
i wish to put in there relating to the container.

Rather than hard code everything i want it in a seperate file(s).

Thanks
Steve
Jul 17 '05 #1
10 2821
"Steve" <no@no.com> wrote in message
news:41******** *************** @news.optusnet. com.au...
Hi all i am just starting to get back into VB and i need a little
help. I am writing a program that asks a user to type in a set
of numbers/letters (in this case shipping containers). Once the
data is entered i have my 4 letters and i want to be able to call up data
relating to the 4 letters. Basically i want it to show who
the container belongs to and any other data i wish to put in
there relating to the container. Rather than hard code
everything i want it in a seperate file(s).


.. . . . and your question is ?

Jul 17 '05 #2
how do i do it?
"Mike Williams" <Mi**@WhiskyAnd Coke.com> wrote in message
news:cj******** *@newsg4.svr.po l.co.uk...
"Steve" <no@no.com> wrote in message
news:41******** *************** @news.optusnet. com.au...
Hi all i am just starting to get back into VB and i need a little
help. I am writing a program that asks a user to type in a set
of numbers/letters (in this case shipping containers). Once the
data is entered i have my 4 letters and i want to be able to call up data
relating to the 4 letters. Basically i want it to show who
the container belongs to and any other data i wish to put in
there relating to the container. Rather than hard code
everything i want it in a seperate file(s).


. . . . and your question is ?

Jul 17 '05 #3
On Sat, 2 Oct 2004 20:33:20 +1000, "Steve" <no@no.com> wrote:
how do i do it?


Look Steve, we can certainly point you in directions that will provide
a solution, however it would be helpful to know quite a lot more about
your problem.

For example
1) How well did you know VB in the past ?
- not a problem, but it gives a starting point
2) How many containers ?
3) What are the typical bits of data you want to store
4) Why did you say 'text file' ?
(You could have spectactularly good reasons for
specifying text files - alternatively you might not
really understand the advantages/disadvantages)
5) What searching criteria do you initially anticipate ?
6) Any reports required ?
7) Is this an embellishment of an existing manual system?

Personally my initial reaction is that you have asked:
'How do I write a CardBox Application ?'

This might be rather interesting, it reminds me of a post that
inspired me to write GPrint.cls some years ago (Mike W knows what I am
talking about)
OTOH it might be that you need to look for an existing $39 package
Jul 17 '05 #4

"Steve" <no@no.com> wrote in message
news:41******** *************** @news.optusnet. com.au...
Hi all i am just starting to get back into VB and i need a little help.

I am writing a program that asks a user to type in a set of numbers/letters (in this case shipping containers).

Once the data is entered i have my 4 letters and i want to be able to call
up data relating to the 4 letters.

Basically i want it to show who the container belongs to and any other data i wish to put in there relating to the container.

Rather than hard code everything i want it in a seperate file(s).


You could have a file for each container - name the file same as the
container
keep in mind the container may be reused.
work with sequential access files.
open the file corresponding to the container --
-- other ways - use a database

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 9/27/2004
Jul 17 '05 #5
sorry all for the lack of details.

see below

"J French" <er*****@nowher e.com> wrote in message
news:41******** ********@news.b tclick.com...
On Sat, 2 Oct 2004 20:33:20 +1000, "Steve" <no@no.com> wrote:
how do i do it?
Look Steve, we can certainly point you in directions that will provide
a solution, however it would be helpful to know quite a lot more about
your problem.

For example
1) How well did you know VB in the past ?
- not a problem, but it gives a starting point

Well i knew a little. Most of the time i wrote programs for myself and if i
got stuck i found something that was a close fit and modified it to my
requirements. I cant even remember what i used to do to get a vb app to
lookup data in an access database.
2) How many containers ? looking at about 500+ different prefixes
3) What are the typical bits of data you want to store plain text.
4) Why did you say 'text file' ?
(You could have spectactularly good reasons for
specifying text files - alternatively you might not
really understand the advantages/disadvantages) Thought it would be easier to use. Though i am starting to think that i am
heading in the wrong direction.
5) What searching criteria do you initially anticipate ? It will be a 4 letter combination. Container numbers are (with the exception
of a rare few) all 4 letters then 7 numbers EG: ABCD1234567. The program
only need to look at the 4 letters.
6) Any reports required ? Well I want the program to show information about the prefix (Owner/shipping
line). Nothing more than that is required. At most i expect it to display
only 2-3 lines of text.
7) Is this an embellishment of an existing manual system? The original purpose of the program was to automate the calculation of the
7th number (called the check digit). This i have done. The details i wish to
display are just there to act as a quick reference for when i dont have
internet handy on my laptop.


Personally my initial reaction is that you have asked:
'How do I write a CardBox Application ?' i guess you are probably right.

Once again sorry to all for the lack of detail. I was to busy trying to work
out exactly what i wanted that i fell short in asking for help with it.

thanks!!!

steve


This might be rather interesting, it reminds me of a post that
inspired me to write GPrint.cls some years ago (Mike W knows what I am
talking about)
OTOH it might be that you need to look for an existing $39 package

Jul 17 '05 #6
On Wed, 6 Oct 2004 18:52:00 +1000, "Steve" <no@no.com> wrote:
sorry all for the lack of details.


<snip>

It sounds to me as if you have :-

1) Codes of the form: ABCD1234567
2) The 4 digit prefix refers to the owner/shipping line
3) There are about 500 owner/shipping lines
4) You want a simple lookup on the 4 digit prefix
- that gives you 3 to 4 items of data

Interestingly you are right about text files, as the chances are that
you already have (or can get) a text file containing this information.

500 lines is pretty trivial in terms of data
- easily (and best) kept in memory

Could you post about 4 lines of the text file that you have (or
envisage getting from ... who knows where)

Alternatively (something I doubt) if you wish to generate the data
file yourself, then tell us

You actually have an interesting little project, and it is especially
neat that it has come from a checksum utility
- it will, of course grow and grow

A good project to hone up your programming
- you will be on a roll
Jul 17 '05 #7
see below
"J French" <er*****@nowher e.com> wrote in message
news:41******** *******@news.bt click.com...
On Wed, 6 Oct 2004 18:52:00 +1000, "Steve" <no@no.com> wrote:
sorry all for the lack of details.
<snip>

It sounds to me as if you have :-

1) Codes of the form: ABCD1234567
2) The 4 digit prefix refers to the owner/shipping line
3) There are about 500 owner/shipping lines
4) You want a simple lookup on the 4 digit prefix
- that gives you 3 to 4 items of data

Interestingly you are right about text files, as the chances are that
you already have (or can get) a text file containing this information.

- There are websites with this info on the net. Some of the feed back i have
gotton has been to see if i can put the key parts together and create
something that does not require internet access.

500 lines is pretty trivial in terms of data
- easily (and best) kept in memory - I did give this some thought but my reason for having the data in a
seperate file was for ease of update and it saves me re-compiling the
program when ever i make changes

Could you post about 4 lines of the text file that you have (or
envisage getting from ... who knows where) An example of the data would be
OWNER =
WEBSITE ADDRESS =
UNIT ENQUIRY ADDRESS = (this will point to the page on the shipping
lines/lease company's web site which is used to track and trace containers)
CONTACT NUMBER = (at the moment this will be australian numbers until i can
find someone who is willing to help with overseas ones. Then I will add a
location option that will only display data which is relevant to your
geographical location)

I have all this information in hard copy and saved data. Basically i have a
little black book with most of the data and the rest is in my head. The
above is pretty much all i am looking at putting in.

With regards to the web sites i am not worried at this stage of having them
setup so all you have to do is click it and it goes there.


Alternatively (something I doubt) if you wish to generate the data
file yourself, then tell us I will be entering in the data myself. My main reason being that sometimes
particular web sites dont make it easy to find the data needed. The options
i listed above (from my experience anyway) are the main things you want when
trying to track down containers.

You actually have an interesting little project, and it is especially
neat that it has come from a checksum utility
- it will, of course grow and grow Its the first project i have done that i have found practical use for. I
have it posted on the net (i dont charge for it and dont plan on doing so)
and so far a few people have downloaded it and used it so its kind of kept
me going knowing that someone else has found use for it.

A good project to hone up your programming
- you will be on a roll


thankyou very much for your help

rgds

steve
Jul 17 '05 #8
Inline :-

On Thu, 7 Oct 2004 19:57:14 +1000, "Steve" <no@no.com> wrote:
<snip>

It sounds to me as if you have :-

1) Codes of the form: ABCD1234567
2) The 4 digit prefix refers to the owner/shipping line
3) There are about 500 owner/shipping lines
4) You want a simple lookup on the 4 digit prefix
- that gives you 3 to 4 items of data

Interestingly you are right about text files, as the chances are that
you already have (or can get) a text file containing this information.- There are websites with this info on the net. Some of the feed back i have
gotton has been to see if i can put the key parts together and create
something that does not require internet access.


Gottit
500 lines is pretty trivial in terms of data
- easily (and best) kept in memory

- I did give this some thought but my reason for having the data in a
seperate file was for ease of update and it saves me re-compiling the
program when ever i make changes


Sorry, what I meant was keep the data in a Text file and wolf it into
RAM just once when the App starts
Could you post about 4 lines of the text file that you have (or
envisage getting from ... who knows where)

An example of the data would be
OWNER =
WEBSITE ADDRESS =
UNIT ENQUIRY ADDRESS = (this will point to the page on the shipping
lines/lease company's web site which is used to track and trace containers)
CONTACT NUMBER = (at the moment this will be australian numbers until i can
find someone who is willing to help with overseas ones. Then I will add a
location option that will only display data which is relevant to your
geographical location)


Very interesting, I like it
Rather than going the whole hog with XML may I suggest the following:-

[ABCD]
OWNER=
WEBSITE=
UEA=
CN=

[CDEF]
OWNER=
WEBSITE=
UEA=
CN=

As you will see this is standard INI file format, which is pretty
handy as it means that one can use all the utilities that currently
exist for handling them

Cutting down on the Mnemonics (Tags or field 'names') saves typing and
will reduce errors
I have all this information in hard copy and saved data. Basically i have a
little black book with most of the data and the rest is in my head. The
above is pretty much all i am looking at putting in.
Yes - well I can see the way this one will grow !
With regards to the web sites i am not worried at this stage of having them
setup so all you have to do is click it and it goes there.
That is very easy - but is stage 2 of the project

Alternatively (something I doubt) if you wish to generate the data
file yourself, then tell us

I will be entering in the data myself. My main reason being that sometimes
particular web sites dont make it easy to find the data needed. The options
i listed above (from my experience anyway) are the main things you want when
trying to track down containers.


You'll think of more - but it will be a cinch adding them
You actually have an interesting little project, and it is especially
neat that it has come from a checksum utility
- it will, of course grow and grow Its the first project i have done that i have found practical use for. I
have it posted on the net (i dont charge for it and dont plan on doing so)
and so far a few people have downloaded it and used it so its kind of kept
me going knowing that someone else has found use for it.


Yes, appreciation is a great motivator
A good project to hone up your programming
- you will be on a roll


thankyou very much for your help


Normally it is not good form to move NG discussions off the forum,
however in this case I reckon an exception should be made.

I can write (as could many others here) the guts of your Application
in about thirty lines of 'original code' - although those lines would
be 'driving' quite a lot of my standard VB library routines
- a bit too much to post here
- also it is messy posting a Form, several Class modules and two .BAS
modules

I think the best thing is that I produce something that gives you a
flying start, and from then on you take over and enhance the App

For example, although you currently just want to read the data, it
would be nice to be able to edit and update the records from within
the App.

If you would like to take this approach, then you can track down my
Email address from www.jerryfrench.co.uk

For the benefit of others following this thread, I propose using a
'pure VB' (not API) INI file handler that has a 'virtual' option
eg: once loaded it just keeps the data in RAM
- the INI manager would be thinly wrapped in another Class, to
abstract the App from knowing that it is dealing with an INI file
Jul 17 '05 #9
in case anyone else is reading this i will put my reply's below
"J French" <er*****@nowher e.com> wrote in message
news:41******** ******@news.btc lick.com...
Inline :-

On Thu, 7 Oct 2004 19:57:14 +1000, "Steve" <no@no.com> wrote:
<snip>

It sounds to me as if you have :-

1) Codes of the form: ABCD1234567
2) The 4 digit prefix refers to the owner/shipping line
3) There are about 500 owner/shipping lines
4) You want a simple lookup on the 4 digit prefix
- that gives you 3 to 4 items of data

Interestingly you are right about text files, as the chances are that
you already have (or can get) a text file containing this information.- There are websites with this info on the net. Some of the feed back i
have
gotton has been to see if i can put the key parts together and create
something that does not require internet access.


Gottit
500 lines is pretty trivial in terms of data
- easily (and best) kept in memory

- I did give this some thought but my reason for having the data in a
seperate file was for ease of update and it saves me re-compiling the
program when ever i make changes


Sorry, what I meant was keep the data in a Text file and wolf it into
RAM just once when the App starts


-right, now i follow.
Could you post about 4 lines of the text file that you have (or
envisage getting from ... who knows where)An example of the data would be
OWNER =
WEBSITE ADDRESS =
UNIT ENQUIRY ADDRESS = (this will point to the page on the shipping
lines/lease company's web site which is used to track and trace
containers)
CONTACT NUMBER = (at the moment this will be australian numbers until i
can
find someone who is willing to help with overseas ones. Then I will add a
location option that will only display data which is relevant to your
geographica l location)


Very interesting, I like it
Rather than going the whole hog with XML may I suggest the following:-

[ABCD]
OWNER=
WEBSITE=
UEA=
CN=

[CDEF]
OWNER=
WEBSITE=
UEA=
CN=


Sounds like a good option.

As you will see this is standard INI file format, which is pretty
handy as it means that one can use all the utilities that currently
exist for handling them
also makes for smaller updates to the database of information. I was
tinkering with an access file. By the time i finish entering the data it
could be a little big for some.


Cutting down on the Mnemonics (Tags or field 'names') saves typing and
will reduce errors
typing will be an issue as i am getting assistance from the webmaster of
www.prefixlist.com and he updates pretty much weekly.
I have all this information in hard copy and saved data. Basically i have
a
little black book with most of the data and the rest is in my head. The
above is pretty much all i am looking at putting in.
Yes - well I can see the way this one will grow !


i had another look at a list of prefixes that i have. I think i may have
been dreaming when i said about 500. I didnt could but i reckon its a heck
of a lot more than that.
With regards to the web sites i am not worried at this stage of having
them
setup so all you have to do is click it and it goes there.
That is very easy - but is stage 2 of the project


Easy? sounds good to me but as you said, thats for later

Alternatively (something I doubt) if you wish to generate the data
file yourself, then tell usI will be entering in the data myself. My main reason being that sometimes
particular web sites dont make it easy to find the data needed. The
options
i listed above (from my experience anyway) are the main things you want
when
trying to track down containers.


You'll think of more - but it will be a cinch adding them


I hope its that easy. Hopefully once this thing gets big i may be able to
find someone else with the same knowledge (in shipping and VB) that could
assist with the updates and mods.
You actually have an interesting little project, and it is especially
neat that it has come from a checksum utility
- it will, of course grow and grow
Its the first project i have done that i have found practical use for. I
have it posted on the net (i dont charge for it and dont plan on doing so)
and so far a few people have downloaded it and used it so its kind of kept
me going knowing that someone else has found use for it.
Yes, appreciation is a great motivator
A good project to hone up your programming
- you will be on a roll


thankyou very much for your help


Normally it is not good form to move NG discussions off the forum,
however in this case I reckon an exception should be made.

I can write (as could many others here) the guts of your Application
in about thirty lines of 'original code' - although those lines would
be 'driving' quite a lot of my standard VB library routines
- a bit too much to post here
- also it is messy posting a Form, several Class modules and two .BAS
modules

I think the best thing is that I produce something that gives you a
flying start, and from then on you take over and enhance the App

For example, although you currently just want to read the data, it
would be nice to be able to edit and update the records from within
the App.


interesting idea. Whilst i want the main data to be protected i can see
benefit from users being able to add comments or change location specific
information. Might have to give this some more thought.


If you would like to take this approach, then you can track down my
Email address from www.jerryfrench.co.uk

For the benefit of others following this thread, I propose using a
'pure VB' (not API) INI file handler that has a 'virtual' option
eg: once loaded it just keeps the data in RAM
- the INI manager would be thinly wrapped in another Class, to
abstract the App from knowing that it is dealing with an INI file

Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3043
by: Mark | last post by:
I have a website with an increasing amount of articles and news reports and so I am thinking of moving away from storing each article as a seperate page to having a single page and storing articles in a databasewhich are retrieved using a GET parameter. I see the advantage to me in using this approach as being making use of MySQL's fulltext search capability and less work needed when updating the design of the page. I'm not sure of a few...
8
2172
by: Steven | last post by:
Hi there, I am wanting to store price data as n.nn format, so if the user enters "1" the data that gets stored is "1.00" Is there a way to do this. Cheers Steven
3
11753
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem I have is I cannot retain the primary key field in a variable which is then used in a SQL update...
4
3867
by: Brian Burgess | last post by:
Hi all, Anyone know of any special issues with storing cookies with ASP? I'm trying this with two browsers: One is IE 6.0 with cookies set to 'prompt'. This has been working properly as any new site I goto seems to prompt me to store their cookie. The other is Pocket IE on Pocket PC 2002, with the cookies set to 'enabled'. My problem is that the cookies dont seem to be being written with my ASP. I dont get the prompt to store...
5
1446
by: middletree | last post by:
The site, which is almost finished, is at http://site234.webhost4life.com/crgmdal7/ If you click most of the links in the gold nav bar, they will take you to various places within the site. But if you select the one called "Loads", it takes you to http://www.crgm06.com/aval.txt, which I have opened into a new window. As you can see, it's a plain text file, and it is on a different domain, which I have no control over. The data in there...
3
1547
by: Arlyn | last post by:
I am using an image datatype to store multiple filetypes includeing plain text data. it works except for pdf Data. When I retrieve the the file couldn't be opened in acrobat reader and the file was 3KB bigger than the original. Any suggestions would be helpful.
7
9273
by: AndrewMBaldwin | last post by:
So I am quite upset that after working for a few hours on getting an XML file format and XSL file that formats the XML data appropriatly, only to find that if you store HTML code in your XML file (even in a CDATA block), after the XML file is rendered, the HTML that was stored in the XML file is not rendered, essentially put into the page as if it had <pre> tags around it. I know that someone is going to yell at me and say that the XML...
0
1620
by: Sinex | last post by:
Hi, Am writing a webservice thats gonna access a DB and return data. The connection string needs to be configurable. So am thinking of storing it in the web.config file. But then is it a good idea to have the connection string with user/password info sitting there in web.config? Can it sit there as plain text and can I just use IIS security settings to determine who can access this file? Or are there any other best practices for this...
3
1906
by: darren | last post by:
Hi there Im working on an assignment that has me store data in a buffer to be sent over the network. I'm ignorant about how C++ stores data in an array, and types in general. If i declare an array of chars that is say 10 bytes long: char buff; does this mean that i can safely store 80 bits of data?
0
8349
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8695
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7296
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.