ADO.NET

ADO.NET Projects

ADO.NET Project 1

ADO.NET Examples

Examples

How To Build a connection string from component parameters and display It.
Previous Home Next
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SqlConnectionStringBuilder sub = new SqlConnectionStringBuilder();
sub.DataSource =@"\SQLEXPRESS";
sub.InitialCatalog = "newDatabase";
sub.IntegratedSecurity = true;
sub.MinPoolSize = 5;
sub.MinPoolSize = 15;
sub.LoadBalanceTimeout = 600;
sub.ConnectionReset = true;
Response.Write("" + sub.ConnectionString);   
}   
}

 

OutPut:

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: