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.

PowerBuilder 11.x datastore retrieval issues.

5 posts in DataWindow Last posting was on 2008-11-20 20:58:36.0Z
J. Gloster Posted on 2008-11-20 18:13:28.0Z
Sender: 54e7.49259193.1804289383@sybase.com
From: J. Gloster
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: PowerBuilder 11.x datastore retrieval issues.
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4925a8c8.571b.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 20 Nov 2008 10:13:28 -0800
X-Trace: forums-1-dub 1227204808 10.22.241.41 (20 Nov 2008 10:13:28 -0800)
X-Original-Trace: 20 Nov 2008 10:13:28 -0800, 10.22.241.41
Lines: 64
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88207
Article PK: 417461

Greetings,

I have been using PowerBuilder 8.02 with the PFC's for
several years. I just upgraded to PB 11.5 for an integration
project and am having issues with datastore retrievals. In
PB 8.02 I would declare datastores using "n_ds" but in PB
11.5 I have to use "datastore".

I have code that reads an XML file, using PBDOM, into an
external datawindow. The XML file contains table data from
an external system. As I loop through the populated external
datawindow, I check to see if a particular element on each
row matches an entry in a table in the local database. The
first retrieval of the datastore functions properly. All
subsequent retrieval calls result in a -1 return code. I
have some (partial)example code below:

*******************************************
long ll_ds_rows, ll_dw_rows, ll_dw_loop
string ls_dw_element

//Create the local datastore
datastore lds_table_lookup
lds_table_lookup = Create datastore

lds_table_lookup.DataObject = "d_table_name_lookup"
lds_table_lookup.SetTransObject(SQLCA)

//Loop through the rows in the external datawindow
//dw_xml_raw.
ll_dw_rows = dw_xml_raw.RowCount()

For ll_dw_loop = 1 to ll_dw_rows
GarbageCollect()

ls_dw_element =
dw_xml_raw.Object.xml_tablename[ll_dw_loop]

If trim(ls_dw_element) <> "" Then
ll_ds_rows = lds_table_lookup.Retrieve(ls_dw_element)

//Do some additional code here ....

End If
Next

********************************************

On the first pass, using "Party" as the arguement, it
retrieves fine. On the second pass, using "TelephoneNumber"
as the arguement, it returns -1. If I modify the code not to
retrieve using the first value, "Party", it will retrieve
successfully using "TelephoneNumber". It then fails again
trying to retrieve using the next value in the list.

I had a copy of PB 11.2, and recreated the code in that
version and it fails in the same manner. I've used this
technique in PB 8.02 using the PFC's without any problems.
Unfortunately, PB 8.02 doesn't support PBDOM. Can anyone
give me any deas of what the problem might be?

Thank you in advance.

John


Chris Pollach Posted on 2008-11-20 19:00:10.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4925a8c8.571b.1681692777@sybase.com>
Subject: Re: PowerBuilder 11.x datastore retrieval issues.
Lines: 80
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4925b3ba$1@forums-1-dub>
Date: 20 Nov 2008 11:00:10 -0800
X-Trace: forums-1-dub 1227207610 10.22.241.152 (20 Nov 2008 11:00:10 -0800)
X-Original-Trace: 20 Nov 2008 11:00:10 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88208
Article PK: 417465

Hi John;

You should always use "n_ds"!

What were your issues with n_ds that you experienced?


--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com

<J. Gloster> wrote in message news:4925a8c8.571b.1681692777@sybase.com...
> Greetings,
>
> I have been using PowerBuilder 8.02 with the PFC's for
> several years. I just upgraded to PB 11.5 for an integration
> project and am having issues with datastore retrievals. In
> PB 8.02 I would declare datastores using "n_ds" but in PB
> 11.5 I have to use "datastore".
>
> I have code that reads an XML file, using PBDOM, into an
> external datawindow. The XML file contains table data from
> an external system. As I loop through the populated external
> datawindow, I check to see if a particular element on each
> row matches an entry in a table in the local database. The
> first retrieval of the datastore functions properly. All
> subsequent retrieval calls result in a -1 return code. I
> have some (partial)example code below:
>
> *******************************************
> long ll_ds_rows, ll_dw_rows, ll_dw_loop
> string ls_dw_element
>
> //Create the local datastore
> datastore lds_table_lookup
> lds_table_lookup = Create datastore
>
> lds_table_lookup.DataObject = "d_table_name_lookup"
> lds_table_lookup.SetTransObject(SQLCA)
>
> //Loop through the rows in the external datawindow
> //dw_xml_raw.
> ll_dw_rows = dw_xml_raw.RowCount()
>
> For ll_dw_loop = 1 to ll_dw_rows
> GarbageCollect()
>
> ls_dw_element =
> dw_xml_raw.Object.xml_tablename[ll_dw_loop]
>
> If trim(ls_dw_element) <> "" Then
> ll_ds_rows = lds_table_lookup.Retrieve(ls_dw_element)
>
> //Do some additional code here ....
>
> End If
> Next
>
> ********************************************
>
> On the first pass, using "Party" as the arguement, it
> retrieves fine. On the second pass, using "TelephoneNumber"
> as the arguement, it returns -1. If I modify the code not to
> retrieve using the first value, "Party", it will retrieve
> successfully using "TelephoneNumber". It then fails again
> trying to retrieve using the next value in the list.
>
> I had a copy of PB 11.2, and recreated the code in that
> version and it fails in the same manner. I've used this
> technique in PB 8.02 using the PFC's without any problems.
> Unfortunately, PB 8.02 doesn't support PBDOM. Can anyone
> give me any deas of what the problem might be?
>
> Thank you in advance.
>
> John