ASP do Query Analyzer (Queries Analyzer) (IV)

Source: Internet
Author: User
Tags datetime query
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)



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.