How does BCP queryout encode varbinary(max) and can I change the encoding?

社会主义新天地 提交于 2019-12-12 03:34:04

问题


I have a legacy system that has byte arrays of images(jpg) stored in the database in varbinary(max) columns. What is the default encoding being used by sql bcp to create the string that it writes to the flat file? Also, can I change the encoding?


回答1:


When you output using bcp the default format is native or you can force that with the -n (-N will also work since it stores noncharacter data as native).

Kalman Toth's website has an example http://www.sqlusa.com/bestpractices/imageimportexport/



来源:https://stackoverflow.com/questions/36266451/how-does-bcp-queryout-encode-varbinarymax-and-can-i-change-the-encoding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!