32-bit ODBC32 system DSN on Windows 10 apparently not able to access network

0

I have an application which runs correctly on most of my machines here.

Two of them stopped working for no reason that I could fathom (same updates as all the others, same network settings, same hardware...).

The problem is that the data source connection fails. The server is a MySQL server elsewhere. At the start I thought it was a DNS (that's DNS, not DSN) problem because the error said it couldn't find my.server.com.

The strange thing is that from %SYSROOT%/SysWOW64/ODBCAD32.exe the MyODBC connector data source is listed and the system DSN with the correct name is there (same as the other computers). And it works, on the same PC where the app doesn't. It finds the databases, allows choosing the correct one - everything.

To rule out DNS, I replaced the name with the correct IP address; the DNS query no longer happened, but I got a different error immediately afterwards - Winsock error 10022, invalid socket. Which tells me that the DNS error was probably due to the fact that the app couldn't connect to the DNS server socket.

So I guessed it was the firewall somehow. I tried disabling it both from GUI and from command line (netsh advfirewall all profiles off), to no avail. Tried logging on the pfw debug log, nothing there (the connection doesn't even start). There is no traffic to MySQL TCP port 3306 whatsoever - it gets stopped first.

There are no antiviruses installed on that computer, and it has all the updates (same as all other PCs).

Extensive googling turned out nothing - the app is on UNC share (same as the other machines, where it works), but even if I copy it to the local drive, on these two it still doesn't work.

Whatever could be the matter?

LSerni

Posted 2018-05-15T09:36:41.903

Reputation: 7 306

Answers

0

It turns out that I thought I had checked this, but my test was flawed.

I had found early in my googling that

If the application using ODBC32 resides on a network drive,
and the user has no write access to the root of that drive,
then ODBC cannot establish a network connection.

(Worth 1500 WTF points)

So I had copied the app and whatever on the desktop. And it still did not work.

What I had forgotten - not having paid attention at the time - was that these two PCs have their user profiles on a remote server.

Guess what. The root of the server wasn't writeable.

And this, of course1, prevented ODBC from establishing a network connection.


(1) "of course", in a world where a MIDI file won't open due to an error, which gets cleared by opening Microsoft Word. It happened to me almost twenty years ago; I still hope to be able to forget it some day.

LSerni

Posted 2018-05-15T09:36:41.903

Reputation: 7 306