December 28, 2012 at 3:09 am
hi @all,
i've got a problem and feel a little out of ideas:
i'va a website where i upload attachments via html input tag (wihout any conversion) into an uploadfile-object on apache myfaces. Using .getBytes i get an java bytearray which will get sent into an oracle 11g database in an BLOB column. Works perfectly fine if it stays like this.
now i got an sql server 2008 database where i'd like to query the data including my blob-column:
bcp "select blob_column from <linked-server>.table where id = 487294" queryout "c:\share\File.pdf" -T -n
works perfectly fine for PDF files. but when i do the same with XLS or XLSX files, it creates the files properly, but when i try to open it, it fails with type problems....
i realized when i compared the files, that in the BCP file there is an 4-byte prefix at the beginning of the file. the rest seams the same. interesting to see, that even in the PDF file, there are 4 heading prefix-bytes. the pdf editor doesnt care...
anyhow.
i also tried to create a format file and used it instead of the -n option. the file looked likes this:
10.0
1
1 SQLBINARY 0 0 "" 2 FileData ""
Didnt work either...
The oracle db runs on an AIX machine.
any ideas would be highly appreciated!! 🙂
January 2, 2013 at 8:51 am
nobody able to help? any other ideas, how to solve it?
thanks a lot...
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply