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.
Exploring How Service Robots Navigate Everyday Unpredictability with LiDAR
Steve Gickling
November 6, 2026
2:33 PM
What Is the Cloudflare Deno Acquisition? Explained
Editorial-team
November 6, 2026
8:18 AM
What Is FlashProve? Anthropic’s New Way to Verify AI Model Identity
Rashan Dixon
November 5, 2026
10:08 AM
What Is Recursive Self-Improvement in AI? Anthropic’s Warning Explained
Deanna Ritchie
November 4, 2026
8:05 AM
Domestic Intelligence: What Lütke, Musk And Panin Know That You Don’t?
Steve Gickling
November 3, 2026
11:32 AM
Design Systems to AI Platforms: The Evolution of Developer Experience
Rashan Dixon
November 3, 2026
10:55 AM
What Is the PHP2Shell Vulnerability? The Critical PHP RCE Flaw Explained
Steve Gickling
November 3, 2026
7:05 AM
How to Start a Private Dental Office
Rashan Dixon
November 2, 2026
3:48 PM
Best Vendor for an AI Gateway in Regulated Industries in 2026
Steve Gickling
November 2, 2026
3:30 PM
What Is the Anthropic IPO? The S-1 Filing and Ticker ANT Explained
Rashan Dixon
November 2, 2026
10:50 AM
What Is GitHub Copilot Fusion? GitHub’s New Multi-Model Coding System Explained
Deanna Ritchie
October 30, 2026
7:20 AM
The 800ms Problem: Where Voice Agent Latency Actually Hides
Rashan Dixon
October 29, 2026
3:33 PM
What Is the Cloudflare KV Cache Leak? GLM-5.3 Bug Explained
Steve Gickling
October 29, 2026
8:13 AM
Leveraging Model Context Protocol (MCP) & Cursor for Faster Payment Gateway Integration
Rashan Dixon
October 28, 2026
3:50 PM
What Is the Next.js RCE Vulnerability in Image Optimization?
Rashan Dixon
October 28, 2026
1:30 PM
What Is the Node2Shell Vulnerability in Node.js?
John Rampton
October 27, 2026
8:04 AM
What Is the OpenCode Breach? Distillation Attack Explained
Deanna Ritchie
October 26, 2026
7:44 AM
What Is GitHub Copilot Computer Use? GitHub’s New Desktop Agent Explained
Rashan Dixon
October 23, 2026
8:08 AM
What Is SlugFest, the npm Trusted Publishing Vulnerability?
Deanna Ritchie
October 22, 2026
1:00 PM
What Is VS Code Agent Sandboxing? Microsoft’s New AI Agent Security Layer Explained
Steve Gickling
October 21, 2026
12:44 PM
Meta Muse Wonder: Pricing, Benchmarks, and What It Means for Developers
Rashan Dixon
October 20, 2026
7:56 AM
What Are GitHub Actions Workflow Lockfiles?
Deanna Ritchie
October 19, 2026
9:52 AM
What Is Grok Voice 3.0? xAI’s New Speech-to-Speech Model Explained
Steve Gickling
October 16, 2026
10:27 AM
Google’s Gemini Argon Wins Through Reach, Not Revolution
Joe Rothwell
October 15, 2026
10:50 AM
What Is the GhostApproval Vulnerability in AI Coding Assistants?
Johannah Lopez
October 15, 2026
8:09 AM























