Implement SQL Data Reader SQL Server

while I have been studying the core System.Data, I tried to read MSDN basic implementation code.

In the same way, I could call some low-level system dll (win32) to read the info hdd disk. I tried to test and learn from the SQL system data via the MSDN link above, since I am trying to break it, I could not find the entry point. my question is:

What is the minimum code required to connect to SQL SERVER and return some data?

* either with c# preferred , or c++(if noticeably less official)

Edit: using only some parts of From System.Data SqlDataReaderInstead of the whole class.

+4
source share
2 answers

System.Data.SqlClient (the .NET provider for SQL Server) is a low-level "DLL". It interacts with SQL Server using the low-level TDS protocol, similar to ODBC and OLEDB. The difference is that SqlClient is a managed provider, while ODBC drivers and OLEDB providers are proprietary (unmanaged). Unmanaged driver / providers provide a call level interface and a COM interface, respectively, which is intended to be used from native code, such as unmanaged C ++.

/ SQL Server TDS. TDS . System.Data.SqlClient.SqlDataReader - .NET.

+1

Source: https://habr.com/ru/post/1616436/


All Articles