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.

New Line

2 posts in Last posting was on 2009-10-02 16:51:08.0Z
Randy Berghefer Posted on 2009-09-30 17:48:02.0Z
From: "Randy Berghefer" <rberghef@iastate.edu>
Newsgroups: sybase.public.powerbuilder.rte
Subject: New Line
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
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: <4ac399d2$1@forums-1-dub>
Date: 30 Sep 2009 10:48:02 -0700
X-Trace: forums-1-dub 1254332882 10.22.241.152 (30 Sep 2009 10:48:02 -0700)
X-Original-Trace: 30 Sep 2009 10:48:02 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:319
Article PK: 791883

I am hoping someone can help me. I am running PB 11.5 build 3050 with a MS
SQL 2005 database. Here is what I am trying to do.



I am trying to replace an InputFieldChangeData with string from the
database. I also have in the string ~r~n characters in the string hoping
that it would add a new line to the rte where the InputField is. The code is
something like this.



SELECT fulladdress INTO :ls_fulladdress FROM clients where clientid =
:ll_clientid

ls_locate = rte_clientform.InputFieldLocate(first!, "referralshipto")

rte_bacti_slant.InputFieldChangeData(ls_locate, ls_fulladdress)



All this does is change the data with the string but does not put in a new
line. Now if is change the code to this it works.



rte_bacti_slant.InputFieldChangeData(ls_locate,"1524 Prairie Drive
~r~nWorthington, MN 56187")



Can someone explain to me why it is not working when I get the same string
from the database?



Thanks

Randy


Chris Pollach Posted on 2009-10-02 16:51:08.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.rte
References: <4ac399d2$1@forums-1-dub>
Subject: Re: New Line
Lines: 71
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
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: <4ac62f7c$1@forums-1-dub>
Date: 2 Oct 2009 09:51:08 -0700
X-Trace: forums-1-dub 1254502268 10.22.241.152 (2 Oct 2009 09:51:08 -0700)
X-Original-Trace: 2 Oct 2009 09:51:08 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:321
Article PK: 761985

Hi Randy;

Yes .. that would be the behaviour that I would expect. The values
between the "" in the PowerScript coded InputFieldChangeData command are
evaluated by the PB compiler and Runtime system. The "~r~n" tilde values are
then translated by PB to the appropriate Char ( ) values for the CR and LF.

You can try substituting ... something like:

String ls_crlf = "~r~n"
Long ll_pos

ll_pos = POS (ls_fulladdress, "~~r~~n", 1) // Extra ~ means use the
real one
IF ll_pos > 0 THEN
<replace the value at the POS counter with ls_crlf>
END IF

HTH

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

"Randy Berghefer" <rberghef@iastate.edu> wrote in message
news:4ac399d2$1@forums-1-dub...
>I am hoping someone can help me. I am running PB 11.5 build 3050 with a MS
>SQL 2005 database. Here is what I am trying to do.
>
>
>
> I am trying to replace an InputFieldChangeData with string from the
> database. I also have in the string ~r~n characters in the string hoping
> that it would add a new line to the rte where the InputField is. The code
> is something like this.
>
>
>
> SELECT fulladdress INTO :ls_fulladdress FROM clients where clientid =
> :ll_clientid
>
> ls_locate = rte_clientform.InputFieldLocate(first!, "referralshipto")
>
> rte_bacti_slant.InputFieldChangeData(ls_locate, ls_fulladdress)
>
>
>
> All this does is change the data with the string but does not put in a new
> line. Now if is change the code to this it works.
>
>
>
> rte_bacti_slant.InputFieldChangeData(ls_locate,"1524 Prairie Drive
> ~r~nWorthington, MN 56187")
>
>
>
> Can someone explain to me why it is not working when I get the same string
> from the database?
>
>
>
> Thanks
>
> Randy
>
>