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.

How to map datatype between PB components and PJ client

2 posts in General Discussion (old) Last posting was on 2000-03-07 02:11:14.0Z
Stephen Posted on 2000-03-06 23:35:16.0Z
Newsgroups: sybase.public.easerver
From: "Stephen" <skinchu@bn.com>
Organization: 161.221.10.36
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: How to map datatype between PB components and PJ client
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Mon, 06 Mar 2000 18:35:16 -0500
Lines: 49
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_CukigS8h$GA.201@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27036
Article PK: 157974

Hi, there

I'm having problem to map datatype between Jaguar components built by
PowerBuilder and clients by PowerJ. For example, I built a package called sales
and there is a component called n_customer in sales. There is update_data
function in n_customer component using datastore SetChanges() function, and the
code for update_data is something like the followings:
// argument in: Blob ab_changes
ids_data.SetChanges(ab_changes)
ll_rv = ids_data.Update()
IF ll_rv > 0 THEN
its_jag.SetComplete();
ELSE
its_jag.SetAbort();
END IF
RETURN ll_rv

In PowerJ client I code in a update button like the follows:
powersoft.datawindow.Blob lb_changes;
try {
if (dw_1.acceptText() == 1) {
dw_1.getChanges(lb_changes);
n_customer.update_data(lb_changes);
dw_1.resetUpdate();
}
} catch( CTS.PBUserException e ) {
}
}

I got compile error for PJ code as follow:
EX-11 Symbol is not definitely assigned.
SM-4 Symbol name: 'lb_changes'.
SM-5 Symbol type: class powersoft.datawindow.Blob.
SM-6 Symbol defined in: D:\Projects\PowerJ\customerapp\Source\Form1.java(396)
(col 23).
dw_1.getChanges(lb_changes);
OV-6 Method argument(s) do not match those in prototype.
OV-7 Argument types: 'update(powersoft.datawindow.Blob)'.
LK-1 Possible candidate: 'void SurfSideVideoPB.n_customer.update(byte[])'.
SM-6 Symbol defined in: SurfSideVideoPB/n_customer.class.
n_customer.update(lb_changes);
dw_1.resetUpdate();
}
MT-18 'catch' cannot be reached; exception not thrown.
MT-12 Catch type is 'class CTS.PBUserException'.
} catch( CTS.PBUserException e ) {

What is the solution here? I tried to change lb_changes to byte[], but I got
other errors. There used to be some tutorial in SDN, but there are not there
any more.

Thanks for any help.

Stephen

---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Mark Maslow Posted on 2000-03-07 02:11:14.0Z
Newsgroups: sybase.public.easerver
From: "Mark Maslow" <mark.maslow@sierraclub.org>
Subject: Re: How to map datatype between PB components and PJ client
Date: Mon, 6 Mar 2000 18:11:14 -0800
Lines: 82
Organization: Sierra Club
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: machine001.sierraclub.org 207.90.163.1
Message-ID: <347_H8xeLt9h$GA.111@forums.sybase.com>
References: <347_CukigS8h$GA.201@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27015
Article PK: 157956

PJ is expecting a byte array rather than a Blob. So use the getBytes method
to change the Blob to a byte array:

powersoft.datawindow.Blob changes = new powersoft.datawindow.Blob();
byte[] ChgBytes;

dw_ref.getChanges(changes);
chgBytes = changes.getBytes();
dw_Synch.update(chgBytes);

Or just:

dw_Synch.update(changes.getBytes());

Mark Maslow

Stephen <skinchu@bn.com> wrote in message
news:CukigS8h$GA.201@forums.sybase.com...
> Hi, there
>
> I'm having problem to map datatype between Jaguar components built by
> PowerBuilder and clients by PowerJ. For example, I built a package called
sales
> and there is a component called n_customer in sales. There is update_data
> function in n_customer component using datastore SetChanges() function,
and the
> code for update_data is something like the followings:
> // argument in: Blob ab_changes
> ids_data.SetChanges(ab_changes)
> ll_rv = ids_data.Update()
> IF ll_rv > 0 THEN
> its_jag.SetComplete();
> ELSE
> its_jag.SetAbort();
> END IF
> RETURN ll_rv
>
> In PowerJ client I code in a update button like the follows:
> powersoft.datawindow.Blob lb_changes;
> try {
> if (dw_1.acceptText() == 1) {
> dw_1.getChanges(lb_changes);
> n_customer.update_data(lb_changes);
> dw_1.resetUpdate();
> }
> } catch( CTS.PBUserException e ) {
> }
> }
>
> I got compile error for PJ code as follow:
> EX-11 Symbol is not definitely assigned.
> SM-4 Symbol name: 'lb_changes'.
> SM-5 Symbol type: class powersoft.datawindow.Blob.
> SM-6 Symbol defined in:
D:\Projects\PowerJ\customerapp\Source\Form1.java(396)
> (col 23).
> dw_1.getChanges(lb_changes);
> OV-6 Method argument(s) do not match those in prototype.
> OV-7 Argument types: 'update(powersoft.datawindow.Blob)'.
> LK-1 Possible candidate: 'void SurfSideVideoPB.n_customer.update(byte[])'.
> SM-6 Symbol defined in: SurfSideVideoPB/n_customer.class.
> n_customer.update(lb_changes);
> dw_1.resetUpdate();
> }
> MT-18 'catch' cannot be reached; exception not thrown.
> MT-12 Catch type is 'class CTS.PBUserException'.
> } catch( CTS.PBUserException e ) {
>
> What is the solution here? I tried to change lb_changes to byte[], but I
got
> other errors. There used to be some tutorial in SDN, but there are not
there
> any more.
>
> Thanks for any help.
>
> Stephen
>
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp