易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net (c#) MySQL 大数据快速分页

aspx页:
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" CssClass="b">
<asp:ListItem Value="5">5 per page</asp:ListItem>
<asp:ListItem Selected="True" Value="10">10 per page</asp:ListItem>
<asp:ListItem Value="50">50 per page</asp:ListItem>
</asp:DropDownList> --每页显示条数
<asp:Label ID="lbpageof" runat="server"></asp:Label> --显示方式
<asp:LinkButton ID="lbpre" runat="server" CommandArgument="prev" OnClick="PagerButtonClick">Previous</asp:LinkButton> --前一页
<asp:LinkButton ID="lbnext" runat="server" CommandArgument="next" OnClick="PagerButtonClick">Next</asp:LinkButton> --后一页
<asp:LinkButton ID="lbpre2" runat="server" CommandArgument="prev" OnClick="PagerButtonClick">Previous</asp:LinkButton> --前一页2
<asp:LinkButton ID="lbnext2" runat="server" CommandArgument="next" OnClick="PagerButtonClick">Next</asp:LinkButton> --后一页2
<input id="hid_CurrentIndex"
runat="server" type="hidden" /> --索引数
cs:
hid_CurrentIndex.Value = "0"; 初始化为0
首先给出_sqlStr(sql语句)
DataSet ds;
通过程序得到一个(ds)Dataset
ds = _db.GetDataSet(_sqlStr + " limit " + (Convert.ToInt64(hid_CurrentIndex.Value) * Convert.ToInt64(DropDownList1.SelectedValue)) + "," +
DropDownList1.SelectedValue); --DropDownList1.SelectedValue1的值为每页显示条数
GridView1.PageSize = 10;
GridView1.DataSource = ds.Tables[0].DefaultView;
GridView1.DataBind();
linkbttonenableset();
private void linkbttonenableset()
{
try
{

double dblTotalRecords = Convert.ToDouble(取得总的记录行数单独写个sql_count);


相关文档:

MySQL中常用的修改表的命令

MySQL中常用的修改表的命令
关键字: mysql, 修改表, 命令
    在数据库操作中,个人觉得使用得最多的就是查询,然后就是对表的修改操作了,尤其是当数据库的设计工作没有做好时.下面就MySQL中一些常用的修改表的操作进行总结:
    为了方便后面的说明,先创建一个表,创建语句如下:
Create ......

asp.net链接Access数据库字符串正确方法

在web  config中  作如下配置:
<connectionStrings>
    <add name="ydycon" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=|DataDirectory|ydy.mdb" providerName="System.Data.OleDb"/>
 
  </connectionStrings>
在.net文件中应用链接 ......

JAVA连接ACCESS,SQL Server,MySQL,Oracle

import java.sql.*;
/*
* JAVA连接ACCESS,SQL Server,MySQL,Oracle数据库
*
* */
public class JDBC {
  
public static void main(String[] args)throws Exception {
  
   Connection conn=null;
  
       //====连接ACCESS数据库 ......

C#与Sqlite数据库操作实例

这是一个有关分页的实例,仅供参考(代码来自网络)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SQLite;
using System.Threading;
using System.Collections;
us ......

mysql 分组汇总

 1.创建表:
    create table groupTable(dept varchar(6),phone varchar(20),amount int);
 2.插入测试数据:
    insert groupTable
    select '营业部',8001,20 union all
    select '营业部',8002,30 union all
    se ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号