摘要:SQLHelper.csusing System;using System.Data;using System.Configuration;using System.Data.SqlClient;namespace DAL{ public class SQLHelper { ...
阅读全文
摘要:数据库备份还原类:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;//应用相应的命名空间using System.Window...
阅读全文
摘要:/// /// Execute a SqlCommand that returns a resultset against the database specified in the connection string /// using the pr...
阅读全文
摘要:http://www.cnblogs.com/yc-755909659/p/3445278.html首先观察,aspnet_regiis.exe文件是不是损坏的,如果是,重新下载,覆盖即可,在百度云的Asp.net_regiis.exe文件夹下面下载。
阅读全文
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 //添加命名空间 8 using S...
阅读全文
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 //添加命名空间 8 using S...
阅读全文
摘要:转载自:http://www.cnblogs.com/kissdodog/archive/2013/02/21/2919886.html
阅读全文
摘要:转载自:http://blog.csdn.net/yexuanbaby/article/details/9029605
阅读全文
摘要:转载自:http://www.cnblogs.com/blueskybcl/archive/2010/06/03/1750421.html
阅读全文
摘要:一:可以直接编写:无验证:string connectionString = "data source = (local); database = TEMP; integrated security = true";使用验证:Data Source = myServerAddress;Initial...
阅读全文
摘要:转载自:http://www.cnblogs.com/SkySoot/archive/2012/03/12/2391704.html运行效果:代码: 1 /// 2 /// 文件读写操作 3 /// 为简化代码供大家学习,暂不考虑捕捉异常 4 /// 5 public partial ...
阅读全文
摘要:转载自:http://blog.sina.com.cn/s/blog_4b3485000100prhl.html代码: 1 using System; 2 using System.Collections.Generic; 3 using System.Text; 4 using System.Da...
阅读全文
摘要:链接:http://blog.csdn.net/starfd/article/details/44157633
阅读全文
摘要:1 /// 2 /// 截断字符串 3 /// 4 /// 要截断的字符串 5 /// 要保留的字符长度 6 /// 截断后的字符串 7 public static string F...
阅读全文
摘要:声明 静态类和非静态类1.非静态类中:既可以定义静态字段、静态属性、静态方法,也可以定义非静态(实例成员)字段、非静态(实例成员)属性、非静态(实例成员)方法、 1 using System; 2 using System.Collections.Generic; 3 using System.Li...
阅读全文
摘要:没有对sqlcommand对象的commandtext属性赋值说白了就是没写SQL语句 -.-无语死了。
阅读全文
摘要:界面:代码(账户:100001 密码:200002): 1 /// 2 /// 登陆事件 3 /// 4 private void btn_OK_Click(object sender, EventArgs e) 5 ...
阅读全文
摘要:转载自:http://www.cnblogs.com/fly_dragon/archive/2010/09/03/1817252.html 1 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs ...
阅读全文
摘要:代码片段: a)声明实例 1.声明SQLCommand实例。1 SqlCommand cmd = new SqlCommand(); 2.声明SqlDataAdapter实例。1 SqlDataAdapter sdr = new SqlDat...
阅读全文
摘要:本文转自:http://www.cnblogs.com/lhking/archive/2009/06/08/1499002.html提供把Excel里的数据导入到SQL Server 数据库,前提是Excel里的字段在Sql Server表里都有,不然会出现错误。注释很详细哦!要引用的命名空间是:u...
阅读全文