Counter. How to keep track of an order number?

G

gce

Hi,

I am an old fashion vb6 programmer and new to asp.net (vb). So please
forgive me.

I like to have a ordernumber counter. How do i do this? By wrting a number
to a file and increasing it? Or are there smarter ways?

Best regards,
Gert
 
P

Paul Custance

Are you using a database such as MySql or Sql Sever? You could use cookies but these may not be persistent if the user deletes them. The other may
Application state variable which would be permanent on the server.

Or if you want to use a file I recommed XML as it is very easy to create and maintain.

Paul
 
G

gce

Paul, thanks.

I could use a SQL server, my ISP does have one. But for now (as a newbie in
ASP.NET) these would be an addition skill to get. Will do so, but first
things first.

It must be a server global thing.
Am new to XML too. But the idea is that when a user presses a button the
number should be increased by one. This is a global var that when another
user presses the button it should be the same variable but one higher.
(strange description, but forgive me I am from The Nethelands, english is
not my language)

Could you help me with some sample code please.
Because I am an old vb6 programmer (for fun, my job is Windows 2003 server
administrator) i like to have asp.net code for vb.code

Thanks a lot !

When its not the full purpose of this newsgroup, you could email it to me.
(e-mail address removed)
 
G

gce

Hi,

Thanks for pointing me to the application() variables. That works great.

But what happens with this variable when the server reboots ? Will it be
lost ?

Best regards,
Gert
 
G

gce

Because the website is hosted by my ISP I like to be sure what happened. So
I rebooted my virtual-windows-2003 server and the global application
variables are gone. So this is not a good thing to build on for a number
that has to be safe.

Hope to see more of your xml samples.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top