Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: .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
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 390
1 Maciej Los 205
2 Peter Leow 140
3 Suvendu Shekhar Giri 134
4 Abhinav S 126
0 Sergey Alexandrovich Kryukov 9,623
1 OriginalGriff 8,895
2 Peter Leow 5,044
3 Kornfeld Eliyahu Peter 3,333
4 Maciej Los 2,561

Advertise | Privacy | Mobile
Web04 | 2.8.150327.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