标签:pwd div http sys cst reading data ram 数据
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
namespace SQLHelper {
class Program {
static void Main(string[] args) {
string con;
//Window身份验证
//con = "Server=DESKTOP-SIKEISM\\SQLEXPRESS;Database=MusicStore;Trusted_Connection=SSPI";
//SQL Server身份验证
con = "Server=DESKTOP-SIKEISM\\SQLEXPRESS;Database=MusicStore;uid=sa;pwd=123456";
SqlConnection mycon = new SqlConnection(con);
try {
mycon.Open();
Console.WriteLine("Success!");
} catch (SqlException ex) {
Console.WriteLine("Fail!" + ex.Message);
}
}
}
}
标签:pwd div http sys cst reading data ram 数据
原文地址:http://www.cnblogs.com/xiejunzhao/p/50a21f1fc1d16156a1e45860ef3d96ce.html