2012年3月12日

随便:LINQ OVER DataSet和ADO.NET的简单例子

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;using System.Linq;using System.Data.Linq;namespace DataRelationExample{ //使用LINQ OVER DataSet和ADO.NET class Program { static void Main(string[] args) { SqlConnection thisCo 阅读全文

posted @ 2012-03-12 22:50 wengxiaoxi 阅读(115) 评论(0) 推荐(0)

2012年3月11日

解决VS2008智能提示是英文的问题

摘要: 在重新安装VS2008,打上VS2008 SP1补丁后,发现智能提示是英文,在网上找了很多,发现一条最有用,直接在下面的地址上下载一个补丁安装后就可以解决问题http://archive.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=KB957507&DownloadId=3931如果上面的地址不能下载,可以打开这个网站http://archive.msdn.microsoft.com/KB957507/Release/ProjectReleases.aspx?ReleaseId=1854下载VS90 阅读全文

posted @ 2012-03-11 00:54 wengxiaoxi 阅读(181) 评论(0) 推荐(0)

2012年3月10日

向DataTable添加一行,随笔

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;namespace FindDataRow{ class Program { static void Main(string[] args) { //创建数据库连接字符串 SqlConnection thisConnection = new SqlConnection(@"Data Source=WENGJIXI;" + 阅读全文

posted @ 2012-03-10 23:23 wengxiaoxi 阅读(374) 评论(0) 推荐(0)

无法打开用户默认数据库(用户 计算机名字\Administrator登录失败) 解决方法之一

摘要: 自己用VS2008创建一个控制台应用程序,然后用SqlConnection对象连接数据库时出现了:无法打开用户默认数据库(用户 计算机名字\Administrator登录失败)。我的连接数据库代码是这样子的: SqlConnection thisConnection = new SqlConnection(@"Data Source=.\SQLEXPRESS;" + @"AttachDbFilename='C:\Program Files\Microsoft SQL Server\MSSQL\Data\northwnd.mdf';" + 阅读全文

posted @ 2012-03-10 22:46 wengxiaoxi 阅读(1490) 评论(0) 推荐(0)

2012年3月8日

访问DataSet中的表、行、列

摘要: 访问表DataSet有一个Tables属性,它是DataSet中所有DataTable表的集合。Tables的类型是DataTableCollection。它有一个重载索引符,于是可以用两种方式来访问每个DataTable对象。按表名访问:thisDataSet.Tables["Customers"]按索引访问(索引是基于0的):thisDataSet.Tables[0],指定DataSet中的第一个Customers。下面说明怎样访问行DataTable中有一个Rows属性,它是DataRow对象的集合。它的类型是DataRowCollection,是一个有序列表,按行号 阅读全文

posted @ 2012-03-08 21:20 wengxiaoxi 阅读(313) 评论(0) 推荐(0)

导航