RadUpload control : issues in uploading a word document with .docx extension on the SQL server database

Thread is closed for posting
6 posts, 0 answers
  1. Bhushan
    Bhushan avatar
    3 posts
    Member since:
    Jun 2015

    Posted 17 Jun 2015 Link to this post

    Dear All,

    We have been using telerik controls in various projects.  Currently we have
    encountered an issue with the RadUpload control.

    The issue is how the RadUpload control reads and saves the file data in the
    database.

    We have uploaded a word document with both .doc and .docx extension.

    It saves the file in the database. When we do a free text search in the SQL server
    it only searches a word document with .doc extension.

    It does not search the word document with .docx extension.

    See the below SQL script we have used to search for the data in the file:

    Select * from tblDocuments
    where 
    FREETEXT(tblDocuments.FileData, 'words to search')

    It searches the FileData column in the tblDocuments table

    The datatype of FileData column is varbinary(MAX)

    if we upload a .docx via the file system (save to disk and then upload from disk to database)

    the freetext search searches the .docx file. But if we use RadUpload control it does not search the .docx file. 

    It could be the way the RadUpload control creates a stream object to read the filedata.

    Could you please look into this issue?

    Please let us know if you need any more information with regards to this issue.

     

    Thanks.

  2. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 19 Jun 2015 Link to this post

    Hi Bhushan,

    We are not familiar with the described problem and the RadUpload control. In order to investigate it deeper please provide us a sample project where the issue could be observed. Keep in mind that the RadUpload control is deprecated and we recommend to all of our customers to switch to RadAsyncUpload.

    Regards,
    Peter Filipov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bhushan
    Bhushan avatar
    3 posts
    Member since:
    Jun 2015

    Posted 22 Jun 2015 Link to this post

    Dear telerik team,

    As mentioned in your previous comment here is the link http://demo.ghkint.com/telerikuploaddemo/SampleTelerikUpload.zip  to download the zipped file of a sample Asp .Net Web Forms application in VB .Net and the SQL scripts. The sample application TestApp1 is a single page that allows you to upload a document, which is then shown in a grid, I have also included a Text Box search field that allows you to search the content of the uploaded document.  Note that if I upload a a .doc I can SQL free text search the content, but if I upload a docx I cannot search the content. 

    I have narrowed down the issue to be with the upload method rather than SQL.

    To run the application you will need to change the database connection string in the web.config file.

    You can see all the scripts in the SQL_Scripts folder to create a table tblDocuments and the stored procedures for the table
    tblDocuments. You will need to create the Full Text catalog for the FileData column in the tblDocuments table.

    If you have any problem please let us know.

    Thanks in advance.

  5. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 24 Jun 2015 Link to this post

    Hello Bhushan,

    I have tested the provided project and the issues seems to be in the SQL. The sql could not search properly in docx file. When the storage procedure is executed there are no results. The RadUpload control is based on input type='file' element and it does not change the stream of the submitted files. The is nor related to the upload control.

    Regards,
    Peter Filipov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Bhushan
    Bhushan avatar
    3 posts
    Member since:
    Jun 2015

    Posted 24 Jun 2015 Link to this post

    Dear Peter,

    I think the SQL is fine – for example if you insert a .docx from the file system (hard disk) and not use upload control the SQL will work.

    However if you use the File Upload control – the SQL does not work.  The reason being is that the data is stored slightly
    differently.  It could possibly be an issue with the stream perhaps?

     
    Many thanks for all your help
  7. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 26 Jun 2015 Link to this post

    Hi Bhishan,

    I have investigated the problem and it seems that problem comes from the VB code. I have implemented your case in C# and everything is working fine. When I tried to do it in VB for some reason there is problem with the bytes reading.

    Please review the attached project and test the Default2.aspx.

    Regards,
    Peter Filipov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017