ado相关.docVIP

  • 2
  • 0
  • 约4.7千字
  • 约 4页
  • 2017-04-05 发布于江苏
  • 举报
ado相关

数据库的查询: 常用方式是通过SqlDataAdapter进行查询,一个SqlDataAdapter对应一张表,方便以后对这张表的进行更新操作。例子: Protected _ds As DataSet 数据集,大实体,维护相关的一组小实体对应的表 Protected _daPlaceType As SqlDataAdapter 每个小实体和后台数据库联系的适配器 Dim dts As DataTable Try 取出地点类别表中的数据放入dts _strPlace = SELECT ID, PlaceType, CreatorID,Priority _strPlace = _strPlace FROM [ SystemContext.SystemContext.getInstance.GetProject.ProjectID _TPlaceType] _strPlace = _strPlace order by Priority asc _daPlaceType = New SqlDataAdapter(_strPlace, _context.getDTConnection()) _daPlaceType.Fill(_ds, TPlaceType) ‘将数据放入DataSet中的TPlaceType表中

文档评论(0)

1亿VIP精品文档

相关文档