ASP Query Analyzer (I)

Source: Internet
Author: User
Tags query table name trim
Query Analysis Sqlultimate.asp--part A

<%@ LANGUAGE = VBScript%>
<%
Option Explicit
Response.Buffer = True
Session.Timeout = 1
Response.ContentType = "text/html; Charset=iso-8859-1 "

'--------------------------------------------------------------
'---Declarations
'--------------------------------------------------------------

Dim Strquerytype
Dim Strclip ' String to display workspace
Dim strDB ' String to display relative database path
Dim strtable ' String to hold the table name
Dim Numtablevalue
Dim strDbName
Dim Strdbpath
Dim strconnect
Dim strSQL
Dim Booltableinfo
Dim strserver
Dim strUserID
Dim strpassword
Dim Count
Dim Intspacer
Dim stridentity
Dim strquery
Dim Strload
Dim strcreate
Dim strTableName
Dim Strqoption,strqoption1,strqoption2,strqoption3

'--------------------------------------------------------------
'---initialization
'--------------------------------------------------------------

strtable = Request ("schema")

Strclip = Trim (Request.Form ("Strclip"))

If request ("selectdb") = "Select DB" Then
strSQL = ""
Else
strSQL = Trim (Request.Form ("strSQL"))
strSQL = replace (Strsql,vbcrlf, "")
Strclip = Trim (Request ("Strclip")) ' Get Workspace values from form
End If

Strload = Request ("Load")

If request ("submitquery") = "Submit Query" Then
strSQL = Trim (Request ("strSQL"))
strSQL = replace (Strsql,vbcrlf, "")
Strclip = Trim (Request ("Strclip")) ' Get Workspace values from form
ElseIf strload = "Load" Then
strSQL = Request ("Strsqlload")
strSQL = replace (Strsql,vbcrlf, "")
End If

strserver = Request ("SQL Server")

strUserID = Request ("log_in")

strpassword = Request ("User_password")

strDB = Request ("choosetable")

If request ("tableinfo") = "Table Info" Then
Booltableinfo = "True"
ElseIf request ("savemyquery") = "Save" Then
Booltableinfo = Request ("Booltableinfo")
ElseIf request ("createsqlstatement") = "Create" Then
Booltableinfo = Request ("Booltableinfo")
ElseIf request ("load") = "Load" Then
Booltableinfo = Request ("Booltableinfo")
ElseIf request ("createtable") = "CreateTable" Then
Booltableinfo = Request ("Booltableinfo")
End If

StrConnect = "Provider=SQLOLEDB.1; Password= "& Strpassword &"; User id= "& strUserID &"; Initial catalog= "& strDB &";D ata source= "& Strserver &";

stridentity = Request.Cookies (strDB & "Strcookieidentity")

strquery = Request ("Savequery")

Strcreate = Request ("SqlType")

strTableName = Request ("strTableName")


Strqoption = ""
StrQOption1 = ""
StrQOption2 = ""
StrQOption3 = ""

If request ("sqltype") = "" Then
Strqoption = "Selected"
ElseIf request ("sqltype") = "Select" Then
StrQOption1 = "Selected"
ElseIf request ("sqltype") = "Insert" Then



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.