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 10 2766
"Steve" <no@no.com> wrote in message
news:41***********************@news.optusnet.com.a u... 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 ?
how do i do it?
"Mike Williams" <Mi**@WhiskyAndCoke.com> wrote in message
news:cj*********@newsg4.svr.pol.co.uk... "Steve" <no@no.com> wrote in message news:41***********************@news.optusnet.com.a u...
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 ?
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
"Steve" <no@no.com> wrote in message
news:41***********************@news.optusnet.com.a u... 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
sorry all for the lack of details.
see below
"J French" <er*****@nowhere.com> wrote in message
news:41****************@news.btclick.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
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
see below
"J French" <er*****@nowhere.com> wrote in message
news:41***************@news.btclick.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
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
in case anyone else is reading this i will put my reply's below
"J French" <er*****@nowhere.com> wrote in message
news:41**************@news.btclick.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 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=
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 growIts 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
Inline:
"Steve" <no@no.com> wrote in message
news:41***********************@news.optusnet.com.a u...
| in case anyone else is reading this i will put my reply's below
|
I am, anyway.
| > Very interesting, I like it
| > Rather than going the whole hog with XML may I suggest the
following:-
| >
| > [ABCD]
| > 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
|
| 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.
|
| 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.
|
The only drawback of the INI approach is that like XML, it repeats the
field names for every record. I would be tempted to go for a "comma
separated values" style text file. With the Split and Join functions,
the text lines are easy to create and break up. It has the added benefit
of being easy to open in Excel, and easy to import into Access should
you decide to in the future.
|
| > 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.
|
You could make the "edit data" app a separate one, so users can only use
your list, but you can edit the list. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |