0

I have a SQL database, a website created using Visual Studios/Visual Basic, and an Access 365 front end. The Access database is for "management" of the data - not really good at creating websites so this is the fastest way to get this database out there. In the Access database, the user will enter the data. The website will be for viewing a list of the data. I did create a webpage for adding data just for testing. There is an image - stored varbinary in SQL. If I save the image in the Access front end, I can view the image in Access, but not on the website. If I add the image on the website, I can view the image on the website, but not in the Access front end. Why? Image is stored in the varbinary field called "image" whether it's saved from Access or the webpage. Thanks in advance!

FYI - I did find some software that enables you to do this called dpPix but there is a cost. As always, want to not spend the money.

user3033348
  • 145
  • 13
  • 2
    IIRC, Access stores images by default as an OLE object whereas your web FE is probably storing the raw image bytes. You'll need to store the image in the same format (e.g. jpg). – Dan Guzman Dec 22 '21 at 15:46
  • While the question is different, the answer is the same, use a webbrowser control to display the image. If you want to add images in Access, always do it through VBA, OLE objects are a pain to work with (I have an answer on that as well) – Erik A Dec 22 '21 at 17:29
  • Suggesting to use and introduce web browser control is like using a big freightliner truck to deliver a can of pop. Link also assumes image is stored in base64, which is not the case here. With the new image control in Access (2010 and after), that simple image control can render and display that image with one line of code - and no need to introduce a huge and problem riddled web browser control. And worse yet, the report render system and form in Access are vast different. That link is the last and worst possible solution that actually takes effort to actually suggest with a straight face – Albert D. Kallal Dec 22 '21 at 18:19
  • @AlbertD.Kallal Feel free to suggest a better one. And read the link properly, it doesn't assume base64, it does a base64 conversion to use the web browser control, and suggests 2 alternatives as well (storing to a file, and using a third-party ActiveX control). Reports aren't forms, but this answer works on both – Erik A Dec 22 '21 at 18:47
  • Still uses a web browser, and alternate to use 3rd party ActiveX also bad idea (some form of installation now required to use on different workstations). As for suggesting a solution? Can't since the question is not accepting answers. As noted my suggestion is to use the newer image control in access and none of that mess is required. New image control accepts a varbinary or image type directly from SQL server anyway. Introduction of a web browser is problematic and not required when the new native image control in access works and been a choice since 2010. – Albert D. Kallal Dec 22 '21 at 19:00
  • You can suggest an answer on the duplicate target, that's how duplicates work – Erik A Dec 22 '21 at 19:26
  • Thanks - that's a great suggestion - I'll do that. I mean no hard feelings here. You contribute to this community - tons of work, and I in no way want to throw cold water on your work, your support of this community - your work and boatloads of posts and efforts stand well on their own. I'll post to that thread - and best of this holiday season to you. – Albert D. Kallal Dec 23 '21 at 21:38

0 Answers0