Solved

How to Update Graphic Field

Posted on 2001-09-07
4
177 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 10 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

752 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