Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Image, data in a single dw from BLOB

6 posts in DataWindow Last posting was on 2008-09-10 16:32:48.0Z
A N Posted on 2008-09-09 16:40:39.0Z
From: "A N" <amit_nargotra_at_yahoo_dot_com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Image, data in a single dw from BLOB
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c6a707@forums-1-dub>
Date: 9 Sep 2008 09:40:39 -0700
X-Trace: forums-1-dub 1220978439 10.22.241.152 (9 Sep 2008 09:40:39 -0700)
X-Original-Trace: 9 Sep 2008 09:40:39 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87728
Article PK: 416984

I have a table of students

Students
(
studentid number(10) not null <pk>,
studentname varchar2(50) not null,
...,
studentpic blob not null //Stores jpeg/bmp images of students
)

My requirement is to show all columns including picture in a datawindow so
that it has picture, studentid, studentname. How do I achieve this?

--


AN


fisher <fisher_NO Posted on 2008-09-09 17:09:19.0Z
From: fisher <fisher_NO@SPAM_star.wckp.lodz.pl_PLEASE>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Image, data in a single dw from BLOB
References: <48c6a707@forums-1-dub>
In-Reply-To: <48c6a707@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080908-0, 09/08/2008), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c6adbf$1@forums-1-dub>
Date: 9 Sep 2008 10:09:19 -0700
X-Trace: forums-1-dub 1220980159 10.22.241.152 (9 Sep 2008 10:09:19 -0700)
X-Original-Trace: 9 Sep 2008 10:09:19 -0700, vip152.sybase.com
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87729
Article PK: 416985

check bitmap() expression function.
You'll have to save blobs to temporary files though.

A N wrote:
> I have a table of students
>
> Students
> (
> studentid number(10) not null <pk>,
> studentname varchar2(50) not null,
> ....,
> studentpic blob not null //Stores jpeg/bmp images of students
> )
>
> My requirement is to show all columns including picture in a datawindow so
> that it has picture, studentid, studentname. How do I achieve this?
>


A N Posted on 2008-09-10 04:24:17.0Z
From: "A N" <amit_nargotra_at_yahoo_dot_com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48c6a707@forums-1-dub> <48c6adbf$1@forums-1-dub>
Subject: Re: Image, data in a single dw from BLOB
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c74bf1@forums-1-dub>
Date: 9 Sep 2008 21:24:17 -0700
X-Trace: forums-1-dub 1221020657 10.22.241.152 (9 Sep 2008 21:24:17 -0700)
X-Original-Trace: 9 Sep 2008 21:24:17 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87731
Article PK: 416986

What I have done is placed an image outside datawindow and on a clicked
event, use "selectblob" query, retrieve image into a blob variable and set
it to the image value. Dont want to use a temp file though...... Any other
suggestions?

--
AN

"fisher" <fisher_NO@SPAM_star.wckp.lodz.pl_PLEASE> wrote in message
news:48c6adbf$1@forums-1-dub...
> check bitmap() expression function.
> You'll have to save blobs to temporary files though.
>
>
> A N wrote:
>> I have a table of students
>>
>> Students
>> (
>> studentid number(10) not null <pk>,
>> studentname varchar2(50) not null,
>> ....,
>> studentpic blob not null //Stores jpeg/bmp images of students
>> )
>>
>> My requirement is to show all columns including picture in a datawindow
>> so that it has picture, studentid, studentname. How do I achieve this?
>>


Daniel Jenkins Posted on 2008-09-10 05:40:19.0Z
From: Daniel Jenkins <danieldotjenkins@gacworlddotcom.com>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Image, data in a single dw from BLOB
References: <48c6a707@forums-1-dub> <48c6adbf$1@forums-1-dub> <48c74bf1@forums-1-dub>
In-Reply-To: <48c74bf1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c75dc3$1@forums-1-dub>
Date: 9 Sep 2008 22:40:19 -0700
X-Trace: forums-1-dub 1221025219 10.22.241.152 (9 Sep 2008 22:40:19 -0700)
X-Original-Trace: 9 Sep 2008 22:40:19 -0700, vip152.sybase.com
Lines: 11
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87732
Article PK: 416988

Chapter 31 in the PowerBuilder User's Guide might help you. "Using OLE
columns in a DataWindow object"

Daniel.

A N wrote:
> What I have done is placed an image outside datawindow and on a clicked
> event, use "selectblob" query, retrieve image into a blob variable and set
> it to the image value. Dont want to use a temp file though...... Any other
> suggestions?
>


Rolando Gonzalez Posted on 2008-09-10 13:47:18.0Z
From: Rolando Gonzalez <soporte@tecnoclub.net>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Image, data in a single dw from BLOB
References: <48c6a707@forums-1-dub>
In-Reply-To: <48c6a707@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c7cfe6$1@forums-1-dub>
Date: 10 Sep 2008 06:47:18 -0700
X-Trace: forums-1-dub 1221054438 10.22.241.152 (10 Sep 2008 06:47:18 -0700)
X-Original-Trace: 10 Sep 2008 06:47:18 -0700, vip152.sybase.com
Lines: 56
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87734
Article PK: 416989

maybe this can help you, first you might have to create a temp file from
the blob.

This script is not mine, just can't remeber whre I got it, (probably here)
//start Script
//Obtain Image from DB to be used later
//ll_max = dw_wallpapers.GetItemNumber(dw_wallpapers.RowCount(), 2)
// SelectBlob imagen
// into :lblob_imagen
// from imagenes
// Where imagen_ind = :ll_max;
//
// If SQLCA.SQLCode <> 0 then
// messagebox("","Error al recuperar la imagen")
// return
// End if
//
// FileDelete(is_tempfilename + ls_extension)
//
// ll_aux = FileOpen(is_tempfilename + ls_extension, StreamMode!,
Write!, LockWrite!, Replace!)
//
// if ll_aux < 1 then
// messagebox("","Error al crear archivo temporal")
// return
// End if
//
// if FileWriteEx(ll_aux, lblob_imagen) = -1 then
// messagebox("","Error al escribir el archivo")
// return
// End if
//
// FileClose(ll_aux)
//
// p_preview.PictureName = is_tempfilename + ls_extension // You can sub
this line to fit your needs in you app...
//End Script





A N escribió:

> I have a table of students
>
> Students
> (
> studentid number(10) not null <pk>,
> studentname varchar2(50) not null,
> ...,
> studentpic blob not null //Stores jpeg/bmp images of students
> )
>
> My requirement is to show all columns including picture in a datawindow so
> that it has picture, studentid, studentname. How do I achieve this?
>


A N Posted on 2008-09-10 16:32:48.0Z
From: "A N" <amit_nargotra_at_yahoo_dot_com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48c6a707@forums-1-dub> <48c7cfe6$1@forums-1-dub>
Subject: Re: Image, data in a single dw from BLOB
Lines: 66
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c7f6b0@forums-1-dub>
Date: 10 Sep 2008 09:32:48 -0700
X-Trace: forums-1-dub 1221064368 10.22.241.152 (10 Sep 2008 09:32:48 -0700)
X-Original-Trace: 10 Sep 2008 09:32:48 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87737
Article PK: 416994

Thanks for all the responses... Will try it out.

--
AN

"Rolando Gonzalez" <soporte@tecnoclub.net> wrote in message
news:48c7cfe6$1@forums-1-dub...
> maybe this can help you, first you might have to create a temp file from
> the blob.
>
> This script is not mine, just can't remeber whre I got it, (probably here)
> //start Script
> //Obtain Image from DB to be used later
> //ll_max = dw_wallpapers.GetItemNumber(dw_wallpapers.RowCount(), 2)
> // SelectBlob imagen
> // into :lblob_imagen
> // from imagenes
> // Where imagen_ind = :ll_max;
> //
> // If SQLCA.SQLCode <> 0 then
> // messagebox("","Error al recuperar la imagen")
> // return
> // End if
> //
> // FileDelete(is_tempfilename + ls_extension)
> //
> // ll_aux = FileOpen(is_tempfilename + ls_extension, StreamMode!, Write!,
> LockWrite!, Replace!)
> //
> // if ll_aux < 1 then
> // messagebox("","Error al crear archivo temporal")
> // return
> // End if
> //
> // if FileWriteEx(ll_aux, lblob_imagen) = -1 then
> // messagebox("","Error al escribir el archivo")
> // return
> // End if
> //
> // FileClose(ll_aux)
> //
> // p_preview.PictureName = is_tempfilename + ls_extension // You can sub
> this line to fit your needs in you app...
> //End Script
>
>
>
>
>
> A N escribió:
>> I have a table of students
>>
>> Students
>> (
>> studentid number(10) not null <pk>,
>> studentname varchar2(50) not null,
>> ...,
>> studentpic blob not null //Stores jpeg/bmp images of students
>> )
>>
>> My requirement is to show all columns including picture in a datawindow
>> so that it has picture, studentid, studentname. How do I achieve this?
>>