| 发表于:2007-02-06 18:55:17 楼主 |
dim strcon as string strcon = "provider=microsoft.jet.oledb.4.0;data source= " + my.computer.filesystem.currentdirectory + "\config.mdb " dim mycon as new data.oledb.oledbconnection(strcon) mycon.open() mycom.connection = mycon dim cmd as new oledb.oledbcommand dim strsql as string strsql = "select * from 表1 " adpt = new oledb.oledbdataadapter(strsql, mycon) dim mytable1 as datatable adpt.fill(mydataset, "table ") mytable1 = mydataset.tables( "table ") datagridview1.datasource = mytable1 以上代码是把数据绑定到datagridview1上,请问如何把程序运行过程中datagridview1上更改的数据同步更新到数据库 "表1 "中呢???vb2005.请高手指点谢谢!!! |
|
|
|
|