有些SQL文生成的记录集是不允许更新或增加记录的,如: Select * From ta,tb Where ta.code=tb.code And tb.Sex='M'你不妨贴出你的SQL文来看看。
同意moyaxu(星) rs.open strsql,strconn,1,3
这是我写的用rdo连的,希望对你有帮助 strsql = "select * from data_tab where zdate=" & "'" & Trim(Text1.Text) & "'" & " order by codenum" Set rst = cn.OpenResultset(strsql, rdOpenKeyset, rdConcurValues) Do While Not rst.EOF With mainview .AddNew !code = rst!codenum !wangno = rst!wangno !data = intw(rst!codenum, Trim(rst!statdata)) !Date = Trim(Text1.Text) .Update End With rst.MoveNext Loop
[email protected]
csdnhelp
Select * From ta,tb Where ta.code=tb.code And tb.Sex='M'你不妨贴出你的SQL文来看看。
rs.open strsql,strconn,1,3
strsql = "select * from data_tab where zdate=" & "'" & Trim(Text1.Text) & "'" & " order by codenum"
Set rst = cn.OpenResultset(strsql, rdOpenKeyset, rdConcurValues)
Do While Not rst.EOF
With mainview
.AddNew
!code = rst!codenum
!wangno = rst!wangno
!data = intw(rst!codenum, Trim(rst!statdata))
!Date = Trim(Text1.Text)
.Update
End With
rst.MoveNext
Loop