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