c入门代码(编辑修改稿)内容摘要:

N = Provider=。 DataSource=c:\。 string strSQL = SELECT * FROM employee。 OleDbConnection conn = new OleDbConnection(strDSN)。 OleDbDataAdapter cmd = new OleDbDataAdapter( strSQL, conn )。 ()。 DataSet ds = new DataSet()。 ( ds, employee )。 DataTable dt = [0]。 foreach( DataRow dr in ) { (First name: + dr[FirstName].ToString() + Last name: + dr[LastName].ToString())。 } ()。 } } 十三、读取表的属性: using System。 using。 using。 class TestADO { static void Main(string[] args) { string strDSN = Provider=。 DataSource=c:\。 string strSQL = SELECT * FROM employee。 OleDbConnection conn = new OleDbConnection(strDSN)。 OleDbDataAdapter cmd = new OleDbDataAdapter( strSQL, conn )。 ()。 DataSet ds = new DataSet()。 ( ds, employee )。 DataTable dt = [0]。 (Field Name DataType Unique AutoIncrement AllowNull)。 (==================================================================)。 foreach( DataColumn dc in ) { (+ , + + ,+ + ,++ ,+ )。 } ()。 } } 方面的 十四、一个 : %@ Page Language=C % script runat=server void Button1_Click(Object sender, EventArgs e) { =。 } /script html head /head body form runat=server p br / Enter your name: asp:TextBox id=TextBox1 runat=server/asp:TextBox /p p basp:Label id=Label1 runat=server Width=247px/asp:Label/b /p p asp:Button id=Button1 onclick=Button1_Click runat=server Text=Submit/asp:Button /p /form /body /html WinForm开发: 十五、一个简单的 WinForm程序: using System。 using。 using。 using。 using。 using。 public class SimpleForm : { private ponents = null。 private button1。 private textBox1。 public SimpleForm() { InitializeComponent()。 } protected override void Dispose( bool disposing ) { if( disposing ) { if (ponents != null) { ()。 } } ( disposing )。 } region Windows Form Designer generated code private void InitializeComponent() { = new ()。 = new (300,300)。 = Form1。 = new ()。 = new ()。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。