甜思思 发表于 2015-7-1 16:27:50

b/s版的sql server查询分析器[susue提供]

  应朋友susue要求,将其刚入门的新作发布,也供大家分享一下~顺便希望大家能给个意见~谢谢~运行效果如下图:

  
  要有.net框架才能用

很肤浅,不到50行代码



  
string strConnection; //连接sql server的字符串
SqlCommand objCommand;//sql语句
void btnSelect_OnClick(object sender,EventArgs e)
{
strConnection = "server='" + tbxServer.Text + "';uid='" + tbxUid.Text + "';pwd='" + tbxPwd.Text + "';database='" + tbxDatabase.Text + "'";
SqlConnection objConnection=new SqlConnection(strConnection);
objCommand = new SqlCommand(tbxSql.Text,objConnection);
objConnection.Open();
dgrdMain.DataSource = objCommand.ExecuteReader();
//dgrdMain就是下面的DATAGRID的ID
dgrdMain.DataBind();
objConnection.Close();
}

  

B/S版的Sql Server查询分析器 By Susue 2005-2-26



B/S版的Sql Server查询分析器 By Susue 2005-2-26







  



  





B/S版的Sql Server查询分析器 By Susue 2005-2-26




http://www.chinaaspx.com/comm/dotnetbbs/Showtopic.aspx?Forum_ID=5&Id=117612&PPage=1
页: [1]
查看完整版本: b/s版的sql server查询分析器[susue提供]