How to insert a blob into a database using sql server management studio

后端 未结 6 1169
暗喜
暗喜 2020-11-28 04:04

How can I easily insert a blob into a varbinary(MAX) field?

As an example:

thing I want to insert is: c:\\picture.png
the table is mytable

6条回答
  •  旧时难觅i
    2020-11-28 04:34

    Do you need to do it from mgmt studio? Here's how we do it from cmd line:

    "C:\Program Files\Microsoft SQL Server\MSSQL\Binn\TEXTCOPY.exe" /S < Server> /D < DataBase> /T mytable /C mypictureblob /F "C:\picture.png" /W"where RecId=" /I

提交回复
热议问题