2013年9月10日

返回泛型集合的SqlDBHelper

摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using Entity; 6 using System.Diagnostics; 7 using System.Data.SqlClient; 8 using System.Data; 9 using System.Configuration;10 11 namespace DAL12 {13 public class SqlDBHelper14 {15 private ... 阅读全文

posted @ 2013-09-10 22:22 程序猴chengxuhou.com 阅读(785) 评论(0) 推荐(0) 编辑

SQL实现分页存储过程

摘要: SQL分页存储过程的编写: 1 --获得分页的DATASET资源 2 ALTER PROC sp_GetSource( 3 @PageSize INT, --每页显示条数 4 @PageIndex INT, --页码(从1开始) 5 @RowCount INT OUTPUT, --数据总数 6 @PageCount INT OUTPUT--总页数 7 ) 8 AS 9 BEGIN10 --获取数据总数11 SELECT @RowCount = COUNT(*)12 FROM [tblUser]13 --计算总页数14 SET... 阅读全文

posted @ 2013-09-10 22:19 程序猴chengxuhou.com 阅读(206) 评论(0) 推荐(0) 编辑

SQL模糊查找

摘要: 编辑器加载中.../*********************实现模糊查找**************************/SELECT [UserId] ,[UserName] ,[UserLoginName] ,[UserLoginPwd] ,[RoleId] FROM [DBDemo].[dbo].[tblUser]--****************[%]转义********************where username like '%[%]'SELECT [UserId] ,[UserName] ,[UserLo... 阅读全文

posted @ 2013-09-10 13:42 程序猴chengxuhou.com 阅读(289) 评论(0) 推荐(0) 编辑

导航