其实很简单。
可以用一下方法来实现的。
首先要建立村库表。
dim rs as new adodb.recordset,rs2 as new adodb.recordset,rs3 as new adodb.recordset
rs.open "select * from [入库表]",conn,1,3
while not rs.eof
rs2.open "select * from [出库表] where id=" &rs("脊耐id"),conn,1,3
if rs.recordcount=0 then
rs3.open "select * from [村库表] where id=" &rs("id"),conn,1,3
if rs3.recordcount<>晌如0 then
rs3.addnew
rs3("xxx1")=rs("xx1")
rs3("xxx2")=rs("xx2")
rs3("xxx3")=rs("xx3"樱谨春)
rs3("xxx4")=rs("xx4")
...
rs3.update
end if
rs3.close
end if
rs2.close
rs.movenext
wend
rs.close
1、首先用ado建立sql数据库碧手联培灶接。2、使用insert语句,对sql插入记录
3、使用select语句查询记录,并显示,可使用grid控件。
你可以按这个思路去充实具体步骤,但如果没点基础会挺麻烦。就算写给你悔中嫌程序,估计你也很难修改。
实在不行用控件,你可以去看看data控件与gird控件。但印象中是DAO联接方式。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)