本人用c#写了一款应用程序,原本数据库用的是sqlserver2008r2,在各环境中运行均正常。但最近在某环境部署了一套,由于没有2008安装包安装了2012版本。发现在win7环境中能正常访问。xp环境下无法访问报错如下图

xp最高支持tls1.0,可能2012放弃了tls1.0的支持,具体参考下这个下面的,链接里面是2014 express,问题和你的一样
Just a couple of notes:
- A year ago, Summer of 2018, PCI compliance pulled most of the world into running our servers to only do TLS 1.2-only. XP itself is only capable of TLS 1.0. You are years out of compliance and support. I'm sure you know that.
- There is plenty of documentation on what to do for TLS 1.2 support and which versions of the operating system (Service Packs) or SQL (Cumulative Updates) you need to get to. You probably want to sift through those details to understand where you environment is versus the latest information. Especially if you have applied any updates. My thinking here, is that if you have done updates, with the thought of that you are only doing TLS 1.0, this update activity may have brought you to a point with SQL or service packs that disabled support for TLS 1.0 or actually wrote it out of existence in ODBC or SQL.
- There is an ODBC driver that Microsoft had deprecated and retired but for TLS 1.2 resurrected. I don't think that applies to you, but again if windows/Sql updates have been applied, you may now have that. I'm failing to find the page on that. We had to change driver names, install a KB on SQL 2008 R2 and do some work on our legacy classic asp applications.
题主还是老实找2008 r2数据库来安装了如果一定坚持兼容xp系统。。
有帮助或启发麻烦点个采纳【本回答右上角】,谢谢~~