简体   繁体   中英

How do I access a relational SQL database from C#?

First of all, I can do this in Java, using JDBC. What I'm looking for is the equivalent of JDBC for C#. It needs to access all types of databases. My searches have not revealed anything useful to me. EDIT: For now, I'm going to try ADO.NET

This is a very broad question but you'll probably want ADO.NET , that should get you started.

ADO.NET provides consistent access to data sources such as SQL Server and XML, and to data sources exposed through OLE DB and ODBC. Data-sharing consumer applications can use ADO.NET to connect to these data sources and retrieve, handle, and update the data that they contain.

ADO.Net is the .Net native equivalent for handling database access. MSDN link to ADO.Net

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM