Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to Update Graphic Field

Posted on 2001-09-07
4
Medium Priority
?
180 Views
Last Modified: 2012-05-04
Hi all,

Currently i have project need to store a graphic(product picture ) into my the database, the database i using is oracle 8i in Windows 200/98 platform.

Question

1. When using visual baic to create a interface for user to input data, for graphic field i support to use image or picture box any different them ?

2. When user input input data , how can i get the resouirce (picture) and put into image box.
Eg : 1)direct scan from scanner and load into image box.
     2) PoP a message box and ask user to find the
        picture and then load into image box.

Any suggestion can get load the picture into image box ?

3. Before i can load the picture into the image box , is it i need to cut the size of picture according to the image box size ?

4. When update data field , for graphic is it any different or just like the normal field ?


Hope you can understand what i mean .

Could you please give me some example .


Thanks










   
 












0
Comment
Question by:seemedp
[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
4 Comments
 
LVL 3

Accepted Solution

by:
RodStephens earned 40 total points
ID: 6466745
> 1. When using visual baic to create a interface for
> user to input data, for graphic field i support
> to use image or picture box any different them ?

You can use a PictureBox linked to the database field using a Data control. Or you can save and load the image yourself. Or you can keep the files separate and store the file names in the database.

> 2. When user input input data , how can i get the
> resouirce (picture) and put into image box.
> Eg : 1)direct scan from scanner and load into image box.
>    2) PoP a message box and ask user to find the
>       picture and then load into image box.

2 is easier. After the user selects the file, just use:

    Picture1.Picture = LoadPicture(the_file_name)

> 3. Before i can load the picture into the image box ,
> is it i need to cut the size of picture according
> to the image box size ?

If so, load it first into a PictureBox with Visible = False and AutoSize = True. Then use PaintPicture to copy it into the display PictureBox at the right size. Be sure to keep the same width/height ratio in the new picture so you don't squash the image.

> 4. When update data field , for graphic is it any
> different or just like the normal field ?

If you link the PictureBox to a Data control, it will work normally without any work on your part.

> Could you please give me some example .

Take a look at:

    http://www.vb-helper.com/HowTo/dbpict.zip
    http://www.vb-helper.com/HowTo/dbimage.zip
    http://www.vb-helper.com/HowTo/dbimage2.zip

My book "Advanced Visual Basic Techniques" shows how to make an application that does this using a PictureBox linked to a Data control. It's a bit old now, though.
0
 

Author Comment

by:seemedp
ID: 6481664
hi Rodstepphens,


I have using the ADO data control to link with my database, but when i try to link datafield with my database vb has pop out error "datatype not supported".


Tablet field setting ( oracle 81)
field 1 varchar(20)
field 2 varchar(30)
field 3 longrow

is it the vb cannot support datatype longrow ?

Like this situation , where i can get detail or confimation for thsi error.


Thank you.  








0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7207745
Hi seemedp,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept RodStephens's comment(s) as an answer.

seemedp, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7241088
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Suggested Courses

670 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