Click here to Skip to main content
15,900,725 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
[no name] 20-Apr-13 15:54pm
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)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900