Displaying database fields

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

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
 
-----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)
|/---------------------------------------------------
*----------------------------------------------------
 
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)
|/---------------------------------------------------
*----------------------------------------------------

.
 
Martin said:
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 ' said:
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)
|/---------------------------------------------------
*----------------------------------------------------
 
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" <[email protected]> wrote in
message news: said:
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 ' said:
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)
|/---------------------------------------------------
*----------------------------------------------------
.
 
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 said:
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" <[email protected]> wrote in
message news: said:
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 ' said:
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)
|/---------------------------------------------------
*----------------------------------------------------
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top