Home > Archive > Programming with dBASE > February 2006 > show picture fom rowset









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author show picture fom rowset
John Noble

2006-02-16, 7:23 am

I have a table that contains photos (binary) path (char)

I am trying to link the photo to an image object on a form.

After manually setting the datasource of the image object, I copied the the line of code that assigns the datasource to teh form_on open event.

function form_onOpen
form.rowset.first()
path = form.rowset.fields["path"].value
f = "FILENAME " + path
form.image1.datasource = f
return



Excpet its not working

I get 'unallowed phrase / keyowrd error'.

How do I get round this?

John


*Lysander*

2006-02-16, 7:23 am

John Noble schrieb:

> How do I get round this?


Without knowing exactly I have a strong suspicion that "path" could
be a reserved word.

How about trying something else, like "my_path" instead?

ciao,
André
John Noble

2006-02-16, 7:23 am

*Lysander* Wrote:


> Without knowing exactly I have a strong suspicion that "path" could
> be a reserved word.
>
> How about trying something else, like "my_path" instead?
>

Tried "mypath". Still getting error message though

John
Ken Mayer [dBVIPS]

2006-02-16, 9:23 am

John Noble wrote:
> I have a table that contains photos (binary) path (char)
>
> I am trying to link the photo to an image object on a form.
>
> After manually setting the datasource of the image object, I copied the the line of code that assigns the datasource to teh form_on open event.
>
> function form_onOpen
> form.rowset.first()
> path = form.rowset.fields["path"].value
> f = "FILENAME " + path
> form.image1.datasource = f
> return


Spaces in the path? That's the usual problem. Try:

f = [FILENAME ']+path+[']

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
John Noble

2006-02-16, 11:23 am

Ken Mayer [dBVIPS] Wrote:

>
> Spaces in the path? That's the usual problem. Try:
>
> f = [FILENAME ']+path+[']
>
> Ken


Hi Ken,

Thanks again.

I noticed in your book (top of page 300) it states that you can datalink an image field.

Can you show me how this is done?

BTW, Great Book

John



Ken Mayer [dBVIPS]

2006-02-17, 7:24 am

John Noble wrote:
> Ken Mayer [dBVIPS] Wrote:
>
>
>
>
> Hi Ken,
>
> Thanks again.
>
> I noticed in your book (top of page 300) it states that you can datalink an image field.
>
> Can you show me how this is done?


Set the dataSource of the image object to the field like you would a
dataLink for other controls.

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com