this is my stored procedure
create table tbl_control (tbl_sqnc int , tbl_nm varchar(50))
And the proc code could be something like this.
create proc sp_del_tables @dbname varchar(30) , @owner varchar(30)
as
declare @tbl_nm varchar(50) , @sql varchar(200)
declare del_curs cursor for
select tbl_nm from tbl_control order by tbl_sqnc
open del_curs
fetch del_curs into @tbl_nm
while @@fetch_status = 0
begin
set @sql = 'truncate table '+@dbname+'.'+@owner+'.'+@tbl_nm
execute(@sql)
fetch del_curs into @tbl_nm
end
close del_curs
deallocate del_curs
I would like to access this via an asp page. by using a click of a button.
Can anyone help me thanks in advance.
create table tbl_control (tbl_sqnc int , tbl_nm varchar(50))
And the proc code could be something like this.
create proc sp_del_tables @dbname varchar(30) , @owner varchar(30)
as
declare @tbl_nm varchar(50) , @sql varchar(200)
declare del_curs cursor for
select tbl_nm from tbl_control order by tbl_sqnc
open del_curs
fetch del_curs into @tbl_nm
while @@fetch_status = 0
begin
set @sql = 'truncate table '+@dbname+'.'+@owner+'.'+@tbl_nm
execute(@sql)
fetch del_curs into @tbl_nm
end
close del_curs
deallocate del_curs
I would like to access this via an asp page. by using a click of a button.
Can anyone help me thanks in advance.