gethostbyname

  • Thread starter Thread starter rpv30
  • Start date Start date
R

rpv30

Hi

We have a Windows 2003 server where an application program gets the
host name using the gethostbyname() API. This was returning the FQDN in

all lowercase, but now it has started returning the hostname in all
uppercase. What could be the issue here? We are facing problems here
since we try to insert this data into a case sensitive DB.

The server is in a domain. It used to return server.domain.com but now
it returns SERVER.domain.com

Regards
Prasanna Venkatesh R
 
In
Hi

We have a Windows 2003 server where an application program gets the
host name using the gethostbyname() API. This was returning the FQDN
in

all lowercase, but now it has started returning the hostname in all
uppercase. What could be the issue here? We are facing problems here
since we try to insert this data into a case sensitive DB.

The server is in a domain. It used to return server.domain.com but now
it returns SERVER.domain.com

Regards
Prasanna Venkatesh R

Actually DNS is not case sensitive, but if the records were entered as
uppercase, then these queried records will return as uppercase. Check the
actual records. If the workstations' or servers' hostnames are uppercase,
they will register into DNS as such.

--
Ace
Innovative IT Concepts, Inc
Willow Grove, PA

This posting is provided "AS-IS" with no warranties or guarantees and
confers no rights.

Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP
Microsoft MVP - Directory Services
Microsoft Certified Trainer

Having difficulty reading or finding responses to your post?
Instead of the website you're using, I suggest to use OEx (Outlook Express
or any other newsreader), and configure a news account, pointing to
news.microsoft.com. This is a direct link to the Microsoft Public
Newsgroups. It is FREE and requires NO ISP's Usenet account. OEx allows you
to easily find, track threads, cross-post, sort by date, poster's name,
watched threads or subject.
It's easy:

How to Configure OEx for Internet News
http://support.microsoft.com/?id=171164

Infinite Diversities in Infinite Combinations
Assimilation Imminent. Resistance is Futile
"Very funny Scotty. Now, beam down my clothes."

The only constant in life is change...
 
If you need lowercase then call a routine to convert. This is available in
most all scripts and languages.

--
Paul Bergson MCT, MCSE, MCSA, Security+, CNE, CNA, CCA
http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup

This posting is provided "AS IS" with no warranties, and confers no rights.
 
You are looking at the wrong side of the problem here...

If your DB is case sensitive, the code inserting data should be doing
data validation before inserting the data, that is its jon. In this case
it would be a simple case of using a function to change the string to
lowercase...

As for why it is doing it, could be several reasons, a network trace may
help out and point you to where you need to start looking. But again, it
isn't up to the API to make sure the info comes back in the format you
require for your DB, it is up to the app to make sure it is formatted
properly. Not sure why you would require lowercase FQDNs in the DB
anyway since DNS isn't case sensitive.

joe

--
Joe Richards Microsoft MVP Windows Server Directory Services
Author of O'Reilly Active Directory Third Edition
www.joeware.net


---O'Reilly Active Directory Third Edition now available---

http://www.joeware.net/win/ad3e.htm
 
Back
Top