谁有用存储过程写的分页程序,并用c#调用那个存储过程的例子阿?麻烦给我一份,谢谢了。
解决方案 »
- C# 失去焦点问题
- winform 发布问题
- 散分+提问
- C#连连看怎么实现连线效果?
- c# 在WEB下如何,代码中如何知道是debug还是release
- webbroswer可以不可以自动调整大小?
- 求以下代码,每个一百分,收到开贴给分
- 请教各位高手,在ASP.NET能实现编程打印吗。
- VS.NET下怎样分发WEB应用程序?(急)
- DrawString(string s, Font font, Brush brush, float x, float y); 坐标单位是像素吗
- 冤枉啊! .InvalidPrinterException: 其他信息: 未安装打印机! 我有打印机啊! HP3528,
- .net 2.0Bate和 1.1的政则表达式有区别麽?
http://search.csdn.net/Expert/topic/1586/1586488.xml?temp=.8436396
http://www.phpe.net/print.php?aid=356
int pageSize = 5;string orderSQL = "SELECT * FROM Orders ORDER BY OrderID";
SqlDataAdapter myDA = new SqlDataAdapter(orderSQL, nwindConn);DataSet myDS = new DataSet();
myDA.Fill(myDS, currentIndex, pageSize, "Orders");
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpguide/html/cpconpagingthroughqueryresult.htm
(
@categoryId int,
@pageSize int,
@pageIndex int
)
AS
DECLARE @sql nvarchar(4000)SET @sql = 'select top '+cast(@pagesize as varchar(20))+' * from ProductInfo
where CategoryId= '+cast(@categoryId as varchar(20))+'
and ProductInfo.ProductId not in (select top '+cast((@pageSize*@pageindex) as varchar(20))
+ ' ProductID from ProductInfo where CategoryId ='
+cast(@categoryId as varchar(20))+'order by productId) order by productId'
EXEC sp_ExecuteSql @sqlGO