zoukankan      html  css  js  c++  java
  • SqlDataAdapter.Fill

    SqlConnection con = new SqlConnection("server=904-8D01759C2C0//SQLEXPRESS;database=Study_NET;uid=sa;pwd=sasa");
    SqlConnection con = DB.createCon();
    con.Open();
    SqlDataAdapter sda = new SqlDataAdapter("select top 6 * from product", con);
    DataSet ds = new DataSet();
    sda.Fill(ds);
    this.Repeater1.DataSource = ds;

    this.Repeater1.DataBind();
    con.Close();


    SqlConnection con = new SqlConnection("server=904-8D01759C2C0//SQLEXPRESS;database=Study_NET;uid=sa;pwd=sasa");
    SqlConnection con = DB.createCon();
    con.Open();
    SqlDataAdapter sda = new SqlDataAdapter("select * from product", con);
    DataSet ds = new DataSet();
    sda.Fill(ds, "temptable");
    PagedDataSource pds = new PagedDataSource();
    pds.DataSource = ds.Tables["temptable"].DefaultView;或者pds.DataSource = ds;

  • 相关阅读:
    抽象类和构造方法
    JAVA System.arraycopy 和Arrays.copyof 效率比较
    直接插入排序
    StringBuffer
    JButton计数
    冒泡排序法
    JFrame背景
    JButton按钮
    Swing——JFrame
    JFrame面板
  • 原文地址:https://www.cnblogs.com/zongzhankui/p/5875396.html
Copyright © 2011-2022 走看看