[VB.NET]如何将Access数据库里的a表里的部分数据移到b表里

VB.NET源码-156个实用实例哦…… 如何将Access数据库里的a表里的部分数据移到b表里
这个是复制的,有没有直接移动不用在删除ZT_directory表里的数据
conn1.Open()
comm1.CommandText = insert into ZT_directory_History select * from ZT_directory where ID= & LabelID.Text
comm1.ExecuteNonQuery()
conn1.Close() 关闭连接
__________________________________________________________________________
还有2个表分别在2个数据库中,应该如何写
__________________________________________________________________________
comm1.CommandText = insert into ZT_directory_History select * from ZT_directory where ID= & LabelID.Text
直接再加一条语句
comm1.CommandText = insert into ZT_directory_History select * from ZT_directory where ID= & LabelID.Text & DELETE FROM ZT_directory where ID= & LabelID.Text
__________________________________________________________________________
两个数据库的话,可以在表名前面加数据库名,如: A库.table1
__________________________________________________________________________
comm1.CommandText = insert into ZT_directory_History select * from ZT_directory where ID= & LabelID.Text & DELETE FROM ZT_directory where ID= & LabelID.Text

没有反应呀
__________________________________________________________________________
dim asdf as string
你把第一个库里的数据提出来赋值给asdf,
再用asdf插入到第二个库里,
建立两个数据库连接
__________________________________________________________________________
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值