Connecting Tech Pros Worldwide Forums | Help | Site Map

Setting Auto-incrementing numbers for IP Address

Newbie
 
Join Date: Nov 2008
Posts: 2
#1: Nov 21 '08
I am confused and not even sure this can work. I have a database that needs to assign licenses that we bought for IP addresses. We have purchased 1000 of these and they are in numeric order. How do I set up an autonumber when the first number would be 14.255.2533.26 for example. Is this possible?

Moderator
 
Join Date: Feb 2008
Location: Beauly, near Inverness, Scotland
Posts: 1,576
#2: Nov 21 '08

re: Setting Auto-incrementing numbers for IP Address


Hi. An IP address is not a number - it is a composite of four octets, and the one you show is not valid. For a basic intro on IP addresses see the following How Stuff Works: What is an IP address article.

We frequently get asked about autonumbers, and this is one of the many occasions when I'd say that autonumbers are unsuited to the task you want to perform.

Personally, if I knew the block of 1000 IP addresses concerned I'd store the IP address value in a lookup table and assign these as needed. I'm not at all convinced that you really mean IP addresses, however, as perhaps you are talking about some kind of licence number that you want to allocate?

In any event it is not a task for an autonumber.

-Stewart
Newbie
 
Join Date: Nov 2008
Posts: 2
#3: Nov 21 '08

re: Setting Auto-incrementing numbers for IP Address


Thanks. I mistyped it, but did mean to type a true IP address. I will take your suggestion and use a lookup table.
Reply