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.
E-Ink Tablets Are The Focus We Need
Joe Rothwell
March 7, 2026
9:03 AM
7 Things Engineering Leaders Must Know Before Adding LLMs
Steve Gickling
March 6, 2026
9:47 PM
The Essential Guide to Data Modeling for High-Write Systems
Steve Gickling
March 6, 2026
9:35 PM
What Is Workload Isolation (And Why It Matters at Scale)
Rashan Dixon
March 6, 2026
9:26 PM
Hybrid Retrieval vs Vector Search: What Actually Works
Kirstie Sands
March 6, 2026
9:15 PM
5 Signals Your AI Evaluation Metrics Tell the Wrong Story
Sumit Kumar
March 6, 2026
9:06 PM
AI War Games Trigger Nuclear Responses
Deanna Ritchie
March 6, 2026
5:12 PM
UK Regulator Fines Reddit Over Children’s Data
Kirstie Sands
March 6, 2026
3:13 PM
AI Tool Records Medical Appointments Automatically
Steve Gickling
March 6, 2026
1:39 PM
Rethinking The Culture Of Convenience
Sumit Kumar
March 6, 2026
1:37 PM
US Rig Count Hits Four-Month Low
Steve Gickling
March 6, 2026
11:51 AM
FinTech Trends: Why Debt Collection Software Is Becoming Central to AR Automation
Amelia Blackwood
March 6, 2026
10:43 AM
Government iPhone Exploits Reach Cybercriminals
Sumit Kumar
March 6, 2026
9:37 AM
Claude Sonnet 4.6 Narrows Gap With Opus
Rashan Dixon
March 6, 2026
9:28 AM
6 Signals Your System Is Sliding Into Operational Drift
Steve Gickling
March 5, 2026
4:56 PM
Six Reasons Your AI Prototype Fails in Production
Rashan Dixon
March 5, 2026
4:46 PM
7 Early Signs Your AI Guardrails Won’t Hold in Production
Kirstie Sands
March 5, 2026
4:37 PM
How to Scale Search Infrastructure for High-Query Volumes
Sumit Kumar
March 5, 2026
4:21 PM
Technical Influence vs Authority in Engineering Teams
Steve Gickling
March 5, 2026
4:09 PM
Optical Links Challenge Copper In Data Centers
Rashan Dixon
March 5, 2026
3:48 PM
Empathy Guides Rosalyn Engelman’s Partnership
Rashan Dixon
March 5, 2026
3:25 PM
Apple M5 Chips Target On-Device AI
Sumit Kumar
March 5, 2026
2:41 PM
Sophia Space Raises $10 Million Seed
Steve Gickling
March 5, 2026
2:29 PM
Charles Payne Hosts Investor Town Hall
Kirstie Sands
March 5, 2026
2:16 PM
Xiaomi Highlights New Tech At MWC
Steve Gickling
March 5, 2026
2:13 PM










