| Author |
Topic |
|
xicom_rakesh
Starting Member
6 Posts |
Posted - 2009-08-17 : 03:46:21
|
| HiWe were trying to export binary data to File system. I'm able to export the file to Varbinary data to File system but the problem is that extracted zip are corrupted. throwing message "Zip file is invalid or corrupted"Thanks for any kind of help.Rakesh |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-08-17 : 04:03:13
|
Fix the bug at line #13. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
xicom_rakesh
Starting Member
6 Posts |
Posted - 2009-08-17 : 05:17:54
|
| Some Additional information for the QueryHere is the T-SQL using for Exporing the binary dataset @SQLcommand = 'bcp "SELECT [File] FROM OrderManagementUtility.dbo.OrderBulletinFiles where orderid='+CAST(@OrderID as varchar(20)) +' and filename='''+@FileName+'''" queryout "'+@FilePathToExport+@FileName +'" -n -S ' + @@SERVERNAME +' -U '+@SQLUserName+' -P '+@SQLPassword +''The above exporting the file well but the zip file throwing error when try to extract them.ThanksRakesh |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-08-17 : 05:52:25
|
What is the result of the PRINT @SQLcommandjust before the EXEC(@SQLcommand) ? N 56°04'39.26"E 12°55'05.63" |
 |
|
|
xicom_rakesh
Starting Member
6 Posts |
Posted - 2009-08-17 : 06:54:14
|
| Result of PRINT @SQLcommandbcp "SELECT [File] FROM OrderManagementUtility.dbo.OrderBulletinFiles where orderid=3 and filename='CustomPages.zip'" queryout "E:\OrderManagementUtility\TempExported\CustomPages.zip" -n -S STAGE2 -U **** -P ******RakeshRakesh |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-08-17 : 07:37:28
|
The file created is NOT a zip-file. It is a TEXT-file, even if you named it ZIP. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
xicom_rakesh
Starting Member
6 Posts |
Posted - 2009-08-17 : 07:44:45
|
| OkDo you means that data in table's column is text file?What should I do to create .Zip Files?Rakesh |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-08-17 : 07:48:14
|
Use a third party compression application that takes command line inputs. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
xicom_rakesh
Starting Member
6 Posts |
Posted - 2009-08-17 : 07:52:10
|
| Do you have any Idea for any Third Party tools?I will recommend your suggestion as gold.Rakesh |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-08-17 : 07:59:40
|
http://www.7-zip.org/ N 56°04'39.26"E 12°55'05.63" |
 |
|
|
xicom_rakesh
Starting Member
6 Posts |
Posted - 2009-08-17 : 08:00:03
|
| Thanks Let me check.Rakesh |
 |
|
|
|