<%@import namespace="system.data.SQL"%> <script language="vb" runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Dim sqlText as String = "select * from authors" Dim cnString as string = "server=sql.myserver.com;uid=pubs;pwd=pubs;database=pubs;" Dim dbRead AS SQLDataReader Dim sqlCmd AS SQLCommand sqlCmd = New SQLCommand(sqlText,cnString) sqlCmd.ActiveConnection.Open() sqlCmd.execute(dbread) while dbRead.Read() response.write("<br>" & dbRead.Item("au_lname")) End while End Sub </script> |