<% '============================================================== ' TableEditoR 0.81 Beta ' http://www.2enetworx.com/dev/projects/tableeditor.asp '-------------------------------------------------------------- ' File: te_tablecreate.asp ' Description: Creates a new table ' Initiated By Hakan Eskici on Nov 17, 2000 '-------------------------------------------------------------- ' Copyright (c) 2002, 2eNetWorX/dev. ' ' TableEditoR is distributed with General Public License. ' Any derivatives of this software must remain OpenSource and ' must be distributed at no charge. ' (See license.txt for additional information) ' ' See Credits.txt for the list of contributors. ' ' Change Log: '-------------------------------------------------------------- ' # May 30, 2002 by Rami Kattan ' Security check if user can add tables '============================================================== %> <% sub ShowForm %>
Home » Connections » "><%=arrDesc(request("cid"))%> » Create Table <% if bProtected then response.write session("teFullName") response.write " (logout)" end if %>

<% if bTableAdd then %>

Enter the table name.

<%=sErr%>

Table Name
<% else response.write "

You have no permission to add tables.

" end if %> <% end sub lConnID = request("cid") sTableName = request("txtTableName") on error resume next if request("cmdCreate") <> "" and bTableAdd then OpenRS arrConn(lConnID) if sTableName = "" then sErr = "Error :
Please specify a table name." ShowForm response.end end if sSQL = "CREATE TABLE [" & sTableName & "]" conn.execute sSQL if err <> 0 then sErr = "Error :
" & err.description bErr = True if te_debug then sErr = sErr & "
" & sSQL conn.close set conn=nothing set rs=nothing ShowForm else conn.close set conn=nothing set rs=nothing response.redirect "te_fieldedit.asp?cid=" & lConnID & "&tablename=" & sTableName end if else ShowForm end if %>