zoukankan      html  css  js  c++  java
  • vs连接SQL server 的语句

            static public DataTable db()     

        {           

                DataTable dt = new DataTable();       

                string sql = "select [XX],[XXXX from [数据库名称].[dbo].[表名称] where 列名='列名中一项名称'";       

                SqlConnection conn = new SqlConnection( "server=.;database =数据库名称;integrated security=SSPI");     

                conn.Open();        

                SqlCommand cmd = new SqlCommand(sql,conn);   

                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);

                return dt;

            }

  • 相关阅读:
    hdu5249
    hdu5673-Robot
    hihoCoder 1033
    simpleOS 1.0
    hdu3511-Prison Break
    单调栈
    关于每次取PC的值为PC+4的问题
    hdu3652
    Linux MySQL5.7.18安装手册
    Linux MySQL5.6.36安装手册
  • 原文地址:https://www.cnblogs.com/zoushiyu/p/8482114.html
Copyright © 2011-2022 走看看