摘要: 解决办法: 原来是找到.mdf文件,右键->属性->安全->选择当前用户->编辑->完全控制。 如果还出现这种情况,记得把.log文件的安全权限也修改为完全控制,方法同上。 阅读全文
posted @ 2014-04-08 10:08 cbwbin 阅读(173) 评论(0) 推荐(0) 编辑
摘要: using System.Threading;//引入命名空间public partial class Form3 : Form { public Form3() { InitializeComponent(); } // 第一种方法: delegate void MyDel(int i);//此处... 阅读全文
posted @ 2012-07-20 15:12 cbwbin 阅读(2603) 评论(2) 推荐(2) 编辑
摘要: 完整的select语句及执行顺序(必须记住)5...select 5.2->distinct 7...top n [percent] 5.1->列名 聚合函数(1.2->列名或表达式)1...1.1->from 表名2...where 条件3...group by ... 4...having ..... 阅读全文
posted @ 2015-07-22 11:25 cbwbin 阅读(588) 评论(0) 推荐(0) 编辑
摘要: set identity_insert 表名 on --打开insert into 表名 (自动增长ID列,……) values (100,……)set identity_insert 表名 off --关闭例如:set identity_inserttblClass on --打开insert i... 阅读全文
posted @ 2015-07-22 10:00 cbwbin 阅读(873) 评论(0) 推荐(0) 编辑
摘要: protected void btnseach_Click(object sender, EventArgs e) { string name = this.name.Text.Trim(); string address = this.address.Text.Trim(); string gender = this.gender.Text.Trim(); string sql = "select * from UserInfo "; string wh = "where"; StringBuilder sb = new StringBuilder() 阅读全文
posted @ 2012-07-20 15:03 cbwbin 阅读(563) 评论(0) 推荐(0) 编辑
摘要: 此方法用于把对象序列化成Json格式的数据protected void Page_Load(object sender, EventArgs e) { string strcon = "Data Source=.;Initial Catalog=Test2;User ID=sa;pwd=sasa"; string sql = "select OperatorID,OperatorName from tblOperator"; DataTable dt = new DataTable(); using (SqlDataAdapter adapter = n 阅读全文
posted @ 2012-07-20 14:59 cbwbin 阅读(342) 评论(0) 推荐(0) 编辑
摘要: protected void saveimage_Click(object sender, EventArgs e) { #region 把图片以二进制的形式存入数据库 Stream imageStream; string path = fileupload.PostedFile.FileName;//文件名 int size = fileupload.PostedFile.ContentLength;//文件大小 string type = fileupload.PostedFile.ContentType;//文件类型 imageStream = fileupload.PostedFile 阅读全文
posted @ 2012-07-20 14:51 cbwbin 阅读(1125) 评论(0) 推荐(0) 编辑
摘要: 有关MD5:public string GetMD5(string pwd) { return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(pwd, "md5"); }传入一个字符串,返回一个加密后的字符字符串 阅读全文
posted @ 2012-07-20 14:48 cbwbin 阅读(132) 评论(0) 推荐(0) 编辑