Search code examples
c#sqldatabaserdbms

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


Solution

  • 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.