<%
If Request.ServerVariables( "REQUEST_METHOD" ) = "POST" Then
strSQL = "TRUNCATE TABLE " & request("table"

set objConn = server.createobject("adodb.connection"

objConn.Open Application("connectString"

objConn.execute(strSQL)
alertStr = request("table"

& " has been erased."
end if
%>
<script>
if ("<%=alertStr%>" != ""

{
alert ("<%=alertStr%>"

}
function verify(){
uSure= confirm("Are you sure that you want to remove all data from the table?"
if (uSure){
document.form1.submit()
}
}
</script>
<form name=form1>
<input name="table">
<input type=button value="Erase Table" onClick="verify()">
</form> -----------------------------------------------------------------
![[pc] [pc] [pc]](/data/assets/smilies/pc.gif)
Be nice. It's only doing what you tell it to do.
mikewolf@tst-us.com