大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 技术开发 -> NET专区 -> 简述DbDataAdapter.Update 方法(续)

简述DbDataAdapter.Update 方法(续)

时间: 2021-07-31 作者:daque

附 dbdataadapter.update本领的一切重载本子n overloads public function update(byval datarows() as datarow) as integern overrides overloads public function update(byval dataset as dataset) as integer implements idataadapter.updaten overloads public function update(byval datatable as datatable) as integern overloads protected overridable function update(byval datarows() as datarow,byval tablemapping as datatablemapping) as integern overloads public function update(byval dataset as dataset,byval srctable as string) as integer示例public function createcmdsandupdate(mydataset as dataset, myconnection as string, myselectquery as string, mytablename as string) as datasetdim myconn as new oledbconnection(myconnection) dim mydataadapter as new oledbdataadapter() mydataadapter.selectcommand = new oledbcommand(myselectquery, myconn) dim custcb as oledbcommandbuilder = new oledbcommandbuilder(mydataadapter) myconn.open() dim custds as dataset = new dataset mydataadapter.fill(custds) ' code to modify data in dataset here mydataadapter.update(custds) ' code to modify data in dataset here mydataadapter.update(custds, mytablename) ' insert new records from dataset dim mydatarowarray() as datarow = custds.tables(0).select(nothing, nothing, dataviewrowstate.added) mydataadapter.update(mydatarowarray) dim custdt as datatable = new datatable mydataadapter.fill(custdt) ' code to modify data in datatable here mydataadapter.update(custdt) myconn.close() return custdsend function 'selectoledbsrvrows附 dbdataadapter. fill本领的一切重载本子n overloads public function fill(byval datatable as datatable, byval adodbrecordset as object) as integern overloads public function fill(byval dataset as dataset,byval adodbrecordset as object,byval srctable as string) as integern overrides overloads public function fill(byval dataset as dataset) as integer implements idataadapter.filln overloads public function fill(byval datatable as datatable) as integern overloads public function fill(byval dataset as dataset,byval srctable as string) as integern overloads protected overridable function fill(byval datatable as datatable,byval datareader as idatareader) as integern overloads protected overridable function fill(byval datatable as datatable,byval command as idbcommand,byval behavior as commandbehavior ) as integern overloads public function fill(byval dataset as dataset,byval startrecord as integer,byval maxrecords as integer,byval srctable as string) as integern overloads protected overridable function fill(byval dataset as dataset, byval srctable as string,byval datareader as idatareader,byval startrecord as integer,byval maxrecords as integer) as integern overloads protected overridable function fill(byval dataset as dataset, byval startrecord as integer,byval maxrecords as integer,byval srctable as string,byval command as idbcommand,byval behavior as commandbehavior) as integer

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.