I'm trying to call a dataset, modify a value, and then put it back into a dataset.
I think this is possible but I'm doing something wrong
Any help would be greatly appreciated
attached is an image of the table and the code
Expand|Select|Wrap|Line Numbers
- Public Function GetSideBannersDir() As DataSet
- Dim Conn As New SqlConnection(ConnectionString)
- Dim CmdSelect As New SqlCommand("GetSideBanners", Conn)
- CmdSelect.CommandType = CommandType.StoredProcedure
- Dim Da As New SqlDataAdapter(CmdSelect)
- Dim Ds As New DataSet
- 'Fill the Dataset
- Try
- Da.Fill(Ds)
- Dim FormatImageURL As String = Ds.Tables("Banners").Rows(0)("ImageUrlField")
- Ds.Tables("Banners").Rows(0)("ImageUrlField") = "/Data" & FormatImageURL
- Context.Response.Write("<br><br>DB" & Ds.Tables(3).Rows(0)("ImageUrlField"))
- 'Context.Response.End()
- Da.Fill(Ds, "Banners")
- Return Ds
- Catch ex As Exception
- 'Throw New ApplicationException("Data Error")
- Finally
- Conn.Close()
- End Try
- End Function