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.

Problem/Bug with SetProperty("DataWindow.Table.Select")

4 posts in DataWindow .NET Last posting was on 2004-12-13 06:11:30.0Z
Jack Addington Posted on 2004-12-09 23:10:34.0Z
From: "Jack Addington" <jaddington@shaw.ca>
Newsgroups: sybase.public.datawindow.net
Subject: Problem/Bug with SetProperty("DataWindow.Table.Select")
Lines: 73
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
X-Original-NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
Message-ID: <41b8db6a$1@forums-1-dub>
Date: 9 Dec 2004 15:10:34 -0800
X-Trace: forums-1-dub 1102633834 68.147.199.171 (9 Dec 2004 15:10:34 -0800)
X-Original-Trace: 9 Dec 2004 15:10:34 -0800, s010600e018e32f17.cg.shawcable.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:953
Article PK: 125378

I am trying to tweak my SQL on the fly and have run into a problem where my
sql references a database function. The SetProperty throws a
MethodFailureException! and tells me there is a problem at line 1, column
821

The error is in the original part of my sql, not the piece I am amending. I
decided to do a test as follows and I get the same error:


string test = ScheduleData.DS.GetProperty("DataWindow.Table.Select");
ScheduleData.DS.SetProperty("DataWindow.Table.Select",test);

I am using the transaction object and Oracle 9i and version 1.0.1 (build
5502) (runtime version v1.1.4322). My sql is basically:

The datawindow works great if I don't do the Get/Set Property.

select a.col1,
b.col2 as coltwo,
some_package.some_function( a.col1 ) as ^col3,
a.col4
from tablea a
where ...

The column 821 is where the ^ is. It doesn't seem to like the new column
name.

Any ideas or workarounds anybody can think of? I am trying to append to the
where clause...


below is the sql string found in the test string. It failes on the 'p' of
' as program_name' in

"select sc.schedule_id,\r\n\t \tsc.schedule_type_code,\r\n \t\t
sc.program_id,\r\n\t\t sc.visit_id,\r\n\t\t sc.procedure_id,\r\n\t\t
sc.subject_id,\r\n\t\t sc.resource_id,\r\n\t\t
sc.override_resource_type_ind,\r\n\t\t sc.site_id,\r\n\t\t
sc.scheduled_date,\r\n\t\t trunc(sc.scheduled_date) as
scheduled_day,\r\n\t\t sc.start_time,\r\n\t\t sc.end_date,\r\n\t\t
sc.end_time,\r\n\t\t sc.scheduled_mins,\r\n\t\t
sc.all_day_event_ind,\r\n\t\t sc.protocal_scheduled_date,\r\n\t\t
sc.subject_booked_ind,\r\n\t\t sc.booked_by_id,\r\n\t\t
sc.completed_ind,\r\n\t\t sc.completed_date,\r\n\t\t
sc.completed_by_user_id,\r\n\t\t sc.cancelled_ind,\r\n\t\t
sc.cancelled_date,\r\n\t\t sc.cancelled_reason_code,\r\n\t\t
sc.parent_schedule_id,\r\n \t\t epm_program_utils.get_program_name(
sc.program_id ) as program_name,\r\n \t\t
epm_program_utils.get_program_name(sc.program_id,'SHORT') as
program_short_name,\r\n\t\t v.visit_number,\r\n \t\t
v.visit_name,\r\n\t\t v.max_window_days,\r\n\t\t p.procedure_name,\r\n\t\t
p.req_resource_type_code,\r\n\t\t s.subject_number,\r\n\t\t
s.subject_contact_id,\r\n\t\t
epm_contact_utils.get_contact_name(s.subject_contact_id,'FULL') as
full_name,\r\n\t\t
epm_contact_utils.get_contact_name(s.subject_contact_id,'SORTED') as
sorted_name,\r\n\t\t
epm_subject_utils.get_subject_name(s.subject_id,'FULL') as
subject_name,\r\n\t\t
epm_subject_utils.get_subject_name(s.subject_id,'SORTED') as
subject_sorted_name,\r\n\t\t
epm_schedule_utils.get_schedule_status(sc.schedule_id,'0') as
schedule_status,\r\n\t\t sc.update_date,\r\n\t\t sc.updator_id,\r\n\t\t
sc.creator_id,\r\n\t\t sc.create_date\r\nfrom epm_schedule
sc,\r\n\t\tepm_subject s,\r\n\t\tepm_visit v,\r\n\t\tepm_procedure p\r\n
where sc.visit_id = v.visit_id\r\n\t and sc.subject_id = s.subject_id\r\n\t
and sc.procedure_id = p.procedure_id (+)\r\n and sc.scheduled_date >=
:ad_start_date\r\n and sc.scheduled_date < :ad_end_date\r\n and
:as_format = :as_format\r\n"


Jim O'Neil [Sybase] Posted on 2004-12-09 23:35:01.0Z
From: "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: Problem/Bug with SetProperty("DataWindow.Table.Select")
Message-ID: <36ohr01089opnhb3utqk5fscasbp76bab1@4ax.com>
References: <41b8db6a$1@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vpn-concord-068.sybase.com
X-Original-NNTP-Posting-Host: vpn-concord-068.sybase.com
Date: 9 Dec 2004 15:35:01 -0800
X-Trace: forums-1-dub 1102635301 158.159.8.68 (9 Dec 2004 15:35:01 -0800)
X-Original-Trace: 9 Dec 2004 15:35:01 -0800, vpn-concord-068.sybase.com
Lines: 79
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:955
Article PK: 125381

Try removing the 'as' from the SQL or using a call to Modify instead
of SetProperty.

On 9 Dec 2004 15:10:34 -0800, "Jack Addington" <jaddington@shaw.ca>

wrote:

>I am trying to tweak my SQL on the fly and have run into a problem where my
>sql references a database function. The SetProperty throws a
>MethodFailureException! and tells me there is a problem at line 1, column
>821
>
>The error is in the original part of my sql, not the piece I am amending. I
>decided to do a test as follows and I get the same error:
>
>
>string test = ScheduleData.DS.GetProperty("DataWindow.Table.Select");
>ScheduleData.DS.SetProperty("DataWindow.Table.Select",test);
>
>I am using the transaction object and Oracle 9i and version 1.0.1 (build
>5502) (runtime version v1.1.4322). My sql is basically:
>
>The datawindow works great if I don't do the Get/Set Property.
>
>select a.col1,
> b.col2 as coltwo,
> some_package.some_function( a.col1 ) as ^col3,
> a.col4
>from tablea a
>where ...
>
>The column 821 is where the ^ is. It doesn't seem to like the new column
>name.
>
>Any ideas or workarounds anybody can think of? I am trying to append to the
>where clause...
>
>
>below is the sql string found in the test string. It failes on the 'p' of
>' as program_name' in
>
>"select sc.schedule_id,\r\n\t \tsc.schedule_type_code,\r\n \t\t
>sc.program_id,\r\n\t\t sc.visit_id,\r\n\t\t sc.procedure_id,\r\n\t\t
>sc.subject_id,\r\n\t\t sc.resource_id,\r\n\t\t
>sc.override_resource_type_ind,\r\n\t\t sc.site_id,\r\n\t\t
>sc.scheduled_date,\r\n\t\t trunc(sc.scheduled_date) as
>scheduled_day,\r\n\t\t sc.start_time,\r\n\t\t sc.end_date,\r\n\t\t
>sc.end_time,\r\n\t\t sc.scheduled_mins,\r\n\t\t
>sc.all_day_event_ind,\r\n\t\t sc.protocal_scheduled_date,\r\n\t\t
>sc.subject_booked_ind,\r\n\t\t sc.booked_by_id,\r\n\t\t
>sc.completed_ind,\r\n\t\t sc.completed_date,\r\n\t\t
>sc.completed_by_user_id,\r\n\t\t sc.cancelled_ind,\r\n\t\t
>sc.cancelled_date,\r\n\t\t sc.cancelled_reason_code,\r\n\t\t
>sc.parent_schedule_id,\r\n \t\t epm_program_utils.get_program_name(
>sc.program_id ) as program_name,\r\n \t\t
>epm_program_utils.get_program_name(sc.program_id,'SHORT') as
>program_short_name,\r\n\t\t v.visit_number,\r\n \t\t
>v.visit_name,\r\n\t\t v.max_window_days,\r\n\t\t p.procedure_name,\r\n\t\t
>p.req_resource_type_code,\r\n\t\t s.subject_number,\r\n\t\t
>s.subject_contact_id,\r\n\t\t
>epm_contact_utils.get_contact_name(s.subject_contact_id,'FULL') as
>full_name,\r\n\t\t
>epm_contact_utils.get_contact_name(s.subject_contact_id,'SORTED') as
>sorted_name,\r\n\t\t
>epm_subject_utils.get_subject_name(s.subject_id,'FULL') as
>subject_name,\r\n\t\t
>epm_subject_utils.get_subject_name(s.subject_id,'SORTED') as
>subject_sorted_name,\r\n\t\t
>epm_schedule_utils.get_schedule_status(sc.schedule_id,'0') as
>schedule_status,\r\n\t\t sc.update_date,\r\n\t\t sc.updator_id,\r\n\t\t
>sc.creator_id,\r\n\t\t sc.create_date\r\nfrom epm_schedule
>sc,\r\n\t\tepm_subject s,\r\n\t\tepm_visit v,\r\n\t\tepm_procedure p\r\n
>where sc.visit_id = v.visit_id\r\n\t and sc.subject_id = s.subject_id\r\n\t
>and sc.procedure_id = p.procedure_id (+)\r\n and sc.scheduled_date >=
>:ad_start_date\r\n and sc.scheduled_date < :ad_end_date\r\n and
>:as_format = :as_format\r\n"
>
>
>


Jack Addington Posted on 2004-12-13 01:38:59.0Z
From: "Jack Addington" <jaddington@shaw.ca>
Newsgroups: sybase.public.datawindow.net
References: <41b8db6a$1@forums-1-dub> <36ohr01089opnhb3utqk5fscasbp76bab1@4ax.com>
Subject: Re: Problem/Bug with SetProperty("DataWindow.Table.Select")
Lines: 98
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
X-Original-NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
Message-ID: <41bcf2b3@forums-1-dub>
Date: 12 Dec 2004 17:38:59 -0800
X-Trace: forums-1-dub 1102901939 68.147.199.171 (12 Dec 2004 17:38:59 -0800)
X-Original-Trace: 12 Dec 2004 17:38:59 -0800, s010600e018e32f17.cg.shawcable.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:1000
Article PK: 125425

My bad!

I had another function call further down the sql that had a quote in it.
The modify bombed on the quote. Its so hard to tell where its failing
because the column number coming back is obviously differented than a string
with hoaky formating characters in (\t\n\r etc).

"Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com> wrote in message
news:36ohr01089opnhb3utqk5fscasbp76bab1@4ax.com...
> Try removing the 'as' from the SQL or using a call to Modify instead
> of SetProperty.
>
> On 9 Dec 2004 15:10:34 -0800, "Jack Addington" <jaddington@shaw.ca>
> wrote:
>
>>I am trying to tweak my SQL on the fly and have run into a problem where
>>my
>>sql references a database function. The SetProperty throws a
>>MethodFailureException! and tells me there is a problem at line 1, column
>>821
>>
>>The error is in the original part of my sql, not the piece I am amending.
>>I
>>decided to do a test as follows and I get the same error:
>>
>>
>>string test = ScheduleData.DS.GetProperty("DataWindow.Table.Select");
>>ScheduleData.DS.SetProperty("DataWindow.Table.Select",test);
>>
>>I am using the transaction object and Oracle 9i and version 1.0.1 (build
>>5502) (runtime version v1.1.4322). My sql is basically:
>>
>>The datawindow works great if I don't do the Get/Set Property.
>>
>>select a.col1,
>> b.col2 as coltwo,
>> some_package.some_function( a.col1 ) as ^col3,
>> a.col4
>>from tablea a
>>where ...
>>
>>The column 821 is where the ^ is. It doesn't seem to like the new column
>>name.
>>
>>Any ideas or workarounds anybody can think of? I am trying to append to
>>the
>>where clause...
>>
>>
>>below is the sql string found in the test string. It failes on the 'p' of
>>' as program_name' in
>>
>>"select sc.schedule_id,\r\n\t \tsc.schedule_type_code,\r\n \t\t
>>sc.program_id,\r\n\t\t sc.visit_id,\r\n\t\t sc.procedure_id,\r\n\t\t
>>sc.subject_id,\r\n\t\t sc.resource_id,\r\n\t\t
>>sc.override_resource_type_ind,\r\n\t\t sc.site_id,\r\n\t\t
>>sc.scheduled_date,\r\n\t\t trunc(sc.scheduled_date) as
>>scheduled_day,\r\n\t\t sc.start_time,\r\n\t\t sc.end_date,\r\n\t\t
>>sc.end_time,\r\n\t\t sc.scheduled_mins,\r\n\t\t
>>sc.all_day_event_ind,\r\n\t\t sc.protocal_scheduled_date,\r\n\t\t
>>sc.subject_booked_ind,\r\n\t\t sc.booked_by_id,\r\n\t\t
>>sc.completed_ind,\r\n\t\t sc.completed_date,\r\n\t\t
>>sc.completed_by_user_id,\r\n\t\t sc.cancelled_ind,\r\n\t\t
>>sc.cancelled_date,\r\n\t\t sc.cancelled_reason_code,\r\n\t\t
>>sc.parent_schedule_id,\r\n \t\t epm_program_utils.get_program_name(
>>sc.program_id ) as program_name,\r\n \t\t
>>epm_program_utils.get_program_name(sc.program_id,'SHORT') as
>>program_short_name,\r\n\t\t v.visit_number,\r\n \t\t
>>v.visit_name,\r\n\t\t v.max_window_days,\r\n\t\t
>>p.procedure_name,\r\n\t\t
>>p.req_resource_type_code,\r\n\t\t s.subject_number,\r\n\t\t
>>s.subject_contact_id,\r\n\t\t
>>epm_contact_utils.get_contact_name(s.subject_contact_id,'FULL') as
>>full_name,\r\n\t\t
>>epm_contact_utils.get_contact_name(s.subject_contact_id,'SORTED') as
>>sorted_name,\r\n\t\t
>>epm_subject_utils.get_subject_name(s.subject_id,'FULL') as
>>subject_name,\r\n\t\t
>>epm_subject_utils.get_subject_name(s.subject_id,'SORTED') as
>>subject_sorted_name,\r\n\t\t
>>epm_schedule_utils.get_schedule_status(sc.schedule_id,'0') as
>>schedule_status,\r\n\t\t sc.update_date,\r\n\t\t sc.updator_id,\r\n\t\t
>>sc.creator_id,\r\n\t\t sc.create_date\r\nfrom epm_schedule
>>sc,\r\n\t\tepm_subject s,\r\n\t\tepm_visit v,\r\n\t\tepm_procedure p\r\n
>>where sc.visit_id = v.visit_id\r\n\t and sc.subject_id =
>>s.subject_id\r\n\t
>>and sc.procedure_id = p.procedure_id (+)\r\n and sc.scheduled_date
>> >=
>>:ad_start_date\r\n and sc.scheduled_date < :ad_end_date\r\n
>>and
>>:as_format = :as_format\r\n"
>>
>>
>>
>


Jim O'Neil [Sybase] Posted on 2004-12-13 06:11:30.0Z
From: "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: Problem/Bug with SetProperty("DataWindow.Table.Select")
Message-ID: <fjcqr0lbo7sh6aeg057at97n21n1mlfs59@4ax.com>
References: <41b8db6a$1@forums-1-dub> <36ohr01089opnhb3utqk5fscasbp76bab1@4ax.com> <41bcf2b3@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vpn-concord-059.sybase.com
X-Original-NNTP-Posting-Host: vpn-concord-059.sybase.com
Date: 12 Dec 2004 22:11:30 -0800
X-Trace: forums-1-dub 1102918290 158.159.8.59 (12 Dec 2004 22:11:30 -0800)
X-Original-Trace: 12 Dec 2004 22:11:30 -0800, vpn-concord-059.sybase.com
Lines: 105
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:1001
Article PK: 125427

If it's any consolation, we're adding more and more 'dot notation'
properties that will hopefully make the rather arcane Modify syntax
less and less required.

On 12 Dec 2004 17:38:59 -0800, "Jack Addington" <jaddington@shaw.ca>

wrote:

>My bad!
>
>I had another function call further down the sql that had a quote in it.
>The modify bombed on the quote. Its so hard to tell where its failing
>because the column number coming back is obviously differented than a string
>with hoaky formating characters in (\t\n\r etc).
>
>
>"Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com> wrote in message
>news:36ohr01089opnhb3utqk5fscasbp76bab1@4ax.com...
>> Try removing the 'as' from the SQL or using a call to Modify instead
>> of SetProperty.
>>
>> On 9 Dec 2004 15:10:34 -0800, "Jack Addington" <jaddington@shaw.ca>
>> wrote:
>>
>>>I am trying to tweak my SQL on the fly and have run into a problem where
>>>my
>>>sql references a database function. The SetProperty throws a
>>>MethodFailureException! and tells me there is a problem at line 1, column
>>>821
>>>
>>>The error is in the original part of my sql, not the piece I am amending.
>>>I
>>>decided to do a test as follows and I get the same error:
>>>
>>>
>>>string test = ScheduleData.DS.GetProperty("DataWindow.Table.Select");
>>>ScheduleData.DS.SetProperty("DataWindow.Table.Select",test);
>>>
>>>I am using the transaction object and Oracle 9i and version 1.0.1 (build
>>>5502) (runtime version v1.1.4322). My sql is basically:
>>>
>>>The datawindow works great if I don't do the Get/Set Property.
>>>
>>>select a.col1,
>>> b.col2 as coltwo,
>>> some_package.some_function( a.col1 ) as ^col3,
>>> a.col4
>>>from tablea a
>>>where ...
>>>
>>>The column 821 is where the ^ is. It doesn't seem to like the new column
>>>name.
>>>
>>>Any ideas or workarounds anybody can think of? I am trying to append to
>>>the
>>>where clause...
>>>
>>>
>>>below is the sql string found in the test string. It failes on the 'p' of
>>>' as program_name' in
>>>
>>>"select sc.schedule_id,\r\n\t \tsc.schedule_type_code,\r\n \t\t
>>>sc.program_id,\r\n\t\t sc.visit_id,\r\n\t\t sc.procedure_id,\r\n\t\t
>>>sc.subject_id,\r\n\t\t sc.resource_id,\r\n\t\t
>>>sc.override_resource_type_ind,\r\n\t\t sc.site_id,\r\n\t\t
>>>sc.scheduled_date,\r\n\t\t trunc(sc.scheduled_date) as
>>>scheduled_day,\r\n\t\t sc.start_time,\r\n\t\t sc.end_date,\r\n\t\t
>>>sc.end_time,\r\n\t\t sc.scheduled_mins,\r\n\t\t
>>>sc.all_day_event_ind,\r\n\t\t sc.protocal_scheduled_date,\r\n\t\t
>>>sc.subject_booked_ind,\r\n\t\t sc.booked_by_id,\r\n\t\t
>>>sc.completed_ind,\r\n\t\t sc.completed_date,\r\n\t\t
>>>sc.completed_by_user_id,\r\n\t\t sc.cancelled_ind,\r\n\t\t
>>>sc.cancelled_date,\r\n\t\t sc.cancelled_reason_code,\r\n\t\t
>>>sc.parent_schedule_id,\r\n \t\t epm_program_utils.get_program_name(
>>>sc.program_id ) as program_name,\r\n \t\t
>>>epm_program_utils.get_program_name(sc.program_id,'SHORT') as
>>>program_short_name,\r\n\t\t v.visit_number,\r\n \t\t
>>>v.visit_name,\r\n\t\t v.max_window_days,\r\n\t\t
>>>p.procedure_name,\r\n\t\t
>>>p.req_resource_type_code,\r\n\t\t s.subject_number,\r\n\t\t
>>>s.subject_contact_id,\r\n\t\t
>>>epm_contact_utils.get_contact_name(s.subject_contact_id,'FULL') as
>>>full_name,\r\n\t\t
>>>epm_contact_utils.get_contact_name(s.subject_contact_id,'SORTED') as
>>>sorted_name,\r\n\t\t
>>>epm_subject_utils.get_subject_name(s.subject_id,'FULL') as
>>>subject_name,\r\n\t\t
>>>epm_subject_utils.get_subject_name(s.subject_id,'SORTED') as
>>>subject_sorted_name,\r\n\t\t
>>>epm_schedule_utils.get_schedule_status(sc.schedule_id,'0') as
>>>schedule_status,\r\n\t\t sc.update_date,\r\n\t\t sc.updator_id,\r\n\t\t
>>>sc.creator_id,\r\n\t\t sc.create_date\r\nfrom epm_schedule
>>>sc,\r\n\t\tepm_subject s,\r\n\t\tepm_visit v,\r\n\t\tepm_procedure p\r\n
>>>where sc.visit_id = v.visit_id\r\n\t and sc.subject_id =
>>>s.subject_id\r\n\t
>>>and sc.procedure_id = p.procedure_id (+)\r\n and sc.scheduled_date
>>> >=
>>>:ad_start_date\r\n and sc.scheduled_date < :ad_end_date\r\n
>>>and
>>>:as_format = :as_format\r\n"
>>>
>>>
>>>
>>
>