Create a stored procedure
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") & "
")
End while
MyReader.close ()
CONN.CLOSE ()
%>