dim cn as new adodb.connection
dim cust as new adodb.recordset
cn.open"Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" + App.Path _
+ " \info1.mdb';Persist Security Info=False"
cust.open"select * from todaydata(数据库中的表名)", _ cn,adOpenKeyset,adLockOptimistic
Do While Not cust1.EOF And Not cust1.BOF
'每次检查扭矩值记录先做一次清空
cust1.Delete
cust1.Update
cust1.MoveNext
Loop
如果数据库中有很多的数据的时候,删除数据就非常的慢。我想大家一定有好的方法如:一次清空一个表中的内容。
dim cust as new adodb.recordset
cn.open"Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" + App.Path _
+ " \info1.mdb';Persist Security Info=False"
cust.open"select * from todaydata(数据库中的表名)", _ cn,adOpenKeyset,adLockOptimistic
Do While Not cust1.EOF And Not cust1.BOF
'每次检查扭矩值记录先做一次清空
cust1.Delete
cust1.Update
cust1.MoveNext
Loop
如果数据库中有很多的数据的时候,删除数据就非常的慢。我想大家一定有好的方法如:一次清空一个表中的内容。
cn.execute("delete * from 表名")
cn为ADODB.Connection对象
不 知道cn.execute("delete * from 表名")删除 的 速度快不 快呀
你好:
你能不能给我一个例子
先谢谢了
create table table_name( column1 datatype [not null] [not null primary key], column2 datatype [not null],...)
我用的是ACCESS数据库。