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.

Sending text column in a result row from OpenServer

3 posts in Open Server Last posting was on 2008-12-10 13:15:38.0Z
"Tim Mottershead" <cb.tjm.REMOVE.ME Posted on 2008-11-25 07:29:17.0Z
From: "Tim Mottershead" <cb.tjm.REMOVE.ME@DO.NOT.SPAM.mac.com.>
Newsgroups: sybase.public.connectivity.openserver
Subject: Sending text column in a result row from OpenServer
Lines: 43
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: <492ba94d@forums-1-dub>
Date: 24 Nov 2008 23:29:17 -0800
X-Trace: forums-1-dub 1227598157 10.22.241.152 (24 Nov 2008 23:29:17 -0800)
X-Original-Trace: 24 Nov 2008 23:29:17 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.connectivity.openserver:59
Article PK: 112171

Hi,

I am writing a demo OpenServer application which acts as an auxilliary
server between ASE and another data store. I am a trying to send result
rows back to ASE from the OpenServer in an RPC handler but running into a
few problems with a text column. I understand I need to use a CS_IODESC
structure to describe the text column but am not sure what values to set
'textptr' and 'textptrlen' to. Also 'timestamp' and 'timestamplen'. The
text data only exists in OpenServer transiently: it exists as a CS_CHAR
*results_str after it is retreived from the 3rd party data store and before
I send it back to ASE. The only examples I can find are for a gateway
OpenServer where the CS_IODESC has already been set up via client library
routines. Since my app is auxilliary, it does not need to use any CT lib
routines as the 3rd party store is non CT lib enabled, so I don't have
CS_IODESC set up for me. The text field is the only column I want to
return.

My code does this:

1) sets up a CS_CATAFMT sturcture
2) sets up a CS_IODESC stucture
3) calls srv_descfmt()
4) calls srv_text_info()
5) calls srv_send_text()

Step 5 yields the following error in the OpenServer errorlog:

Nov 24 22:06:02 2008: Sybase Server-Library/15.0/P-EBF15864-15863 ESD #14/PC
Intel/BUILD1500-110/OPT/Sun Jun 01 23:51:51 2008
Nov 24 22:07:11 2008: OSDEMO: INFO: 16204/10/0: srv_text_info(): Bad value
120713 for structure member 'textptrlen'

What should I set 'textptr', 'textptrlen', 'timestamp' and 'timestamplen'
to? Alternatively, I could try returning a varchar colum but my data is
likely to be quite large (it's XML) and I've only been able to return a
varchar column upto 255 charters long. OpenServer complains when trying to
send a varchar column > 255 in length.

As always, your assistance & knowldge is much appreciated!

Tim Mottershead.


Neal Stack [Sybase] Posted on 2008-11-25 15:37:33.0Z
Message-ID: <492C1BBC.1010704@nospam.com>
From: "Neal Stack [Sybase]" <nstack@nospam.com>
User-Agent: Thunderbird 2.0.0.18 (Windows/20081105)
MIME-Version: 1.0
Newsgroups: sybase.public.connectivity.openserver
Subject: Re: Sending text column in a result row from OpenServer
References: <492ba94d@forums-1-dub>
In-Reply-To: <492ba94d@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 25 Nov 2008 07:37:33 -0800
X-Trace: forums-1-dub 1227627453 10.22.241.152 (25 Nov 2008 07:37:33 -0800)
X-Original-Trace: 25 Nov 2008 07:37:33 -0800, vip152.sybase.com
Lines: 17
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.connectivity.openserver:60
Article PK: 112170

Hello,

For this type of architecture, I think your Open Server would need
to act as a client to ASE.

For rows containing less than 100K:
http://infocenter.sybase.com/help/topic/com.sybase.help.sdk_12.5.1.ctref/html/ctref/ctref329.htm
For rows containing more than 100K:
http://infocenter.sybase.com/help/topic/com.sybase.help.sdk_12.5.1.ctref/html/ctref/ctref330.htm

Also consider using the blk_textxfer() routines for efficiency:
http://infocenter.sybase.com/help/topic/com.sybase.help.ocs_12.5.1.comlib/html/comlib/X93934.htm

If this were a gateway Open Server I think you could use the srv_send_text() routine.

Regards,
Neal


Tim Mottershead Posted on 2008-12-10 13:15:38.0Z
From: "Tim Mottershead" <cb.tjm.NO.SPAM@PLEASE.REMOVE.mac.com>
Newsgroups: sybase.public.connectivity.openserver
References: <492ba94d@forums-1-dub> <492C1BBC.1010704@nospam.com>
Subject: Re: Sending text column in a result row from OpenServer
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
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: <493fc0fa$1@forums-1-dub>
Date: 10 Dec 2008 05:15:38 -0800
X-Trace: forums-1-dub 1228914938 10.22.241.152 (10 Dec 2008 05:15:38 -0800)
X-Original-Trace: 10 Dec 2008 05:15:38 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.connectivity.openserver:61
Article PK: 112169

Thanks, Neal.

Regards,

Tim

"Neal Stack [Sybase]" <nstack@nospam.com> wrote in message
news:492C1BBC.1010704@nospam.com...
> Hello,
>
> For this type of architecture, I think your Open Server would need
> to act as a client to ASE.
>
> For rows containing less than 100K:
>
> http://infocenter.sybase.com/help/topic/com.sybase.help.sdk_12.5.1.ctref/html/ctref/ctref329.htm
> For rows containing more than 100K:
>
> http://infocenter.sybase.com/help/topic/com.sybase.help.sdk_12.5.1.ctref/html/ctref/ctref330.htm
>
> Also consider using the blk_textxfer() routines for efficiency:
>
> http://infocenter.sybase.com/help/topic/com.sybase.help.ocs_12.5.1.comlib/html/comlib/X93934.htm
>
> If this were a gateway Open Server I think you could use the
> srv_send_text() routine.
>
> Regards,
> Neal