Solved

Northwind Database and you!

Posted on 1999-01-29
5
154 Views
Last Modified: 2013-12-25
I've made a simple Visual Basic 5.0 project, which consists of a form, a database control, and a picturebox control.
Data1 Control Properties
Databasename: Northwnd.mdb
RecordSource: Categories

PictureBox1 Control Properties
DataSource: Data1
DataField: Picture

Now, in theory, I should be able to use the data control to scroll through the pictures in the database, which will appear in the picture box, but what happens, is I get an "invalid picture" error.

Now, when I open the Northwnd.mdb database, I notice that the pictures, are merely ole bitmap image objects, and what appears in the field, is "bitmap image", and not the actual image.  This could be my problem, but does anyone know how to remedy this, so I can view the images through the picturebox, and not get the error?

Thanks.
0
Comment
Question by:frankbrack
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 1499630
Try the Data form wizard. It will generate it for you. You will have to resize the control, but it will work!


0
 

Author Comment

by:frankbrack
ID: 1499631
I'm sorry, I guess I would like an explanation as to why my doesn't work, and then how to correct it manually.
0
 

Author Comment

by:frankbrack
ID: 1499632
I'm sorry, I guess I would like an explanation, as to why, my way, doesn't work, and I would like to know how to correct, what I've got so far, manually.

When you view the bitmap image's in the access database, it doesn't physically show the image, in the table, but rather it has a link, that when double clicked, will open the image, in MS Paint.  What's going on here?
0
 
LVL 18

Accepted Solution

by:
mdougan earned 200 total points
ID: 1499633
Instead of using a picture box, instead use an ole object.  When the wizard asks you what kind of ole object, tell it a BMP, and to create a New BMP (as opposed to creating from a file).  Set the normal DataSource and DataField properties and it will work.

What is going on here is, as you suspected, the data has been saved in the Access database as an ole object -- so, it makes sense that you can only view it by using an ole control.  

MD
0
 

Author Comment

by:frankbrack
ID: 1499634
Hi emoreau,
I figured this one out after playing with it.  Using the ole object works perfectly.

But your answer is correct, so I will award you the points.  Thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vb6 connector to mongodb 2 162
Child Form in front 4 66
MsgBox 4 76
VB 6 error 5 in windows 10 but not in XP 7 72
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question