SQL Server:
1、使用Windows身份验证string sqlcon=@"Data Source=tanyixiu;Initial Catalog=Test;Integrated Security=True";
2、使用SQL Server身份验证
string sqlcon=@"Data Source=tanyixiu;Initial Catalog=Test;User ID=xiuxiu;Password=pwd";
Oracle:
string sqlcon=@"Data Source=TestDB;Persist Security Info=True;User ID=tanyixiu;Password=pwd;Unicode=True";