Click here to Skip to main content
12,068,141 members (38,874 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: .NET .NET4.5
hello i have to connect sql server from .net using c# and this connection should be oledb type i have done it with sqlclient but now i want the same result from oledb connection so can anybody please send me proper code for the same this code can do in sqlclient ..... i want answer for oledb connection

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
 
/// <summary>
/// Summary description for Class1
/// </summary>
public class Class1
{
    public SqlConnection con;
	public Class1()
	{
        con = new SqlConnection("data source=DEESH-PC\\SQLEXPRESS; database=tcs_db; integrated security=true");
		//
		// TODO: Add constructor logic here
		//
	}
}
Posted 20-Apr-13 9:37am
Comments
ThePhantomUpvoter 20-Apr-13 15:54pm
   
www.connectionstrings.com
deesh chandravanshi 21-Apr-13 4:31am
   
sorry sir i have try this before and found it was not helpful for me coz i am just a beginner in this language so .....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web03 | 2.8.160208.1 | Last Updated 20 Apr 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100