.Net Basic

This blogs gives introduction to C#.NET programming for beginners. This blogs assumes that you have no programming experience whatsoever. It's a lot easier than you think, and can be a very rewarding hobby!after Refer this blog

19 June 2008

Connection Strings for C#.net

Name Space For Oledb Connection

System.Data. SqlClient;

Connection strings

StrCon = “Data Source=myServerName;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;”

Name Space For Oledb Connection

Using System.Data.OleDb;

For Excel

StrCon="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="+AppDomain.CurrentDomain.BaseDirectory+ "DataBase Name; Password=;";

For MySql

StrCon="Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;"

For Oracle

StrCon="Provider=msdaora;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;"

For Oracle
StrCon="
Provider=msdaora;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;"

Labels: , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home