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.

Modify query for nested DW on composite

6 posts in DataWindow Last posting was on 2009-06-19 15:44:24.0Z
Daniel Posted on 2009-06-10 18:50:27.0Z
Sender: 48cc.4a2ffabc.1804289383@sybase.com
From: Daniel
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Modify query for nested DW on composite
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a300073.496c.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Jun 2009 11:50:27 -0700
X-Trace: forums-1-dub 1244659827 10.22.241.41 (10 Jun 2009 11:50:27 -0700)
X-Original-Trace: 10 Jun 2009 11:50:27 -0700, 10.22.241.41
Lines: 44
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89462
Article PK: 418653

Hi guys,

I have a report that needs to work both on both SQL Server
and Oracle. I'm using PB8.
One of the fields in my table has a varchar(2500)
definition, so I'm defining it in the select clause as
"convert(text, my_column)", so that when I edit the DW, it
doesn't change the column to varchar(255).

The report is like this:
If the user chooses some arguments, then the report is a
simple one, and I replace the "convert(text, my_column)" on
Oracle to simply "my_column", and it works fine;

Another time, my report will be a bit more complex, and I'll
have to use a composite with 10 nested DWs on it, and
there's where I can't get it to work. I have to remove the
"convert" in the 10 nesteds when it's Oracle. This is how I
have tried:

1) Do the GetChilds and change the select on them.
1.1) Doesn't work because when I do a child.modify, it pops
up the invalid column message (it's the one you get if you
use "convert(text, column)" in oracle);

2) Create 1 dataStore for each nested, change the select on
them and retrieve them, and then use the
composite.object.nested[1].object.data =
datastore.object.data
2.1) Doesn't work because I have to do a
composite.insertRow() first, and when I do that, I get the
same invalid column error;

3) Changing directly the select on the nested, like
composite.object.nested.object.datawindow.table.select =
new_sql
3.1) Got a "error acessing external object property object
at line..."

Do you guys have other ideas? I know I can duplicate all my
10 nested, and create a composite por SQL and another for
Oracle, but the maintenance on that will be a lot harder.

Thank you all!


"Paul Horan[Sybase]" <phoran_remove Posted on 2009-06-10 23:59:46.0Z
From: "Paul Horan[Sybase]" <phoran_remove@remove_sybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a300073.496c.1681692777@sybase.com>
Subject: Re: Modify query for nested DW on composite
Lines: 55
Organization: Sybase
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.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a3048f2$1@forums-1-dub>
Date: 10 Jun 2009 16:59:46 -0700
X-Trace: forums-1-dub 1244678386 10.22.241.152 (10 Jun 2009 16:59:46 -0700)
X-Original-Trace: 10 Jun 2009 16:59:46 -0700, vip152.sybase.com
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89465
Article PK: 418656

Why not just have two versions of the datawindow? One for "simple" and one
for "complex"? Swap them out at runtime with dw_1.dataobject =
"d_complex"...

--
Paul Horan[Sybase]
http://blogs.sybase.com/phoran/

<Daniel> wrote in message news:4a300073.496c.1681692777@sybase.com...
> Hi guys,
>
> I have a report that needs to work both on both SQL Server
> and Oracle. I'm using PB8.
> One of the fields in my table has a varchar(2500)
> definition, so I'm defining it in the select clause as
> "convert(text, my_column)", so that when I edit the DW, it
> doesn't change the column to varchar(255).
>
> The report is like this:
> If the user chooses some arguments, then the report is a
> simple one, and I replace the "convert(text, my_column)" on
> Oracle to simply "my_column", and it works fine;
>
> Another time, my report will be a bit more complex, and I'll
> have to use a composite with 10 nested DWs on it, and
> there's where I can't get it to work. I have to remove the
> "convert" in the 10 nesteds when it's Oracle. This is how I
> have tried:
>
> 1) Do the GetChilds and change the select on them.
> 1.1) Doesn't work because when I do a child.modify, it pops
> up the invalid column message (it's the one you get if you
> use "convert(text, column)" in oracle);
>
> 2) Create 1 dataStore for each nested, change the select on
> them and retrieve them, and then use the
> composite.object.nested[1].object.data =
> datastore.object.data
> 2.1) Doesn't work because I have to do a
> composite.insertRow() first, and when I do that, I get the
> same invalid column error;
>
> 3) Changing directly the select on the nested, like
> composite.object.nested.object.datawindow.table.select =
> new_sql
> 3.1) Got a "error acessing external object property object
> at line..."
>
> Do you guys have other ideas? I know I can duplicate all my
> 10 nested, and create a composite por SQL and another for
> Oracle, but the maintenance on that will be a lot harder.
>
> Thank you all!


Daniel Posted on 2009-06-12 13:12:20.0Z
Sender: 48cc.4a2ffabc.1804289383@sybase.com
From: Daniel
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Modify query for nested DW on composite
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a325434.1091.1681692777@sybase.com>
References: <4a3048f2$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 12 Jun 2009 06:12:20 -0700
X-Trace: forums-1-dub 1244812340 10.22.241.41 (12 Jun 2009 06:12:20 -0700)
X-Original-Trace: 12 Jun 2009 06:12:20 -0700, 10.22.241.41
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89475
Article PK: 418666

Hi Paul,
I'm doing that. The "simple" one is working fine, the
problem is that the "complex" one must also work for both
SQLServer and Oracle. That one has about 10 nested that I'm
trying to avoid duplicating.
Thanks

> Why not just have two versions of the datawindow? One for
> "simple" and one for "complex"? Swap them out at runtime
> with dw_1.dataobject = "d_complex"...


M. Searer Posted on 2009-06-11 16:25:33.0Z
From: "M. Searer" <nospam@nospam.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a300073.496c.1681692777@sybase.com>
In-Reply-To: <4a300073.496c.1681692777@sybase.com>
Subject: Re: Modify query for nested DW on composite
Lines: 50
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a312ffd$1@forums-1-dub>
Date: 11 Jun 2009 09:25:33 -0700
X-Trace: forums-1-dub 1244737533 10.22.241.152 (11 Jun 2009 09:25:33 -0700)
X-Original-Trace: 11 Jun 2009 09:25:33 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89469
Article PK: 418661

apparently you are using the old mss driver which doesn't support varchar(2500).

Use oledb instead, so you can use the same sql for both oracle and ms sql.

"Daniel" wrote in message news:4a300073.496c.1681692777@sybase.com...
> Hi guys,
>
> I have a report that needs to work both on both SQL Server
> and Oracle. I'm using PB8.
> One of the fields in my table has a varchar(2500)
> definition, so I'm defining it in the select clause as
> "convert(text, my_column)", so that when I edit the DW, it
> doesn't change the column to varchar(255).
>
> The report is like this:
> If the user chooses some arguments, then the report is a
> simple one, and I replace the "convert(text, my_column)" on
> Oracle to simply "my_column", and it works fine;
>
> Another time, my report will be a bit more complex, and I'll
> have to use a composite with 10 nested DWs on it, and
> there's where I can't get it to work. I have to remove the
> "convert" in the 10 nesteds when it's Oracle. This is how I
> have tried:
>
> 1) Do the GetChilds and change the select on them.
> 1.1) Doesn't work because when I do a child.modify, it pops
> up the invalid column message (it's the one you get if you
> use "convert(text, column)" in oracle);
>
> 2) Create 1 dataStore for each nested, change the select on
> them and retrieve them, and then use the
> composite.object.nested[1].object.data =
> datastore.object.data
> 2.1) Doesn't work because I have to do a
> composite.insertRow() first, and when I do that, I get the
> same invalid column error;
>
> 3) Changing directly the select on the nested, like
> composite.object.nested.object.datawindow.table.select =
> new_sql
> 3.1) Got a "error acessing external object property object
> at line..."
>
> Do you guys have other ideas? I know I can duplicate all my
> 10 nested, and create a composite por SQL and another for
> Oracle, but the maintenance on that will be a lot harder.
>
> Thank you all!


Daniel Posted on 2009-06-12 13:14:39.0Z
Sender: 48cc.4a2ffabc.1804289383@sybase.com
From: Daniel
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Modify query for nested DW on composite
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a3254bf.109d.1681692777@sybase.com>
References: <4a312ffd$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 12 Jun 2009 06:14:39 -0700
X-Trace: forums-1-dub 1244812479 10.22.241.41 (12 Jun 2009 06:14:39 -0700)
X-Original-Trace: 12 Jun 2009 06:14:39 -0700, 10.22.241.41
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89476
Article PK: 418667

Hi!
If I change to OLEDB on my development environment, will
that be enough? Or would I have to change it also on all my
customers? That would be "painful". Thank you!!

> apparently you are using the old mss driver which doesn't
> support varchar(2500).
>
> Use oledb instead, so you can use the same sql for both
> oracle and ms sql.


M. Searer Posted on 2009-06-19 15:44:24.0Z
From: "M. Searer" <nospam@nospam.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a312ffd$1@forums-1-dub> <4a3254bf.109d.1681692777@sybase.com>
In-Reply-To: <4a3254bf.109d.1681692777@sybase.com>
Subject: Re: Modify query for nested DW on composite
Lines: 17
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a3bb258@forums-3-dub.sybase.com>
Date: 19 Jun 2009 08:44:24 -0700
X-Trace: forums-3-dub.sybase.com 1245426264 10.22.241.152 (19 Jun 2009 08:44:24 -0700)
X-Original-Trace: 19 Jun 2009 08:44:24 -0700, vip152.sybase.com
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89526
Article PK: 418718

customers too.

painful?
If they installed the SQL 2000 or newer sql server client, then they have everything installed already.
it is just a change that you do in the connection setup within your program.

"Daniel" wrote in message news:4a3254bf.109d.1681692777@sybase.com...
> Hi!
> If I change to OLEDB on my development environment, will
> that be enough? Or would I have to change it also on all my
> customers? That would be "painful". Thank you!!
>
>> apparently you are using the old mss driver which doesn't
>> support varchar(2500).
>>
>> Use oledb instead, so you can use the same sql for both
>> oracle and ms sql.