Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Data;
- using System.Data.SqlClient;
- using System.Data.Sql;
- namespace TestSql
- {
- class Program
- {
- static void Main(string[] args)
- {
- SqlConnection con = new SqlConnection(
- "Data Source=(local);Initial Catalog= Student;Integrated Security=SSPI");
- con.Open();
- // DataTable table = con.GetSchema("Databases");
- con.Close();
- // foreach (DataRow row in table.Rows)
- // {
- // Console.WriteLine("Database: " + row["database_name"]);
- //}
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment