Microsoft JScript runtime error: Could not complete the operation due to error c00ce514.

2 posts, 0 answers
  1. M Kumar
    M Kumar avatar
    41 posts
    Member since:
    Apr 2008

    Posted 21 Mar 2012 Link to this post

    'I want do download the corresponding file when i click the grid Image button
    'Here i paste my code. it shows this bug(shows in attachment)

    Sub ExplorerGrid_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles VersionGrid.ItemCommand
            Dim objGridDataItem As GridDataItem = CType(e.Item, GridDataItem)
            Dim stringVersion As String
            stringVersion = objGridDataItem.Item("Version").Text
            Dim stringPath As String = Request.QueryString("filepath")
            Dim temppath As String = stringPath.Substring(0, stringPath.LastIndexOf("\"))
            Dim filename As String = stringPath.Substring(stringPath.LastIndexOf("\") + 1)
            filename = filename.Replace("'", "''")
            Dim sqlcon As New SqlConnection(ConfigurationManager.ConnectionStrings("MyConnection").ToString())
            Dim objSqlDASec As New SqlDataAdapter("select * from Sample where [DocumentName]= '" + filename + "'", sqlcon)
            objSqlDASec.SelectCommand.CommandTimeout = 1200
            Dim objDTSec As New DataSet
            Dim buffer As Byte()
            buffer = objDTSec.Tables(0).Rows(0)("Document")
                Dim req As New WebClient
                Dim response As HttpResponse
                response = HttpContext.Current.Response
                response.Buffer = True
                response.AddHeader("Content-Disposition", "attachment; filename=" + filename)
                response.ContentType = "application/octet-stream"
            Catch ex As Exception
            End Try
        End Sub
  2. Pavlina
    Pavlina avatar
    6154 posts

    Posted 26 Mar 2012 Link to this post


    Please refer to the forum thread which elaborates on this matter and let me know if it helps to resolve the problem:

    All the best,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top