Alpha Video Training
Results 1 to 1 of 1

Thread: unable to download the file from sqlserver 2012 in Alpha anyware webapplication. but this is working in Alpha five v11

  1. #1
    Member samee's Avatar
    Real Name
    Samee
    Join Date
    Apr 2013
    Location
    India, Bangalore
    Posts
    50

    Default unable to download the file from sqlserver 2012 in Alpha anyware webapplication. but this is working in Alpha five v11

    File download error
    invalid precision Value

    unable to download the file from sqlserver 2012. please find the attachement more details


    for your inforamtion this is working in alpha five v11, but in alpha fivev12 this error is coming.



    x basic code for your information :-


    function afterUpload as v (e as p)

    dim fileCount as n
    fileCount = e.filecount

    dim i as n
    dim fileArray as p

    fileArray = e.filearray

    DIM cn as sql::Connection


    if cn.open("::Name::RMS-Sql") = .F. then



    e.javascript = "alert('Unable to Open the Database');"
    return ' unable to open database
    end if



    dim insertFilesql as c

    insertFilesql = "insert into Cv_Sent_Attachments(Cv_Sent_Id, Embedded_File_Name, Embedded_File_Type, Embedded_File,
    Uploaded_On, Uploaded_By) values (:Cv_Sent_Id, :Embedded_File_Name, :Embedded_File_Type, :Embedded_File, :Uploaded_On, :Uploaded_By)"
    dim args as sql::arguments

    for i = 1 to fileCount

    dim fileBinaryData as b


    fileBinaryData = e.fileArray[i].data


    args.add("Cv_Sent_Id",convert_type(e.primaryKeyArray[1],"N"))
    args.add("Embedded_File_Name",e.fileArray[i].fileName)


    dim filename as c
    filename = e.fileArray[i].fileName

    dim splitFileName as C
    splitFileName = strtran(fileName, ".", " ")
    dim fileExtension as C
    fileExtension = "." + lastword(splitFileName)



    args.add("Embedded_File_Type", fileExtension)

    args.add("Embedded_File",fileBinaryData)
    args.add("Uploaded_On",now())
    args.add("Uploaded_By",SESSION.LOGGEDINUSERFULLNAME)

    if cn.Execute(insertFilesql, args) = .F. then

    e.javascript = "alert('" + js_escape(cn.CallResult.text) + "');"

    end if



    e.javascript = "alert('" + js_escape(cn.CallResult.text) + "');"

    next i
    cn.close()




    end function
    Attached Files Attached Files

Similar Threads

  1. unable to download the file from sqlserver 2012
    By samee in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 08-11-2014, 10:15 AM
  2. xbasic function is not working in alpha five v11 web application
    By kalisiddhu in forum Application Server Version 11 - Web/Browser Applications
    Replies: 9
    Last Post: 12-28-2013, 04:10 PM
  3. unable to download a PDF file from Android browser
    By sofist2010 in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 02-13-2013, 05:10 PM
  4. Big showstopper: File Download not working correctly
    By Steven P. in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 08-22-2011, 08:54 AM
  5. unable to download ODBC file
    By George Crosson in forum Alpha Five Version 5
    Replies: 1
    Last Post: 06-03-2003, 06:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •