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.
Evvy Raises $40 Million for Women’s Health
Sumit Kumar
September 25, 2026
4:57 PM
Prince Harry Warns of AI Chatbot Risks
Deanna Ritchie
September 25, 2026
4:33 PM
Amazon Adds AI Agents for Sellers
Sumit Kumar
September 25, 2026
4:19 PM
Claude Opus 5.5: Lower Pricing and Higher Coding Benchmarks Explained
Johannah Lopez
September 25, 2026
3:55 PM
US Housing Market Tilts Toward Buyers
Steve Gickling
September 25, 2026
3:25 PM
Virtual Character Sidesteps Politics in Movie Promotion
Steve Gickling
September 25, 2026
2:09 PM
Google Safety Founder Urges AI Slowdown
Kirstie Sands
September 25, 2026
10:23 AM
C2C Links AI Models Through KV Caches
Rashan Dixon
September 25, 2026
9:29 AM
The SaaS Metrics That Actually Predict Growth
Rashan Dixon
September 25, 2026
8:00 AM
Researchers Claim Hacks of Meta and Slack
Deanna Ritchie
September 24, 2026
5:04 PM
More Americans Turn to Chatbots for Support
Sumit Kumar
September 24, 2026
4:38 PM
AI Leaders Clash Over Development Pace
Rashan Dixon
September 24, 2026
4:31 PM
What Is Karmada? The Kubernetes Multi-Cluster Tool Explained
Priya Nandakumar
September 24, 2026
1:32 PM
Apple Faces Leadership Test Under John Ternus
Rashan Dixon
September 24, 2026
12:48 PM
Senator Urges Independent Tests for Frontier AI
Kirstie Sands
September 24, 2026
9:39 AM
Silent Data Change Skews Audience Counts
Steve Gickling
September 24, 2026
9:15 AM
Revenant Ventures Closes $78.5 Million Debut Fund
Sumit Kumar
September 24, 2026
9:11 AM
How to Become a Software Engineer Without a CS Degree
Rashan Dixon
September 24, 2026
8:00 AM
Opus 5.5 Won the Latest AI Contest
Joe Rothwell
September 24, 2026
7:51 AM
Enterprises Struggle to Control AI Agent Costs
Steve Gickling
September 23, 2026
4:35 PM
Ohio Data Center Boom Pressures Residents
Sumit Kumar
September 23, 2026
3:29 PM
Venture Gains Lift San Francisco Pension Returns
Sumit Kumar
September 23, 2026
1:43 PM
Walter Torous to Lead MIT Real Estate Center
Deanna Ritchie
September 23, 2026
12:41 PM
XTU Targets Budget Action-Camera Buyers
Rashan Dixon
September 23, 2026
12:32 PM
Scientists Create Touch Technology With Printer Toner
Kirstie Sands
September 23, 2026
11:55 AM























