Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Northwind Database and you!

Posted on 1999-01-29
5
Medium Priority
?
157 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 800 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

718 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