Unable to connect to SQL Server 2008 using ODBC connection via system dsn on windows 2012

After turning on ODBC logging got the event message
A fatal error occurred while creating an SSL client credential. The internal error state is 10013.

this didnt lead me to the exact problem but did lead me to the fix from a similar error.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client\ Enabled needed to be flipped from 0 to 1


On Windows Server 2016 with SQL Server 2016, I disabled TLS 1.0 and 1.1 and got a problem with just one old site (other, newer websites on the server were working ok).

I tried updating the target build from 4.0 to 4.7 but that didn't fix it.

The problem was some really old code that called the database using OleDbDataReader, I upgraded it to use SqlDataReader and that did the trick.

Didn't find this anywhere else, so thought a post here might help someone else in the future...