asafblasberg
Programmer
Hello, how do I retrieve data for a specific row using a dataset. I want to fetch the 3rd row information.
<%@ Page Language="VB" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<script runat="server">
protected test as string
Sub Page_Load(sender As Object, e As EventArgs)
Dim myconnection3 As SqlConnection
Dim myda As SqlDataAdapter
Dim ds As DataSet
dim strconn as string
strConn = ConfigurationSettings.AppSettings("o")
myconnection3 = New SqlConnection(strConn)
'If there are options in our option group, then show them and
'populate the results in the drop down list.
'retrieve options from the option groups.
myda = New SqlDataAdapter("SELECT categorydesc from categories", myconnection3)
ds = New DataSet()
myda.Fill(ds, "categories")
HELP!! Now, I want to take the third row's data and display the data in the column "CategoryDesc" of the "category" table
then, assign it to a protected variable called ASAF
end sub
</script>
<html>
<head>
</head>
<body>
<form ID="test" runat="server">
STRING IS: <%# test %>
<asp:Label id="asaflabel" Runat="server"></asp:Label>
</form>
</body>
</html>
<%@ Page Language="VB" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<script runat="server">
protected test as string
Sub Page_Load(sender As Object, e As EventArgs)
Dim myconnection3 As SqlConnection
Dim myda As SqlDataAdapter
Dim ds As DataSet
dim strconn as string
strConn = ConfigurationSettings.AppSettings("o")
myconnection3 = New SqlConnection(strConn)
'If there are options in our option group, then show them and
'populate the results in the drop down list.
'retrieve options from the option groups.
myda = New SqlDataAdapter("SELECT categorydesc from categories", myconnection3)
ds = New DataSet()
myda.Fill(ds, "categories")
HELP!! Now, I want to take the third row's data and display the data in the column "CategoryDesc" of the "category" table
then, assign it to a protected variable called ASAF
end sub
</script>
<html>
<head>
</head>
<body>
<form ID="test" runat="server">
STRING IS: <%# test %>
<asp:Label id="asaflabel" Runat="server"></asp:Label>
</form>
</body>
</html>