zoukankan      html  css  js  c++  java
  • DataSet数据筛选和排序

    Code

    //先创建数据适配器,

    SqlDataAdapter da=new SqlDataAdapter();

    da.SelectCommand=new SqlCommand(sql,conn);

    //创建和填充数据集

    DataSet ds=new DataSet();

    da.Fill(ds,"Customers");

    //每个查询返回一个数据集,每个结果都保存在单独的DataTable中.第一个显示地命名Customers,第二个表达默认名词为Customers1.

    //从数据集的Tables属性获得DataTables对象集合

    DataTableCollection dtc=ds.Tables;

     在显示第一个表时:

    string fl="country='Germany'";//sql where

    string srt="CompanyName desc";//sql desc

  • 相关阅读:
    IOS提交审核 错误Missing Push Notification Entitlement
    IOS提交审核 Missing Info.plist key问题
    【转载】cocos2dx 3.x 声音播放、音量调节
    【乐畅】工作积累 ---- 后台倒计时 ( 体力恢复功能 )
    【乐畅】工作积累 ---- 时间获取各个方法
    【乐畅】工作积累 ---- 设置一个弹窗的层
    【转载】【cocos2dx】特效收集
    【转载】cocos2dx 3.1获取系统当前时间
    【转载】cocos2d-x类型转换(CCstring int string char UTF-8互转)以及字符串详解
    【转载】Cocos2dx 小技巧(十四)ScrollView实现缩放效果
  • 原文地址:https://www.cnblogs.com/binlyzhuo/p/1338657.html
Copyright © 2011-2022 走看看