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.

String + null = ??? PB5 vs. PB10

3 posts in DataWindow Last posting was on 2008-05-15 20:38:25.0Z
scionyx Posted on 2008-05-15 19:45:20.0Z
From: scionyx <sfield@scionyx.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: String + null = ??? PB5 vs. PB10
Date: Thu, 15 May 2008 12:45:20 -0700 (PDT)
Organization: http://groups.google.com
Lines: 25
Message-ID: <dc83c52e-13aa-4d92-9bf8-b009ceeeca4b@w34g2000prm.googlegroups.com>
NNTP-Posting-Host: 158.228.211.10
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1210880721 553 127.0.0.1 (15 May 2008 19:45:21 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 15 May 2008 19:45:21 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: w34g2000prm.googlegroups.com; posting-host=158.228.211.10; posting-account=-kzySgkAAAAqb7jiNSJ1XKXlAz27meBa
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!w34g2000prm.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86857
Article PK: 416115

Migrated app from PBv5 to PBv10.2.1, reports.

Lots of datawindows with selects of the form:
select colum1 + colum2 as text1,...

Where Column1 and 2 are varchar(50).

I would THINK that if either column is null, the result is null, and
would wrap the columns in isNULL() functions, i.e.
select isnull(colum1,'') + isnull(colum2,'') as text1,...

However, in the PB5 app, the string is returned. PB5 is using the MSS
driver against SQL Server 2000.
The PB10 build of the same app returns null, using OLE DB (SQLOLEDB)
driver.

The straight syntax against the database via Query Analyzer or SSMS
returns NULL as expected.

Is this PB5 or driver issue, a databse setting, or am I just crazy?
(IOW, PB5 should NOT have worked! LOL!)

Thanks in adavnce!

Steve


Scott Morris Posted on 2008-05-15 20:21:55.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <dc83c52e-13aa-4d92-9bf8-b009ceeeca4b@w34g2000prm.googlegroups.com>
Subject: Re: String + null = ??? PB5 vs. PB10
Lines: 10
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <482c9b63$1@forums-1-dub>
Date: 15 May 2008 13:21:55 -0700
X-Trace: forums-1-dub 1210882915 10.22.241.152 (15 May 2008 13:21:55 -0700)
X-Original-Trace: 15 May 2008 13:21:55 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86858
Article PK: 416116


> Is this PB5 or driver issue, a databse setting, or am I just crazy?
> (IOW, PB5 should NOT have worked! LOL!)

It is a driver/database setting issue. You can achieve force null
concatenation to work either way via the connection setting
CONCAT_NULL_YIELDS_NULL - if not set, the database option kicks in. The
default DB setting is off; however, odbc and oledb drivers will set this to
ON. Refer to the MS documentation for more information.


scionyx Posted on 2008-05-15 20:38:25.0Z
From: scionyx <sfield@scionyx.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: String + null = ??? PB5 vs. PB10
Date: Thu, 15 May 2008 13:38:25 -0700 (PDT)
Organization: http://groups.google.com
Lines: 20
Message-ID: <e9ec4094-8c38-436f-9faf-6058a7f6767b@j33g2000pri.googlegroups.com>
References: <dc83c52e-13aa-4d92-9bf8-b009ceeeca4b@w34g2000prm.googlegroups.com> <482c9b63$1@forums-1-dub>
NNTP-Posting-Host: 158.228.211.10
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1210883906 30797 127.0.0.1 (15 May 2008 20:38:26 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 15 May 2008 20:38:26 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j33g2000pri.googlegroups.com; posting-host=158.228.211.10; posting-account=-kzySgkAAAAqb7jiNSJ1XKXlAz27meBa
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!j33g2000pri.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86860
Article PK: 416119

Thanks - that helps a lot!

I agree with the idea that the syntax should as if the setting is ON
(normal?), but I have 20K DW objects that would have to be checked.
LOL!

Steve

On May 15, 1:21 pm, "Scott Morris" <bo...@bogus.com> wrote:
> > Is this PB5 or driver issue, a databse setting, or am I just crazy?
> > (IOW, PB5 should NOT have worked! LOL!)
>
> It is a driver/database setting issue.  You can achieve force null
> concatenation to work either way via the connection setting
> CONCAT_NULL_YIELDS_NULL - if not set, the database option kicks in.  The
> default DB setting is off; however, odbc and oledb drivers will set this to
> ON.  Refer to the MS documentation for more information.