Click here to Skip to main content
11,805,266 members (50,831 online)
Rate this: bad
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 8:37am
ThePhantomUpvoter at 20-Apr-13 15:54pm
deesh chandravanshi at 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
0 OriginalGriff 315
1 Richard Deeming 200
2 Sergey Alexandrovich Kryukov 170
3 CPallini 160
4 CHill60 150
0 OriginalGriff 3,255
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web03 | 2.8.151002.1 | Last Updated 20 Apr 2013
Copyright © CodeProject, 1999-2015
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