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.

How to create a DataWindow - Runtime (PB11)

6 posts in DataWindow Last posting was on 2008-10-24 18:21:09.0Z
O. Steine Posted on 2008-10-24 10:31:44.0Z
From: "O. Steine" <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: How to create a DataWindow - Runtime (PB11)
Lines: 19
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: <4901a410$1@forums-1-dub>
Date: 24 Oct 2008 03:31:44 -0700
X-Trace: forums-1-dub 1224844304 10.22.241.152 (24 Oct 2008 03:31:44 -0700)
X-Original-Trace: 24 Oct 2008 03:31:44 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88026
Article PK: 417281

Hi,

I try to create a datawindow runtime, but I get -1 in returnvalue when
inserting rows.

//Start of code //
long ll_row
datawindow dw_1

dw_1.create('d_objects')
ll_row = dw_1.insertrow(0)
//End of code//

Maybe it's not as easy as I thought?

-O.Steine


Roland Smith [TeamSybase] Posted on 2008-10-24 11:41:44.0Z
From: "Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4901a410$1@forums-1-dub>
Subject: Re: How to create a DataWindow - Runtime (PB11)
Lines: 33
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; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4901b478$1@forums-1-dub>
Date: 24 Oct 2008 04:41:44 -0700
X-Trace: forums-1-dub 1224848504 10.22.241.152 (24 Oct 2008 04:41:44 -0700)
X-Original-Trace: 24 Oct 2008 04:41:44 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88027
Article PK: 417279

I could be that when compiled, the object d_objects is not getting into the
pbd or exe.

Try using a .pbr when compiling your app and include the datawindow like
this:

libname.pbl(d_objects)

"O. Steine" <osteine@gmail.com> wrote in message
news:4901a410$1@forums-1-dub...
> Hi,
>
> I try to create a datawindow runtime, but I get -1 in returnvalue when
> inserting rows.
>
> //Start of code //
> long ll_row
> datawindow dw_1
>
> dw_1.create('d_objects')
> ll_row = dw_1.insertrow(0)
> //End of code//
>
> Maybe it's not as easy as I thought?
>
> -O.Steine
>
>
>


O. Steine Posted on 2008-10-24 12:46:19.0Z
From: "O. Steine" <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4901a410$1@forums-1-dub> <4901b478$1@forums-1-dub>
Subject: Re: How to create a DataWindow - Runtime (PB11)
Lines: 41
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; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4901c39b@forums-1-dub>
Date: 24 Oct 2008 05:46:19 -0700
X-Trace: forums-1-dub 1224852379 10.22.241.152 (24 Oct 2008 05:46:19 -0700)
X-Original-Trace: 24 Oct 2008 05:46:19 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88029
Article PK: 417284

The dataobject 'd_objects' is in the same pbl and this happens when I run
debug as well.

-O.S.
"Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com> skrev i melding
news:4901b478$1@forums-1-dub...

>I could be that when compiled, the object d_objects is not getting into the
>pbd or exe.
>
> Try using a .pbr when compiling your app and include the datawindow like
> this:
>
> libname.pbl(d_objects)
>
>
>
> "O. Steine" <osteine@gmail.com> wrote in message
> news:4901a410$1@forums-1-dub...
>> Hi,
>>
>> I try to create a datawindow runtime, but I get -1 in returnvalue when
>> inserting rows.
>>
>> //Start of code //
>> long ll_row
>> datawindow dw_1
>>
>> dw_1.create('d_objects')
>> ll_row = dw_1.insertrow(0)
>> //End of code//
>>
>> Maybe it's not as easy as I thought?
>>
>> -O.Steine
>>
>>
>>
>
>


fisher Posted on 2008-10-24 12:36:02.0Z
Sender: 52f1.4901c081.1804289383@sybase.com
From: fisher
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: How to create a DataWindow - Runtime (PB11)
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4901c132.5318.1681692777@sybase.com>
References: <4901a410$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 24 Oct 2008 05:36:02 -0700
X-Trace: forums-1-dub 1224851762 10.22.241.41 (24 Oct 2008 05:36:02 -0700)
X-Original-Trace: 24 Oct 2008 05:36:02 -0700, 10.22.241.41
Lines: 34
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88028
Article PK: 417283

Hi
Instead of
> dw_1.create('d_objects')

you should use
dw_1.DataObject ='d_objects'
dw_1.SetTransObject(............


Method You used is to be used with syntax of dw (for example
taken from SyntaxFromSQL) rather then dw name.


Regards

> Hi,
>
> I try to create a datawindow runtime, but I get -1 in
> returnvalue when inserting rows.
>
> //Start of code //
> long ll_row
> datawindow dw_1
>
> dw_1.create('d_objects')
> ll_row = dw_1.insertrow(0)
> //End of code//
>
> Maybe it's not as easy as I thought?
>
> -O.Steine
>
>
>


Chris Pollach Posted on 2008-10-24 18:21:09.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4901a410$1@forums-1-dub> <4901c132.5318.1681692777@sybase.com>
Subject: Re: How to create a DataWindow - Runtime (PB11)
Lines: 46
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.3350
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49021215@forums-1-dub>
Date: 24 Oct 2008 11:21:09 -0700
X-Trace: forums-1-dub 1224872469 10.22.241.152 (24 Oct 2008 11:21:09 -0700)
X-Original-Trace: 24 Oct 2008 11:21:09 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88036
Article PK: 417291

Yep .. that looks like the problem to me! :-)

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

<fisher> wrote in message news:4901c132.5318.1681692777@sybase.com...
> Hi
> Instead of
>> dw_1.create('d_objects')
>
> you should use
> dw_1.DataObject ='d_objects'
> dw_1.SetTransObject(............
>
>
> Method You used is to be used with syntax of dw (for example
> taken from SyntaxFromSQL) rather then dw name.
>
>
> Regards
>
>> Hi,
>>
>> I try to create a datawindow runtime, but I get -1 in
>> returnvalue when inserting rows.
>>
>> //Start of code //
>> long ll_row
>> datawindow dw_1
>>
>> dw_1.create('d_objects')
>> ll_row = dw_1.insertrow(0)
>> //End of code//
>>
>> Maybe it's not as easy as I thought?
>>
>> -O.Steine
>>
>>
>>


Scott Morris Posted on 2008-10-24 12:50:13.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4901a410$1@forums-1-dub>
Subject: Re: How to create a DataWindow - Runtime (PB11)
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4901c485$1@forums-1-dub>
Date: 24 Oct 2008 05:50:13 -0700
X-Trace: forums-1-dub 1224852613 10.22.241.152 (24 Oct 2008 05:50:13 -0700)
X-Original-Trace: 24 Oct 2008 05:50:13 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88030
Article PK: 417286


"O. Steine" <osteine@gmail.com> wrote in message
news:4901a410$1@forums-1-dub...
> Hi,
>
> I try to create a datawindow runtime, but I get -1 in returnvalue when
> inserting rows.
>
> //Start of code //
> long ll_row
> datawindow dw_1
>
> dw_1.create('d_objects')
> ll_row = dw_1.insertrow(0)
> //End of code//
>
> Maybe it's not as easy as I thought?

Might be a bit easier if you read the documentation first. The string that
you pass into the create function must be the syntax for the actual
datawindow - this is what you see when you edit the source of a datawindow.
Since you are unfamiliar with this functionality, you should also be
implementing as much error checking in your code as possible - this means
you should provide a second string argument where you can catch and see any
error messages that are returned from the function. The return value of
the function (which you did not check) will obviously not tell you much when
it fails.

Secondly, you need to be very specific about what you are trying to do.
Most people tend to use the term "datawindow" to refer to both a datawindow
(the thing stored within PB as a datawindow) and a datawindow control (the
graphical element that is placed on a window and to which you assign a
datawindow as the dataobject). It appears here that you might be trying to
dynamically create a datawindow control and assign it a datawindow that has
previously been created and stored in a pbl/pbd. If so, then a quick search
of the newsgroups will lead to more information about dynamically creating
the control - which isn't as straightforward as you are imagining. Perhaps
another thing to keep in mind is that you can easily create a datastore (and
avoid the hassles of creating a graphical control) if you don't need the
user to interact with the data.