Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Data.SqlClient;
- namespace R903CadenaConexionBD
- {
- class R903Programa
- {
- static void Main(string[] args)
- {
- String cadenaConexion = @"Data source =.\SQLEXPRESS; Initial catalog = Northwind;Integrated Security=SSPI;" +
- "Min Pool Size= 5; Max Pool Size = 15; Connection Reset = True; Connection Lifetime = 600";
- SqlConnectionStringBuilder cadenaConexionBuilder = new SqlConnectionStringBuilder(cadenaConexion);
- Console.WriteLine("Parámetros de la cadena de conexión:");
- Console.WriteLine("\tFuente de datos: {0}", cadenaConexionBuilder.DataSource);
- Console.WriteLine("\tBase de datos: {0}", cadenaConexionBuilder.InitialCatalog);
- Console.WriteLine("\t¿Usa Integrated Security?: {0}", cadenaConexionBuilder.IntegratedSecurity);
- Console.WriteLine("\tTamaño mínimo del pool: {0}", cadenaConexionBuilder.MinPoolSize);
- Console.WriteLine("\tTamaño máximo del pool: {0}", cadenaConexionBuilder.MaxPoolSize);
- Console.WriteLine("\tTiempo de vida: {0}", cadenaConexionBuilder.LoadBalanceTimeout);
- Console.WriteLine("\nPresione Enter para continuar...");
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement