ASP做查詢分析器(Query Analyzer)(I)

來源:互聯網
上載者:User
查詢分析 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("sqlServer")

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 & ";Data 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



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.