vb 修改数据库

  Dim rscode As New ADODB.Recordset

...................

 Set RsCode = zwpub.DataMdb.DbConnect.Execute("select Dend from code where ccode = N'" & curYHKM & "' and iyear=" & zwpub.QueryYear, dbOpenDynaset)

    RsCode.Open "select Dend from code where ccode = N'" & curYHKM & "' and iyear=" & zwpub.QueryYear, zwpub.DataMdb.DbConnect, adOpenDynamic, adLockOptimistic

在vb中应用execute打开数据表,通常不能修改 ,如修改,应该用open.

posted @ 2013-10-21 14:09  银杏叶儿  Views(337)  Comments(0Edit  收藏  举报