Homepage for client programming to Microsoft SQL Server
Article
Welcome to our homepage about client programming to interact with Microsoft SQL Server, and with Azure SQL Database in the cloud. This article provides the following information:
Lists and describes the available language and driver combinations.
Information is given for the operating systems of Linux (Ubuntu and others), macOS, and Windows.
Provides links to the detailed documentation for each combination.
Displays the areas and subareas of the hierarchical documentation for certain languages, where appropriate.
Azure SQL Database
In any given language, the code that connects to SQL Server is almost identical to the code for connecting to Azure SQL Database.
For details about the connection strings for connecting to Azure SQL Database, see:
Other Azure SQL Database articles that are nearby the preceding article in the table of contents, about other languages. For instance, see Use PHP to query an Azure SQL database.
Languages and drivers for client programs
In the following table, each language image is a link to detail about using the language with SQL Server. Each link jumps to a later section in this article.
Downloads and installs
The following article is devoted to the download and install various SQL connection drivers, for use by programming languages:
The .NET managed languages, such as C# and Visual Basic, are the most common users of ADO.NET. ADO.NET is a casual name for a subset of .NET Framework classes.
The set of classes used for Microsoft .NET Data Provider for SQL Server
C# using Entity Framework
Entity Framework (EF) provides Object-Relational Mapping (ORM). ORM makes it easier for your Object-Oriented Programming (OOP) source code to manipulate data that was retrieved from a relational SQL database.
EF has direct or indirect relationships with the following technologies:
Entity Framework is an object-relational mapper (O/RM) that enables .NET developers to work with a database using .NET objects. It eliminates the need for most of the data-access source code that developers usually need to write.
Entity Framework is a name shared by two separate source code branches. One EF branch is older, and its source code can now be maintained by the public. The other EF is new. The two EFs are described next:
Microsoft first released EF in August 2008. In March 2015, Microsoft announced that EF 6.x was the final version that Microsoft would develop. Microsoft released the source code into the public domain.
Initially EF was part of .NET Framework. But EF 6.x was removed from .NET Framework.
Microsoft released the newly developed EF Core in June 2016. EF Core is designed for better flexibility and portability. EF Core can run on operating systems beyond just Microsoft Windows. And EF Core can interact with databases beyond just Microsoft SQL Server and other relational databases.
EF and related technologies are powerful, and are a lot to learn for the developer who wants to master the entire area.
Java and JDBC
Microsoft provides a Java Database Connectivity (JDBC) driver for use with SQL Server (or with Azure SQL Database). It is a Type 4 JDBC driver, and it provides database connectivity through the standard JDBC application program interfaces (APIs).
Configuration information, along with code examples.
Node.js
With Node.js you can connect to SQL Server from Windows, Linux, or macOS. The root of our Node.js documentation is here.
The Node.js connection driver for SQL Server is implemented in JavaScript. The driver uses the TDS protocol, which is supported by all modern versions of SQL Server. The driver is an open-source project, available on GitHub.
Open database connectivity (ODBC) was developed in the 1990s, and it predates .NET Framework. ODBC is designed to be independent of any particular database system, and independent of operating system.
Over the years numerous ODBC drivers have been created and released by groups within and outside of Microsoft. The range of drivers involve several client programming languages. The list of data targets goes well beyond SQL Server.
Some other connectivity drivers use ODBC internally.
The ODBC content in this section focuses on accessing either SQL Server or Azure SQL Database, from C++. The following table lists an approximate outline of the major documentation for ODBC.
Microsoft doesn't maintain or test the pymssql driver.
The pymssql connection driver is a simple interface to SQL databases, for use in Python programs. Pymssql builds on top of FreeTDS to provide a Python DB-API (PEP-249) interface to Microsoft SQL Server.
The pyodbc connection driver is an open-source Python module that makes accessing ODBC databases simple. It implements the DB API 2.0 specification, but is packed with even more Pythonic convenience.
Ruby
You can use Ruby to interact with SQL Server. The root of our Ruby documentation is here.
This section provides links about other development options. These include using these same languages for Azure development in general. The information goes beyond targeting just Azure SQL Database and Microsoft SQL Server.
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.