Groups > dBase > dBase programming > Re: Binary Fields




Binary Fields

Binary Fields
Wed, 09 Apr 2008 03:03:07 -040
On a page are six image controls to display jpg images.  The images have been
place in a table.  In the designer each image control has a datasource property.
 When the binary table field is associated  the image control, the designer
creates this line in the control code:        dataSource =
form.exampledatamodule1.media1.rowset.fields["photo"].  This places
the first record in each control.

Using the datasource assignment in the form.onopen event yields blank image
controls.  How can the binary fields with the jpg images be individually
associated with the image controls to display all images?

Thanks
Post Reply
Re: Binary Fields
Wed, 09 Apr 2008 08:25:42 -040
Lloyd Wrote:

> On a page are six image controls to display jpg images.  The images have
been place in a table.  In the designer each image control has a datasource
property.  When the binary table field is associated  the image control, the
designer creates this line in the control code:        dataSource =
form.exampledatamodule1.media1.rowset.fields["photo"].  This places
the first record in each control.
> 
> Using the datasource assignment in the form.onopen event yields blank image
controls.  How can the binary fields with the jpg images be individually
associated with the image controls to display all images?
> 
> Thanks
>
Hello Lloyd,


I would work with a routine, see my sample in the binaries,


best regards,


Sébastien
Post Reply
Re: Binary Fields
Wed, 09 Apr 2008 12:28:04 -040
Sébastien de Breuck Wrote:

> Lloyd Wrote:
> 
> > On a page are six image controls to display jpg images.  The images
have been place in a table.  In the designer each image control has a datasource
property.  When the binary table field is associated  the image control, the
designer creates this line in the control code:        dataSource =
form.exampledatamodule1.media1.rowset.fields["photo"].  This places
the first record in each control.
> > 
> > Using the datasource assignment in the form.onopen event yields blank
image controls.  How can the binary fields with the jpg images be individually
associated with the image controls to display all images?
> > 
> > Thanks
> >
> Hello Lloyd,
> 
> 
> I would work with a routine, see my sample in the binaries,
> 
> 
> best regards,
> 
> Thank you for sharing the code sample.  It appears that an image control's
datasource property can't be changed once it exists.  It that correct?  The
designer allows the image datasource to point to a binary field, but, changing
the image control's datasource property through a code statement renders a blank
control.  In your shared code, a new query and the creation of an on the fly
image control for each record in a table is required to display the binary field
images.  Sure seems like a round about way of getting there.  I wonder what
might be involved in changing the image control's datasoure that makes the
approach so indirect?
Thanks again
> Lloyd
> 
Post Reply
Re: Binary Fields
Wed, 9 Apr 2008 20:15:58 -0400
In article <rhowD$gmIHA.468@news-server>, norio@sisna.com says...
> 
> How can the binary fields with the jpg images be individually
> associated with the image controls to display all images?

The easiest way is to load the Form Designer and to use the Property 
Inspector to connect each image object to the appropriate field.

Inside your program, if you have to programmatically change the 
datasource property, you might have to issue a....
   form.rowset.next(0)
...to put the changes into effect.

Jean-Pierre Martel, editor
The dBASE Developers Bulletin
Post Reply
about | contact