Counter. How to keep track of an order number?

  • Thread starter Thread starter gce
  • Start date Start date
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
 
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
 
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)
 
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
 
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.
 
Back
Top