dataGrid连接数据库的问题 ms-help://MS.NETFrameworkSDK.CHS/cpguidenf/html/cpconaccessingdatawithadonet.htm 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把dataGrid表格控件连到SQLConnection上 ????????????/没明白你的意思。用 DataGrid 显示数据:example:using System.Data.SqlClient;...SqlConnection conn = new SqlConnection("server=www;database=mySql;uid=xrascal;pwd=");string strSelect = "select * from table";SqlDataAdapter da = new SqlDataAdapter(strSelect,conn);DataSet ds = new DataSet();da.Fill(ds,"table");DataGrid1.DataSource = ds.Tables["table"];DataGrid1.DataBind(); 兄弟,我劝你多看看.net的帮助文件吧,基本上,没有比帮助更好的教材了。 去看帮助吧,设定DataGrid的DataSource属性就可以了(winform),调用大他DataBind()方法(webform)显示 我也不知道是不是由于我装了MSDN的事 不知道为什么学了.net这么久,书也看了不少,就是写不出程序来,不知道是不是对自己没信心,还是半路出家基础不够扎实。很担心。 VS.NET C# windows应用程序 执行代码很耗时问题 c# 类 默认构造函数 刷新页面的问题: [请教]怎样判断数据库的表中是否已经定义了主键? 来高手,类型“System.Windows.Window”在未被引用的程序集中定义 读取INI的问题,急!! 关于事件 水晶报表问题,高分相赠! 《Microsoft.NET程序设计技术内幕》这本书怎么样?? Visual C#在哪里声明全局变量 ProgressBar 问题
没明白你的意思。用 DataGrid 显示数据:
example:using System.Data.SqlClient;
...SqlConnection conn = new SqlConnection("server=www;database=mySql;uid=xrascal;pwd=");
string strSelect = "select * from table";
SqlDataAdapter da = new SqlDataAdapter(strSelect,conn);
DataSet ds = new DataSet();
da.Fill(ds,"table");
DataGrid1.DataSource = ds.Tables["table"];
DataGrid1.DataBind();
基本上,没有比帮助更好的教材了。