Re: Socket Error on Win2008 Enterprise & Windows Vista Enterprise

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Paul Thurston wrote:
> FreeTDS is unable to make socket connections on Win2008 Enterprise &
> Windows Vista Enterprise,
...
> log.c:190:Starting log file for FreeTDS 0.65
	(upgrade ....)
> net.c:210:Connecting to 10.10.33.71 port 1433 (TDS version 8.0)
> util.c:334:tdserror(009BBBC0, 00A87810, 20008, 0)
> dblib.c:7782:dbperror(00A87060, 20008, 0)
> dblib.c:7835:20008: "Unable to open socket"

Does telnet work?  I'll bet the operating system is denying access. 
Search the web for "vista permission socket open" and you'll find you have
company.  

Memo to file: When compiling for Win32, it would be nice to call
FormatMessage() to get something printable for the log.  Basically it
seems to mean replacing strerror(3) with 

	const char *sock_strerror(int err) {
#ifdef _WIN32 
	FormatMessage(...);
	/* ... */
#else
	return strerror(err);
#endif
	}

wherever Win32 sockets might be involved.  Sigh.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.