你可以试一下这样子:
dim cn as new adodb.connection
dim rst as new adodb.recordset
cn.open "..."
rst.open "select * from 表名"private sub ButDel_click
rst.delete
end subprivate sub ButAdd_clickcn.execute"end sub新建存储过程:
代码如下:
declare @IntRecordCount bigint,@IntNum bigint
set @intnum=1
while @intrecordcount=0 or @intnum<3
begin
select @intrecordcount=count(*)from 表名 where 字段名=@intnum
set @intnum=@intnum+1
end
insert 表名 (字段)values(值名)
在值名中要输入@intnum,以便输入该表的主键
dim cn as new adodb.connection
dim rst as new adodb.recordset
cn.open "..."
rst.open "select * from 表名"private sub ButDel_click
rst.delete
end subprivate sub ButAdd_clickcn.execute"end sub新建存储过程:
代码如下:
declare @IntRecordCount bigint,@IntNum bigint
set @intnum=1
while @intrecordcount=0 or @intnum<3
begin
select @intrecordcount=count(*)from 表名 where 字段名=@intnum
set @intnum=@intnum+1
end
insert 表名 (字段)values(值名)
在值名中要输入@intnum,以便输入该表的主键
再执行添加操作时,先监测记录数,如果小于3个就去读你原来存的文件。
读出内容,自己加就可以。具体你可以发源代码给我:[email protected]