This is a migrated thread and some comments may be shown as answers.

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

5 Answers 190 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Bhushan
Top achievements
Rank 1
Bhushan asked on 17 Jun 2015, 12:53 PM

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.

5 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 19 Jun 2015, 01:22 PM
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
0
Bhushan
Top achievements
Rank 1
answered on 22 Jun 2015, 03:57 PM

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.

0
Peter Filipov
Telerik team
answered on 24 Jun 2015, 10:38 AM
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
0
Bhushan
Top achievements
Rank 1
answered on 24 Jun 2015, 03:51 PM
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
0
Peter Filipov
Telerik team
answered on 26 Jun 2015, 10:49 AM
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
Tags
Upload (Obsolete)
Asked by
Bhushan
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Bhushan
Top achievements
Rank 1
Share this question
or