当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > ASP中是如何使用存储过程的

ASP.NET
HTML服务器控件介绍:HtmlInputFile控件
HTML服务器控件介绍:HtmlInputHidden控件
HTML服务器控件介绍:HtmlInputImage控件
HTML服务器控件介绍:HtmlInputRadioButton控件
HTML服务器控件介绍:HtmlInputText控件
HTML服务器控件介绍:HtmlSelect控件
HTML服务器控件介绍:HtmlTable控件
HTML服务器控件介绍:HtmlTableCell控件
HTML服务器控件介绍:HtmlTableRow控件
HTML服务器控件介绍:HtmlTextArea控件
Web服务器控件:AdRotator控件
Web服务器控件:Button控件
Web服务器控件:Calendar控件
Web服务器控件:CheckBox控件
Web服务器控件:CheckBoxList控件
Web服务器控件:DropDownList控件
Web服务器控件:HyperLink控件
Web服务器控件:Image控件
Web服务器控件:ImageButton控件
Web服务器控件:Label控件

ASP.NET 中的 ASP中是如何使用存储过程的


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 79 ::
收藏到网摘: n/a

Start!
下面是创建存储过程
CREATE PROCEDURE select_forum
AS
select * from forum
Go
xx.aspx
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQL" %>
<%
dim conn as SQLConnection
dim cmd as SQLCommand
dim myreader as SQLDataReader
conn=new SQLConnectio("server=localhost;uid=sonysce;pwd=1netsg;database=1net")
cmd=new SQLCommand("select_forum",conn)
cmd.CommandType=CommandType.StoredProcedure
conn.Open()
cmd.Execute(myreader)
while myreader.Read()
Response.Write(myreader("content")&"<br>")
end while
myreader.Close()
conn.CLose()
%>
End