Database Access Using The .NET Data Providers
Posted by: Radical Development,
on 28 Aug 2007 |
View original | Bookmarked: 0 time(s)
This post demonstrateshow to retrieve data from an Oracle and/or SQL Server 2000/2005 database using thedata providers that shipwith the .NET Framework as well as ODP.NET from Oracle.
SqlClient Data Provider to access SQL Server 2000/2005
using System;
using System.Data.SqlClient;
public class AdoSqlClient
{
public static void Main(string[] args)
{
string connectionString = "server=localhost;database=Northwind;uid=userid;pwd=password";
SqlConnection con = new SqlConnection(connectionString);
...