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.

Implement SetNull() in PB8

3 posts in Objects Last posting was on 2003-03-07 03:58:39.0Z
Vinod Posted on 2003-03-03 17:03:33.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Vinod
Date: Mon, 3 Mar 2003 12:03:33 -0500
Subject: Implement SetNull() in PB8
Lines: 6
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_7402B2C4BE6AF149005DB57385256CDE.005DB58285256CDE@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:7225
Article PK: 734517

Hi,
I am trying to migrate a PB5.0 app to 8. How can I set a structure and
array to NUll in 8.0. PB8 doesn't accept SetNull() function.Is there any
alternate way of doing this?. Thanks in advance

Vinod


Boris Gasin [TeamSybase] Posted on 2003-03-03 23:59:50.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Boris Gasin [TeamSybase]" <NOSPAM_bgasin@dynamictechgroup.com>
Subject: Re: Implement SetNull() in PB8
Date: Mon, 03 Mar 2003 18:59:50 -0500
Organization: Dynamic Technology Group
Reply-To: NO_SPAM_bgasin@dynamictechgroup.com
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 16
NNTP-Posting-Host: bgp491937bgs.verona01.nj.comcast.net 68.37.203.214
Message-ID: <364_u0r76vo3dlmj65vdt4is4uof193hbti9vj@4ax.com>
References: <364_7402B2C4BE6AF149005DB57385256CDE.005DB58285256CDE@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7226
Article PK: 734513


On Mon, 3 Mar 2003 12:03:33 -0500, Vinod wrote:

>Hi,
>I am trying to migrate a PB5.0 app to 8. How can I set a structure and
>array to NUll in 8.0. PB8 doesn't accept SetNull() function.Is there any
>alternate way of doing this?. Thanks in advance
>
>Vinod

Declare a new variable of that structure / array type and assign it to
the old. SetNull probably did not do what was expected anyway.

Boris Gasin [TeamSybase]
mailto:bgasin@dynamictechgroup.com
___
____ _
_____ _
____ _
___


Dynamic Technology Group, Inc.
http://www.dynamictechgroup.com/


Steve_Katz_[TeamSybase] Posted on 2003-03-07 03:58:39.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Steve_Katz_[TeamSybase]
Date: Thu, 6 Mar 2003 22:58:39 -0500
Subject: Re: Implement SetNull() in PB8
Lines: 30
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_EAAE8C838AC8748C0015D91B85256CE2.005E4A5685256CDE@webforums>
References: <364_7402B2C4BE6AF149005DB57385256CDE.005DB58285256CDE@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:7232
Article PK: 734520

>>I am trying to migrate a PB5.0 app to 8. How can I set a structure and
array to NUll in 8.0. PB8 doesn't accept SetNull() function.Is there any
alternate way of doing this?. <<

Where you used to be able to set a structure to null and then do something
like:

if not IsNull (l_structure) then

What you now need to do is set an element in the structure to null (one
that normally would not be null if there were valid data in the structure)
and then code:

if not IsNull (l_structure.key) then


For arrays, you can, as Boris pointed out, set the array to have zero
elements by assigning it to an empty array.

int intArray[]
int emptyIntArray[]
.....
// say intArray now has 105 elements and you want to reset
// it to be empty (have zero elements)
intArray = emptyIntArray

HTH,

steve
[TeamSybase]