I am working with test data in Visual Studio's server explorer. How would I put images into the database just as test images? I have no front end component built to take care of image uploading.
相关问题
- Views base64 encoded blob in HTML with PHP
- How to get the background from multiple images by
- SQL to Parse a Key-Value String
- CV2 Image Error: error: (-215:Assertion failed) !s
- Replace image attributes for lazyload plugin on im
相关文章
- Use savefig in Python with string and iterative in
- Code for inserting data into SQL Server database u
- Where does this quality loss on Images come from?
- Specifying image dimensions in HTML vs CSS for pag
- SQL Server 2008 Change Data Capture, who made the
- How to insert pictures into each individual bar in
- How do I append metadata to an image in Matlab?
- How do we alias a Sql Server instance name used in
It will work for SQL server 2008r2...but first u have to create a filestream database.
//create databse
//table creation
//inserting value
You can upload an image into a db (and retrieve it) using byte[] as data type, assuming that in your db corresponding column is a BLOB.
So if you load your image with
byte[] img = File.ReadAllBytes(your_file)
then you can use a query like thisINSERT INTO table SET image_col = @par
, where par is a parameter whose value is img.