2
Answers

checking IP within the given ranges

Naga Satya

Naga Satya

7y
161
1
I have 10 set of IP ranges from and To Ip in database.
I have to check whether my system IP  is with in this 10 IP ranges.
I have checked if only one row is present
but how the entire rows will be compared.
IP's to be stored as dotted IP only..
can anyone plz help 
Answers (2)
0
Gomathi Palaniswamy

Gomathi Palaniswamy

NA 3.8k 1.5m 14y
Hi Friend,

The below coding will help if you save the values in tostring()
                
                    string d;
                    d = dateTimePicker1.Value.ToShortDateString() + " 00:00:00".ToString();
                    string d1;
                    d1 = dateTimePicker2.Value.ToShortDateString() + " 23:59:59".ToString();

                    select command:

                select * from today where date between''+d+"'and'"+d1+"'


With Regards,
Gomathi.P