📄 views_edit.aspx
字号:
<!--#include file="includes/topnav.aspx"-->
<%
' **************************************************************
if Request("Save") <> "" then
Dim con as SQLConnection = new SQLConnection(session("MyConString"))
Dim Command as SQLCommand = new SqlCommand()
Dim Trans as SqlTransaction
' Open the connection.
Con.Open()
' Assign the connection property.
Command.Connection = Con
' Begin the transaction.
Trans = Con.BeginTransaction()
' Assign transaction object for a pending local transaction
Command.Transaction = Trans
try
if request("view") <> "" then
Command.CommandText = "DROP VIEW " & request("View")
Command.ExecuteNonQuery()
end if
Command.CommandText = Request("ViewText")
Command.ExecuteNonQuery()
Trans.Commit()
catch e as Exception
DisplayError(e)
finally
Con.Close()
end try
response.redirect ("views.aspx")
end if
' **************************************************************
Dim viewText as String
if request("View") <> "" then
dr = d.GetDataSPA("sp_helptext """ & request("view") & """")
viewText = ""
while dr.read()
viewText = viewText & dr("text")
End While
else
viewText = "CREATE VIEW [VIEW NAME] AS"
end if
With Response
%>
<form action="views_edit.aspx" METHOD="POST">
<input type="hidden" name="save" value="true">
<input type="hidden" name="view" value="<%= Request("view") %>">
<Table cellspacing="0" class="TableStyle" width="100%">
<tr><Td class="Windowheader">
<% DrawTitle ("View Properties", "views.aspx") %>
</td></tr>
<tr><td class="TableHeader">
<table width="100%">
<tr><td style="padding: 10px;">
<img src="images/Large_Icons_Views.gif" align="left">
</td><td align="right" style="padding-right: 20px;">
<input type="submit" value="Save">
</td></tr>
<tr><td style="padding-left: 20px; padding-right: 20px;" colspan="2">
<textarea class="TableStyle" style="width: 100%;" rows="40" name="ViewText"><%= viewText %></textarea>
<br>
</td></tr>
</table>
</td></tr>
</table>
</form>
<%
End With
%>
<!--#include file="includes/bottom.aspx"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -