Depuis Octobre 2025, Microsoft ne prend plus en charge TLS 1.0 et 1.1, provoquant l'affichage d'un message d'erreur lors de la connexion aux bases Azure depuis des applications utilisant d'anciens drivers OLE DB SQL :
Login failed due to client TLS version being less than minimal TLS version allowed by the server.
Il est nécessaire d'adapter l'application pour que la chaine de connexion fasse référence à MSOLEDBSQL au lieu de SQLOLEDB :
Provider=MSOLEDBSQL;Server=NomServeur;Database=NomBase;UID=User;PWD=Password;Encrypt=yes
Exemple en C# :
using System;
using System.Data.OleDb;
class Program
{
static void Main()
{
// Utilisation de SQLOLEDB (ne supporte pas TLS 1.2) :
// Erreur : Login failed due to client TLS version being less than minimal TLS version allowed by the server.
// string connectionString = @"Provider=SQLOLEDB;Server=mlypy8bjsq.database.windows.net;Database=zmplukdtw2_I9AG1BEQTE;UID=zmplukdtw5_TEST;PWD=1234;Encrypt=yes;";
// Utilisation de MSOLEDBSQL pour supporter TLS 1.2 :
string connectionString = @"Provider=MSOLEDBSQL;Server=mlypy8bjsq.database.windows.net;Database=zmplukdtw2_I9AG1BEQTE;UID=zmplukdtw5_TEST;PWD=1234;Encrypt=yes;";
using (OleDbConnection connection = new OleDbConnection(connectionString))
{
try
{
connection.Open();
Console.WriteLine("Connexion réussie !");
}
catch (Exception ex)
{
Console.WriteLine("Erreur de connexion : " + ex.Message);
}
}
}
}
Important : Si nécessaire, Microsoft OLE DB Driver pour SQL Server (MSOLEDBSQL) est téléchargeable :
https://go.microsoft.com/fwlink/?linkid=2278907
Source :
Thierry
