I needed to retrieve image fields on SQL Server 7.0 with VB6, and I couldn’t find any article about it. So, I assume others have had the same problem. I’ve since found a method for doing it.
You must use Microsoft ADO 2.5 and set it into the following project reference:
dim rst as new adodb.recordsetdim adoConn as new adodb.Connection
You also have to open the connection with the database.
'Open recordset....rst.Open "Select * from
where ", adoConn, adOpenKeyset,adLockOptimistic'THIS FUNCTION SAVES AN IMAGE
INTO AN IMAGE DATATYPE FIELDPrivate Function SaveImage() Dim mStream As New ADODB.Stream With mStream .Type = adTypeBinary .Open .LoadFromFile "NAME>" rst("").
Value = .Read rst.Update End With Set mStream = NothingEnd Function'THIS FUNCTION LOAD IMAGE FROM
IMAGE DATATYPE FIELD AND SAVE IT INTO AFILE.....Private Function LoadImage() Dim mStream As New ADODB.Stream With mStream .Type = adTypeBinary .Open .Write rst("") .SaveToFile "NAME>", adSaveCreateOverWrite End With Set mStream = NothingEnd Function
Aside from this method, you can use a picture control to store an image,put a picture control into a form, and call it PictureTemp.
PictureTemp.DataField = "Immagine"
'Set DataField....Set PictureTemp.DataSource = rst
'Set DataSource
You can use the PictureTemp.Picture property to get your image.
Private Function LoadImage() Dim mStream As New ADODB.Stream With mStream .Type = adTypeBinary .Open PictureTemp.DataField = "Immagine"
'Set DataField.... Set PictureTemp.DataSource = rst
'Set DataSource Set MSFGRID.CellPicture = PictureTemp.Picture
'Show image into a cell ofMicrosoft FlexGrid End With Set mStream = NothingEndFunction
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.
Related Posts
About Our Editorial Process
At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.
See our full editorial policy.
The Data Analytics Tools That Earn Their Place in Your Stack
Rashan Dixon
September 6, 2026
8:00 AM
GPT-6 Astra Makes Benchmarks Look Outdated
Joe Rothwell
September 5, 2026
8:44 AM
Portability Matters More Than Laptop Performance Hype
Joe Rothwell
September 5, 2026
8:12 AM
Real-Time Data Analytics: When You Actually Need It
Rashan Dixon
September 5, 2026
8:00 AM
Hung Jury Could Lead to Clancy Retrial
Kirstie Sands
September 4, 2026
3:54 PM
8 SEO APIs That Hold Up in Production in 2026
Priya Nandakumar
September 4, 2026
3:19 PM
Apple Maps Renames Lake Ontario for Americans
Steve Gickling
September 4, 2026
2:53 PM
Company Issues Report on Rogue Technology
Deanna Ritchie
September 4, 2026
1:47 PM
Microsoft Disables Text Predictions by Default
Sumit Kumar
September 4, 2026
1:39 PM
Ox Alpha Fuels Online AI Speculation
Rashan Dixon
September 4, 2026
1:22 PM
Anthropic Brings Multiplayer AI to Slack
Rashan Dixon
September 4, 2026
12:11 PM
Gloria Steinem Dies at Age 92
Steve Gickling
September 4, 2026
12:01 PM
AI Model Hype Is Outrunning Real Value
Joe Rothwell
September 4, 2026
11:14 AM
AI Pushes Big Pharma to Rethink Outsourcing
Sumit Kumar
September 4, 2026
9:17 AM
What Is Data Analytics? A Clear Guide for Decision-Makers
Rashan Dixon
September 4, 2026
8:00 AM
China Expands Factory Robot Workforce Rapidly
Deanna Ritchie
September 3, 2026
4:31 PM
Third AI Hacking Disclosure Raises Security Concerns
Rashan Dixon
September 3, 2026
2:46 PM
The Poco F9 Ultra Makes Flagships Look Overpriced
Joe Rothwell
September 3, 2026
12:44 PM
Starbucks Cuts 224 More Seattle-Area Jobs
Sumit Kumar
September 3, 2026
12:27 PM
Bioconvergence Products Test Market Approval Rules
Sumit Kumar
September 3, 2026
11:39 AM
Ruling Raises Alarm Over Press Protections
Kirstie Sands
September 3, 2026
10:29 AM
Salesforce and Anthropic Launch Claudeforce
Rashan Dixon
September 3, 2026
9:15 AM
AI Boom Lifts Data Centre Suppliers
Steve Gickling
September 3, 2026
9:11 AM
How to Manage Technical Debt Before It Manages You
Rashan Dixon
September 3, 2026
8:00 AM
Adobe Expands Saudi AI Access Partnership
Sumit Kumar
September 2, 2026
4:39 PM




















