⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tables_browse.aspx

📁 在线SQL数据库企业管理器在线SQL数据库企业管理器
💻 ASPX
字号:
<!--#include file="includes/topnav.aspx"-->
<%@ Import Namespace="System.Collections" %>

<%
	Dim X as Integer
		Dim First as Boolean
		Dim sqlstmt as String
	
		dr = d.getDataSPA("SP_Columns '" & request("table") & "'")
		Dim TypeTable as New Hashtable()
		While dr.read()
			TypeTable.Add(dr("Column_Name"), dr("Type_Name"))
		End While
		
		if request("sqlstmt") <> "" then
			sqlstmt = request("sqlstmt")
		elseif request("Table") <> "" then
			sqlstmt = "Select Top 1000 * from [" & request("table") & "]"
		end if
		


	%>
				<form action="tables_browse.aspx" method="post">
				<table cellpadding="3" cellspacing="0" width="100%">
					<tr><td class="WindowHeader">
						Query
					</td></tr>
					<tr><td class="TableHeader">
						<table width="100%">
						<tr><td>
							<img src="images/large_icons_query.gif" align="left">
						</td><td align="right">
							<input type="submit" value="Run Query">
						</td></tr>
						</table>
						
						<img src="images/spacer.gif" height="90" width="1" align="right">
						<img src="images/spacer.gif" height="90" width="1" align="left">
						<textarea style="width:100%; height:70;" name="sqlstmt"><%= sqlstmt %></textarea>
						
					</td></tr>
					</table>
				</form>
		
			
						
		
		
<%

	Try	
		if sqlstmt <> "" then	
		
				dr = d.getData(sqlstmt)
				
				With Response
					.write ("<table class=""TableStyle"" cellspacing=""0"" cellpadding=""3"">")
					
				
						First = True
						while dr.read()
							if First then
								.write ("<tr>")
									For X = 0 to dr.FieldCount - 1
										.write ("<td class=""TableHeader"">" & dr.GetName(X) & "</td>")
											
									Next	
								.write ("</tr>")
								First = False
							end if
							.write ("<tr>")
								For X = 0 to dr.FieldCount - 1
									if TypeTable(dr.GetName(x)) = "text" then
										.write ("<td valign=""top"" NOWRAP class=""TableGrid"">&lt; &nbsp; long text &nbsp; &gt;</td>")
									else	
										.write ("<td valign=""top"" NOWRAP class=""TableGrid"">" & Replace(dr.Item(x).ToString, "<",  "&lt;") & "&nbsp;</td>")
									end if	
								Next	
							.write ("</tr>")
						end while
						
						While dr.NextResult()
							First = True
							while dr.read()
								if First then
									.write ("<tr><td><br><br></td></tr>")
									.write ("<tr>")
										For X = 0 to dr.FieldCount - 1
											.write ("<td class=""TableHeader"">" & dr.GetName(X) & "</td>")
												
										Next	
									.write ("</tr>")
									First = False
								end if
								.write ("<tr>")
									For X = 0 to dr.FieldCount - 1
										if TypeTable(dr.GetName(x)) = "text" then
											.write ("<td valign=""top"" NOWRAP class=""TableGrid"">&lt; &nbsp; long text &nbsp; &gt;</td>")
										else	
											.write ("<td valign=""top"" NOWRAP class=""TableGrid"">" & Replace(dr.Item(x).ToString, "<",  "&lt;") & "&nbsp;</td>")
										end if	
									Next	
								.write ("</tr>")
							end while
						End While
					
					.write ("</table>")
				End With
			End if			
				
		Catch e as Exception
			Response.write ("<table width=""100%"">")
			Response.write ("<tr><td><br>")
			DisplayError (e)
			Response.write ("</td></tr>")
			Response.write ("</table>")
		Finally
		
			dr = nothing
			d = nothing
		
		End Try
		

%>


<!--#include file="includes/bottom.aspx"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -