-
Storing binary files in DB
Is there any way to store a binary or image file into a database record / save a binary or image record back into a file using Transact SQL? If yes, would the "image" data type be most suitable?
(As a background, I am working on a process that deals with incomign emails, and I am using SQL Mail for that purpose. The above is needed to deal with attachments that may come with emails, and which are saved in a physical file on the HDD).
Thanks a lot in advance...
-
You can save binary file into sql table with writetext, check sql books online for details.
-
Thanks. I'm fine working with the binary / text fields in the DB. The problem I am facing is how to read from a physical file on the disc / how to write to a physical file on the disc using Transact SQL.
-
For text file, can try create linked server to the file in sql.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|