true;
else
return false;
}
</script>
<font color=red>表:<%=table_name%></font> <input type="button" value="刷新本页" onClick="javascript:location.reload()"><br><br>
<% if request("key") = "editfidlevi" then call editfidlevi() %>
<table width="600" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="125" height="20" align="center">字 段 名</td>
<td width="110" align="center">类 型</td>
<td width="83" align="center"> 设定大小</td>
<td width="48" align="center">允许空</td>
<td width="76" align="center">自动编号</td>
<td width="54" align="center">主键</td>
<td width="82" align="center">执行操作</td>
</tr>
<%
sql = "SELECT * FROM [" & table_name & "] "
Set rs = Conn.Execute(sql)
if err = 0 then
For i = 0 to rs.fields.count-1
%>
<tr>
<td height="20" align="left"><%=rs(i).name%></td>
<td align="left"><%=typ(rs(i).type)%></td>
<td align="center"><%=rs(i).definedsize%></td>
<td align="center"><%=iif((rs(i).Attributes and adFldIsNullable)=0,"No","Yes")%></td>
<td align="center"><%=iif(rs(i).Properties("ISAUTOINCREMENT") = True,"是","否")%></td>
<td align="center"><%=iif(rs(i).name = primarykey,"是","否")%></td>
<td align="center">
<a href="?key=editfidlevi&fidle=<%=rs(i).name%>&table_name=<%=table_name%>&fidletype=<%=typ(rs(i).type)%>">修改</a>
<a href="?key=sql&sql=alter table [<%=table_name%>] drop [<%=rs(i).name%>];" onClick="return table_delete();">删除</a>
</td>
</tr>
<%
editstr = editstr&"<option value=''"&rs(i).name&"''>"&rs(i).name&"</option>"
next
%>
</table>
<br>
<a href="?key=tosql&strt=0&table_name=<%=table_name%>">导出表结构</a>
<a href="?key=sql&sql=select * from <%=table_name%>&table_name=<%=table_name%>&primarykey=<%=primarykey%>">浏览表记录</a>
<a href="?key=sql&sql=DROP TABLE <%=table_name%>" onClick="return table_delete();">删除表</a>
<input type="text" name="newtablename" size="20" value="<%=table_name%>">
<input type="button" value="修改表名" onClick="location.href=''?key=reobj&obj=table&tablename=<%=table_name%>&newtablename=''+newtablename.value">
<br><br>
<%
''判断是否有主键
if primarykey = "" then
echo "<font color=red>该表没有主键,执行操作