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

📄 storedprocedure_edit.aspx

📁 在线SQL数据库企业管理器在线SQL数据库企业管理器
💻 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
	      
	      ' Insert the first record.
	    
	    
	    	if request("SP") <> "" then
		      Command.CommandText = "DROP Procedure " & request("SP")
		      Command.ExecuteNonQuery()
		   end if
		   
		  ' Response.write (Request("SPText"))
		  ' Response.end
		    
	    	Command.CommandText = Request("SPText")
	      Command.ExecuteNonQuery()
	      
	    	Trans.Commit()
	      
	    catch e as Exception
	      
	      DisplayError(e)
	      
	      
	    finally
	      	Con.Close()
	      	
	    end try
	    
	    response.redirect ("StoredProcedures.aspx")
end if
	
' **************************************************************	
	
			Dim SPText as String
			if request("SP") <> "" then
				dr = d.GetDataSPA("sp_helptext """ & request("SP") & """")
				
				SPText = ""
				while dr.read()
					SPText = SPText & dr("text")
				End While	
			else
				SPText = "CREATE PROCEDURE [OWNER].[PROCEDURE NAME] AS"
				
			
			end if
		
	With Response
	%>
	
	
	<form action="StoredProcedure_edit.aspx" METHOD="POST">
		<input type="hidden" name="save" value="true">
		<input type="hidden" name="SP" value="<%= Request("SP") %>">
		
		<Table cellspacing="0" class="TableStyle" width="100%">
		<tr><Td class="Windowheader">
			<% DrawTitle ("Stored Procedure Properties", "storedProcedures.aspx") %>
		</td></tr>
		<tr><td class="TableHeader">
			<table width="100%">
			<tr><td style="padding: 10px;">
				<img src="images/Large_Icons_StoredProcedure.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="SPText"><%= SPText %></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 + -