Protected Sub ViewData()
'*** DataTable ***'
Dim dtAdapter As OracleDataAdapter
Dim dt As New DataTable
strSQL = "SELECT * FROM files WHERE FilesID = :sFilesID "
dtAdapter = New OracleDataAdapter(strSQL, objConn)
objCmd = dtAdapter.SelectCommand
objCmd.Parameters.Add(":sFilesID", OracleType.Int32).Value = Request.QueryString("FilesID")
dtAdapter.Fill(dt)
If dt.Rows.Count > 0 Then
Me.ImgPic.ImageUrl = "ViewImg.aspx?FilesID=" & dt.Rows(0)("FilesID")
Me.txtName.Text = dt.Rows(0)("Name")
End If
dt = Nothing
End Sub
ASP.NET Oracle BLOB Binary Data and Parameterized Query