0

I have an Access back-end that is going to be converted to SQL Server. The front-end will stay the same using Access. The issue I am having is how SQL Server handles images differently than MS Access.

Currently, a user adds a picture to the record via the attachment data type which, to my understanding, isn't possible in SQL Server. I saw the image data type is deprecated which leaves varbinary(MAX) and/or filestream as the options.

I want to go with storing the images in the filesystem as the size is greater than 256KB, but I'm not finding any documentation about accomplishing that with an Access front-end.

3
  • You want to extract images to folder location? Commented Jul 1, 2020 at 22:18
  • If you use File Table SQL Server will expose a Windows file share for you to save the files in using filesystem APIs. learn.microsoft.com/en-us/sql/relational-databases/blob/… Commented Jul 1, 2020 at 23:16
  • If it's possible to have the image be visible instead of the file-path while the user is in the Access front-end, that'd be ideal. Is that possible? Commented Jul 6, 2020 at 20:56

1 Answer 1

1

Consider running an MS Access pass-through query to upload user's image. Specifically, pass the file name into an SQL query as shown in MSDN docs for large-value data types. For this, the user will need OPENROWSET privileges and the image file may need to be accessible on client machine or server.

INSERT myTable (myImageColumn, ...other columns...)  
SELECT myPicData.*, ...other values...  
FROM OPENROWSET
     (BULK 'C:\Path\To\Image.jpg', SINGLE_BLOB) AS myPicData  
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.