Dim myConnection As New SqlConnection("server=ukcwdswst02;database=pubs;uid=userid;pwd=password")
Dim myCommand As New SqlDataAdapter("select * from Authors",
myConnection)
Sub Page_Load(sender As Object, e As EventArgs)
Dim ds As New DataSet()
myCommand.Fill(ds, "Authors")
Dim pRow As DataRow
For Each pRow In ds.Tables("Authors").Rows
Response.write (pRow("au_fname") & " "
& pRow("au_lname") & "<BR>")
Next
End Sub
|