一.//连接方式访问数据库的主要步骤(利用DataReader对象实现数据库连接模式) 1.创建连接对象(连接字符串) SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["XXX"].ConnectionString); 2.创建命令对象(设置Command对象的几个属性值) SqlCommand scmd = new SqlCommand(); scmd.CommandText
查看是否支持 SSL 首先在 MySQL 上执行如下命令, 查询是否 MySQL 支持 SSL: mysql> SHOW VARIABLES LIKE 'have_ssl'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | have_ssl | YES | +---------------+-------+ 1 row in set (0.02 sec) 当 have_ssl 为 YE
private void Button_Click_1(object sender, RoutedEventArgs e) { //非链接方式访问数据库, //1创建连接对象(连接字符串) using (SqlConnection conn = new SqlConnection(SQLHelper.ConnectionString)) { //2.创建数据适配器对象 using (SqlDataAdapter sda = new SqlDataAdapter("select * from St
示例:Jack 发送一封邮件给 Rose. public class SendMail { public static void main(String[] args) { boolean isSSL = true; String host = "smtp.163.com"; int port = 465; String from = "jack@163.com"; String