<%
' Define your SQL info here
STRSQLDSN = "xxxx"
Strsqlusername = "sa"
Strsqlpassword = ""
' This is where we connect to our SQL Server
Set adoconn = Server.CreateObject ("ADODB. Connection ")
ConnectionString = "dsn=" & Strsqldsn & "Uid=" & Strsqlusername & ";p wd=" & Strsqlpassword & ""
Adoconn.open ConnectionString
Set adors = Server.CreateObject ("ADODB. Recordset ")
' Now we'll just difine a couple things
Showblank = ""
Shownull = "-null-"
If request.querystring ("action") = "Del" Then
Delete_data
Else
If request.querystring ("table") <> "Then
' A table has been selected
Page_head
Display_table_names
If request.querystring ("msg") = "deleted" Then
Response.Write ("<p><br></p>")
Response.Write ("<font color=" "#FF0000" ><b> "successfully delete data </b></font>")
Else
Response.Write ("<p><br></p>")
End If
Display_table_info
Else
' No table has been selected.
Page_head
Display_table_names
End If
End If
Onchange= "" Top.location.href=this.options[this.selectedindex].value "" > "& vbCrLf)
Response.Write ("<option Selected value> Please select Table name to view .</option>" & vbCrLf)
strSQL = "SELECT name from sysobjects WHERE xtype = ' U ' and (not (id) = 133575514) Order
By name "
Set adors = Adoconn.execute (strSQL)
Do as not adors.eof
Response.Write "<option value=" "Index.asp?table=" & Adors ("name") & "" > "&
Cellpadding= "" 0 "" "& VbCrLf)
Response.Write ("cellspacing=" "0" "width=" "100%" ">" & vbCrLf)
Response.Write ("<tr>" & VbCrLf)
Response.Write ("<td></td>" & VbCrLf)
Response.Write ("</tr>" & VbCrLf)
Response.Write ("<tr>" & VbCrLf)
' This selects the table which we want to use.
Strsql= "SELECT * from" & Request.QueryString ("table") & ""
Set Adors=adoconn.execute (strSQL)
' Now lets start the table
Response.Write ("<table border=" "1" "><tr>" & VbCrLf)
' This'll find all of the fields in that table and write them out
For each fieldname in Adors.fields
Response.Write ("<td><b><font size=" "2" ">" & fieldname.name & "</font></B>< /TD> ")
NEXT ' fieldname
Response.Write ("<td><b><font size=" "2" "> Delete </font></B></TD>")
Response.Write ("</tr>" & VbCrLf)
Do UNTIL adors.eof
Response.Write ("<tr>")
For each fieldname in Adors.fields
Strfieldvalue=fieldname.value
Strfield=fieldname.name
IF IsNull (Strfieldvalue) THEN
Strfieldvalue=shownull
End IF
IF trim (strfieldvalue) = "" THEN
Strfieldvalue=showblank
End IF
IF Strfield = "id" OR Strfield = "id" THEN
Strrecordid = Strfieldvalue
End IF
Response.Write ("<td valign=top><font size=" "2" ">" & Strfieldvalue &
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.