PC Review


Reply
Thread Tools Rate Thread

Displaying database fields

 
 
Martin
Guest
Posts: n/a
 
      9th Feb 2004
We are displaying the results of an Access DB from FP
2003. We have two questions:

1. The data type of one field is set to hyperlink. In our
results, how do we display a chosen bitmap (something
like "Go here to see this") instead of just a dull long
text hyperlink?

2. Each result item has a bitmap picture of the product
associated with it. How do we get these pics. to display
in our results. In our DB we have specified the data type
of this bitmap field to OLE - is this correct?

Thanks

Mart
 
Reply With Quote
 
 
 
 
Jim Buyens
Guest
Posts: n/a
 
      9th Feb 2004
>-----Original Message-----
>We are displaying the results of an Access DB from FP
>2003. We have two questions:
>
>1. The data type of one field is set to hyperlink. In our
>results, how do we display a chosen bitmap (something
>like "Go here to see this") instead of just a dull long
>text hyperlink?


You have to create a custom query, and make the SELECT
statement generate an <img> tag. Here's roughly howthis
would look:

SELECT '<a href="' & [fieldwithurl] & '"><img
src="images/gohere.gif"></a>' as mylink, ...

Then, in the finished database results region, right-click
the mylink column, choose Database Column Value
Properties, and select Column Value Contains HTML.

BTW, if you can, make the field containing the hyperlink
an ordinary text field.

>2. Each result item has a bitmap picture of the product
>associated with it. How do we get these pics. to display
>in our results. In our DB we have specified the data type
>of this bitmap field to OLE - is this correct?


Well, it's regrettable, that's for sure.

It's *much* easier if you just store image file names in
the database. Then, you just make a custom query generate
<img> tag, as shown in the answer to your first question.

If other applications require the pictures to actually be
in the database as OLE objects, you'll need to write an
ActiveX control that retrieves the bitmap, and then an ASP
page that calls the ActiveX control and sends the bitmap
to the browser, and then a database query that calls that
ASP page.

For more info, browse MSKB article 175261:
HOWTO: Retrieve Bitmap from Access and Display It in Web
Page
http://support.microsoft.com/default.aspx?scid=kb;en-
us;175261

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------

 
Reply With Quote
 
Martin
Guest
Posts: n/a
 
      10th Feb 2004
Hi Jim

Thanks for the helpful reply. I'm doing this for the
first time so if you don't mind a few more *dumb*
questions:

For the hyperlink substitute, do I create the query in
Access or FP? Also, in Access, I have tried making the
field with the hyperlink a text data type instead of its
present hyperlink type, and then in the Column Value
properties in FP setting it to hyperlink - the results
arrive, but no hyperlink is generated.

To generate the pics., do I literally enter the folder
address for the pics into a field. What data type do I
choose for this field?

I clearly need to go out and buy your book!

Thanks again

Mart



>-----Original Message-----
>>-----Original Message-----
>>We are displaying the results of an Access DB from FP
>>2003. We have two questions:
>>
>>1. The data type of one field is set to hyperlink. In

our
>>results, how do we display a chosen bitmap (something
>>like "Go here to see this") instead of just a dull long
>>text hyperlink?

>
>You have to create a custom query, and make the SELECT
>statement generate an <img> tag. Here's roughly howthis
>would look:
>
>SELECT '<a href="' & [fieldwithurl] & '"><img
>src="images/gohere.gif"></a>' as mylink, ...
>
>Then, in the finished database results region, right-

click
>the mylink column, choose Database Column Value
>Properties, and select Column Value Contains HTML.
>
>BTW, if you can, make the field containing the hyperlink
>an ordinary text field.
>
>>2. Each result item has a bitmap picture of the product
>>associated with it. How do we get these pics. to

display
>>in our results. In our DB we have specified the data

type
>>of this bitmap field to OLE - is this correct?

>
>Well, it's regrettable, that's for sure.
>
>It's *much* easier if you just store image file names in
>the database. Then, you just make a custom query

generate
><img> tag, as shown in the answer to your first question.
>
>If other applications require the pictures to actually

be
>in the database as OLE objects, you'll need to write an
>ActiveX control that retrieves the bitmap, and then an

ASP
>page that calls the ActiveX control and sends the bitmap
>to the browser, and then a database query that calls

that
>ASP page.
>
>For more info, browse MSKB article 175261:
>HOWTO: Retrieve Bitmap from Access and Display It in Web
>Page
>http://support.microsoft.com/default.aspx?scid=kb;en-
>us;175261
>
>Jim Buyens
>Microsoft FrontPage MVP
>http://www.interlacken.com
>Author of:
>*----------------------------------------------------
>|\---------------------------------------------------
>|| Microsoft Office FrontPage 2003 Inside Out
>||---------------------------------------------------
>|| Web Database Development Step by Step .NET Edition
>|| Microsoft FrontPage Version 2002 Inside Out
>|| Faster Smarter Beginning Programming
>|| (All from Microsoft Press)
>|/---------------------------------------------------
>*----------------------------------------------------
>
>.
>

 
Reply With Quote
 
Jim Buyens
Guest
Posts: n/a
 
      10th Feb 2004
"Martin" <(E-Mail Removed)> wrote in message news:<dcfc01c3efaf$5752df30$(E-Mail Removed)>...
> Hi Jim
>
> Thanks for the helpful reply. I'm doing this for the
> first time so if you don't mind a few more *dumb*
> questions:
>
> For the hyperlink substitute, do I create the query in
> Access or FP?


Either way. I think that creating the query in Access is a
bit cleaner and easier to debug, but some people find the
whole idea of queries complex.

Another factor is that on a live site, you may be reluctant
to download the database, add the query, and then upload it.
This would overwrite any activity that occured between the
downlaod and the upload.

> Also, in Access, I have tried making the
> field with the hyperlink a text data type instead of its
> present hyperlink type, and then in the Column Value
> properties in FP setting it to hyperlink - the results
> arrive, but no hyperlink is generated.


Please double-check your work, here. If you right-click a
column such as <<hyper>> in a database results region, choose
Database Column Value Properties, and select Display As Hyperlink,
the DRW should create output like

<a href="[fieldval]">[fieldval]</a>

where [fieldval] represents the value of the field you specified
in the current record.

> To generate the pics., do I literally enter the folder
> address for the pics into a field. What data type do I
> choose for this field?


I usually enter only the picture file name, and not the
path. That way, if the need arises, I can configure one
DRW as

SELECT '<img src="images/' & [picname] & '">', ...

and another as

SELECT '<img src="../images/' & [picname] & '">', ...

> I clearly need to go out and buy your book!


Excellent choice! Thank you.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Reply With Quote
 
Martin
Guest
Posts: n/a
 
      11th Feb 2004
Hi Jim

Going to get your book today! Have more and more need for
something like this.
One last thing: Have decided that instead of having 2
field (pic and link), I'll just have one, the pic. which
also doubles up as a link. Where in Access do I write the
SELECT query you originally suggested.'

Thanks
Mart

>-----Original Message-----
>"Martin" <(E-Mail Removed)> wrote in

message news:<dcfc01c3efaf$5752df30$(E-Mail Removed)>...
>> Hi Jim
>>
>> Thanks for the helpful reply. I'm doing this for the
>> first time so if you don't mind a few more *dumb*
>> questions:
>>
>> For the hyperlink substitute, do I create the query in
>> Access or FP?

>
>Either way. I think that creating the query in Access is

a
>bit cleaner and easier to debug, but some people find the
>whole idea of queries complex.
>
>Another factor is that on a live site, you may be

reluctant
>to download the database, add the query, and then upload

it.
>This would overwrite any activity that occured between

the
>downlaod and the upload.
>
>> Also, in Access, I have tried making the
>> field with the hyperlink a text data type instead of

its
>> present hyperlink type, and then in the Column Value
>> properties in FP setting it to hyperlink - the results
>> arrive, but no hyperlink is generated.

>
>Please double-check your work, here. If you right-click a
>column such as <<hyper>> in a database results region,

choose
>Database Column Value Properties, and select Display As

Hyperlink,
>the DRW should create output like
>
><a href="[fieldval]">[fieldval]</a>
>
>where [fieldval] represents the value of the field you

specified
>in the current record.
>
>> To generate the pics., do I literally enter the folder
>> address for the pics into a field. What data type do I
>> choose for this field?

>
>I usually enter only the picture file name, and not the
>path. That way, if the need arises, I can configure one
>DRW as
>
>SELECT '<img src="images/' & [picname] & '">', ...
>
>and another as
>
>SELECT '<img src="../images/' & [picname] & '">', ...
>
>> I clearly need to go out and buy your book!

>
>Excellent choice! Thank you.
>
>Jim Buyens
>Microsoft FrontPage MVP
>http://www.interlacken.com
>Author of:
>*----------------------------------------------------
>|\---------------------------------------------------
>|| Microsoft Office FrontPage 2003 Inside Out
>||---------------------------------------------------
>|| Web Database Development Step by Step .NET Edition
>|| Microsoft FrontPage Version 2002 Inside Out
>|| Faster Smarter Beginning Programming
>|| (All from Microsoft Press)
>|/---------------------------------------------------
>*----------------------------------------------------
>.
>

 
Reply With Quote
 
Jim Buyens
Guest
Posts: n/a
 
      11th Feb 2004
In Access, you open the database, choose Query from the Insert menu,
and then double-click Design view.

I hope the book works out well for you.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


"Martin" <(E-Mail Removed)> wrote in message news:<e83a01c3f072$7f2efe30$(E-Mail Removed)>...
> Hi Jim
>
> Going to get your book today! Have more and more need for
> something like this.
> One last thing: Have decided that instead of having 2
> field (pic and link), I'll just have one, the pic. which
> also doubles up as a link. Where in Access do I write the
> SELECT query you originally suggested.'
>
> Thanks
> Mart
>
> >-----Original Message-----
> >"Martin" <(E-Mail Removed)> wrote in

> message news:<dcfc01c3efaf$5752df30$(E-Mail Removed)>...
> >> Hi Jim
> >>
> >> Thanks for the helpful reply. I'm doing this for the
> >> first time so if you don't mind a few more *dumb*
> >> questions:
> >>
> >> For the hyperlink substitute, do I create the query in
> >> Access or FP?

> >
> >Either way. I think that creating the query in Access is

> a
> >bit cleaner and easier to debug, but some people find the
> >whole idea of queries complex.
> >
> >Another factor is that on a live site, you may be

> reluctant
> >to download the database, add the query, and then upload

> it.
> >This would overwrite any activity that occured between

> the
> >downlaod and the upload.
> >
> >> Also, in Access, I have tried making the
> >> field with the hyperlink a text data type instead of

> its
> >> present hyperlink type, and then in the Column Value
> >> properties in FP setting it to hyperlink - the results
> >> arrive, but no hyperlink is generated.

> >
> >Please double-check your work, here. If you right-click a
> >column such as <<hyper>> in a database results region,

> choose
> >Database Column Value Properties, and select Display As

> Hyperlink,
> >the DRW should create output like
> >
> ><a href="[fieldval]">[fieldval]</a>
> >
> >where [fieldval] represents the value of the field you

> specified
> >in the current record.
> >
> >> To generate the pics., do I literally enter the folder
> >> address for the pics into a field. What data type do I
> >> choose for this field?

> >
> >I usually enter only the picture file name, and not the
> >path. That way, if the need arises, I can configure one
> >DRW as
> >
> >SELECT '<img src="images/' & [picname] & '">', ...
> >
> >and another as
> >
> >SELECT '<img src="../images/' & [picname] & '">', ...
> >
> >> I clearly need to go out and buy your book!

> >
> >Excellent choice! Thank you.
> >
> >Jim Buyens
> >Microsoft FrontPage MVP
> >http://www.interlacken.com
> >Author of:
> >*----------------------------------------------------
> >|\---------------------------------------------------
> >|| Microsoft Office FrontPage 2003 Inside Out
> >||---------------------------------------------------
> >|| Web Database Development Step by Step .NET Edition
> >|| Microsoft FrontPage Version 2002 Inside Out
> >|| Faster Smarter Beginning Programming
> >|| (All from Microsoft Press)
> >|/---------------------------------------------------
> >*----------------------------------------------------
> >.
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
2007 Merge Fields (database) lock fields after selection VBA Summer Microsoft Word Document Management 0 20th Sep 2007 11:31 AM
Finding and Displaying Fields in a form w/3 fields =?Utf-8?B?UGV0ZSBSb2Nr?= Microsoft Access Getting Started 2 12th Dec 2006 04:22 PM
Q: Displaying computed database fields, gives error on saving... Martin Arvidsson Microsoft C# .NET 9 13th Nov 2006 07:20 PM
Database Fields(Job Title) in Match Fields should appear,Mail Merg =?Utf-8?B?TWF5YSBIb3RlbHMgSW5kaWE=?= Microsoft Outlook Form Programming 7 13th Feb 2006 08:38 PM
displaying fields Rani Microsoft Access Forms 5 3rd Nov 2003 05:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:21 AM.