Query Analysis createtable.asp
<%@ LANGUAGE = VBScript%>
<%
Option Explicit
Response.Buffer = True
Response.ContentType = "text/html; Charset=iso-8859-1 "
'--------------------------------------------------------------
'---Declarations
'--------------------------------------------------------------
Dim intNumColumns, strTableName, Intcurrentcolumn, Inttablenum
Dim strtable, Booltableinfo,strsqlserver,strlog_in,struser_password
'--------------------------------------------------------------
'---initialization
'--------------------------------------------------------------
strtable = Request ("choosetable")
Booltableinfo = Request ("Booltableinfo")
Strsqlserver = Request ("SQL Server")
strlog_in = Request ("log_in")
Struser_password = Request ("User_password")
intNumColumns = Request ("Howmany")
strTableName = Request ("tablename")
Inttablenum = 1
'--------------------------------------------------------------
'---functions
'--------------------------------------------------------------
'--------------------------------------------------------------
Sub Outputtableheader ()
Response.Write ("<tr bgcolor=" "#ebf498" ">" & vbCrLf)
Response.Write ("<td><b>column name</b></td>" & vbCrLf)
Response.Write ("<td><b>data type</b></td>" & vbCrLf)
Response.Write ("<td><b>Size</b></td>" & VbCrLf)
Response.Write ("<td><b>Null?</b></td>" & VbCrLf)
Response.Write ("<td><b>Unique?</b></td>" & VbCrLf)
Response.Write ("<td><b>primary key</b></td>" & vbCrLf)
Response.Write ("</tr>" & VbCrLf & VbCrLf)
End Sub
'--------------------------------------------------------------
Sub Outputfieldrow (Strtablename,intfieldnum)
Response.Write ("<tr>" & VbCrLf)
Response.Write ("<td><input type=text name=colum" & Intfieldnum & "></td>" & VbCrLf)
Response.Write ("<td><select size=1 name=dtype" & Intfieldnum & ">" & vbCrLf)
If intfieldnum = 1 Then
Response.Write ("<option value=" "Int IDENTITY (1,1)" ">Identity</option>" & VbCrLf)
End If
Response.Write ("<option value=varchar>varchar</option>" & vbCrLf)
Response.Write ("<option value=text>text</option>" & vbCrLf)
Response.Write ("<option value=datetime>datetime</option>" & vbCrLf)
Response.Write ("<option value=money>money</option>" & vbCrLf)
Response.Write ("<option value=smallint>smallint</option>" & vbCrLf)
Response.Write ("<option value=int>int</option>" & vbCrLf)
Response.Write ("<option value=real>real</option>" & vbCrLf)
Response.Write ("<option value=float>float</option>" & vbCrLf)
Response.Write ("<option value=bit>bit</option>" & vbCrLf)
Response.Write ("<option value=varbinary>varbinary</option>" & vbCrLf)
Response.Write ("<option value=image>image</option>" & vbCrLf)
Response.Write ("</select></td>" & VbCrLf)
Response.Write ("<td><input type=text size=3 name=size" & Intfieldnum & "></td>" & VbCrLf)
Response.Write ("<td><select name=nullbox" & Intfieldnum & ">" & vbCrLf)
Response.Write ("<option value=" "Disallow NULL" ">not null</option>" & vbCrLf)