added SQL Server compatibility.