Click here to Skip to main content
Rate this: bad
good
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
Comments
ThePhantomUpvoter at 20-Apr-13 15:54pm
   
www.connectionstrings.com
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 Afzaal Ahmad Zeeshan 256
1 OriginalGriff 251
2 BillWoodruff 240
3 Maciej Los 230
4 Sergey Alexandrovich Kryukov 195
0 OriginalGriff 6,419
1 Sergey Alexandrovich Kryukov 6,008
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 4,070


Advertise | Privacy | Mobile
Web04 | 2.8.1411019.1 | Last Updated 20 Apr 2013
Copyright © CodeProject, 1999-2014
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