O$ - Determine if machine is using DHCP

Doug Easterbrook doug at artsman.com
Sat Apr 4 14:08:56 EDT 2009

from the answers to the list, it seems that the requirement comes from  
the age old problem of helping users find their database server and  
not being able to rely on the server being at any one specific address.

it seems to me that having DHCP enabled may reduce the chance of the  
service moving to a different ip address, but not necessarily.  The  
only thing that mitigates the issue is if you can make the ip address  
static.   DNS's are nice, but not easy for an end user to set up.

a small philosophical thought before a suggestion to solving this.     
I use the concept anytime I'm faced with where to help the user help  
themselves.   There are 3 possible controls in any system:
- 'detective' - detect that an error condition exists
-  'preventative' - prevent the error condition from ever occurring
-  'corrective' - allow the user to correct the error condition

if we rely only on one of the control measures exclusively, it does  
not a good system make.   eg:  suppose we prevent negative numbers in  
a field and make all sorts of assumptions in our code that the number  
will be positive (preventative measure).   and then suppose somebody  
inserts a negative number using SQL - if we have no 'detective'  
measures to find the issue, then the code assuming positive numbers is  
unprotected and our code is in deep trouble.

thats a bit of an aside, but it might apply in this case.

if we prevent running the odb (or simply warn them) unless they have a  
static ip, then we are going to be in trouble down the road regardless.

We do know from the client perspective, when they cannot connect to  
the ODB (or any database for that matter), because we get an error  
condition from the code

I might suggest that the better answer in this case is to build a  
network scanner for the subnet to go look for the  
service you want on all machines on the network.   That way you can  
pop up and say 'looks like the server moved ... did you mean yyy  

that way you can help them help themselves.

or...   have a tool running on the server (perhaps omnis) that gets  
'LocalIPAddr' and displays it on the screen.  Call it the ODB console  
if you need to.   That way, if somebody cannot connect, you just tell  
them to go see what the number is and then type it in to the client.

just a thought.    Perhaps not elegant - but I do think fighting DHCP  
might be the wrong control avenue on this one.

Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
Phone (403) 536-1205    Fax (403) 536-1210

On Apr-4-09, at 11:00 AM, omnisdev-en-request at lists.omnis-dev.com wrote:

> out of interest, why does it matter (or whats the business purpose) of
> how the machine gets its ip?
> you can get static addresses from DHCP bound to a mac address or
> dynamic ones.

More information about the omnisdev-en mailing list