Okay, we all know an IP address is four bytes, delimited by '.' I have a stored procedure that searches through an IP List with the format of *.10.100.1, where the * can be for any of the bytes.
The only problem is when I store the IP addresses as int, I run into problems with IP's > 128.x.x.x (because it is stored as a negative number in the int field)
I resolved this problem by using a bigint field, but I want to use just an int, because I'm using twice as much memory as I need.
In SQL 2000, is there any way to make it an unsigned int? Or can I convert a user entered 128 to -127, or whatever it should be? Or should I use a varbinary field instead...
Kevin
The only problem is when I store the IP addresses as int, I run into problems with IP's > 128.x.x.x (because it is stored as a negative number in the int field)
I resolved this problem by using a bigint field, but I want to use just an int, because I'm using twice as much memory as I need.
In SQL 2000, is there any way to make it an unsigned int? Or can I convert a user entered 128 to -127, or whatever it should be? Or should I use a varbinary field instead...
Kevin