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 specify a port with CT lib / ct_con_props(...CS_SERVERADDR...) errors

2 posts in General Discussion Last posting was on 2013-01-15 20:45:04.0Z
Justin Posted on 2013-01-15 20:39:51.0Z
Sender: 4e50.50f5bcbc.1804289383@sybase.com
From: Justin
Newsgroups: sybase.public.ase.general
Subject: How to specify a port with CT lib / ct_con_props(...CS_SERVERADDR...) errors
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50f5be97.4e89.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 15 Jan 2013 12:39:51 -0800
X-Trace: forums-1-dub 1358282391 172.20.134.41 (15 Jan 2013 12:39:51 -0800)
X-Original-Trace: 15 Jan 2013 12:39:51 -0800, 172.20.134.41
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31652
Article PK: 1159041

Hi all -

What is the preferred mechanism for connecting to a server
with a non-standard port using CT lib? I have tried using,
for example:
ct_connect(connection, "server.name 1234", CS_NULLTERM);
and
ct_con_props(connection, CS_SET, CS_SERVERADDR,
"server.name 1234", CS_NULLTERM, NULL);

The first fails with:
ct_connect(): directory service layer: internal directory
control layer error: Requested server name not found.

The second fails with:
ct_con_props(): user api layer: external error: An
illegal value of 9206 given for parameter property.

This is with ASE 15.5-ebf. Any ideas?

Thanks.


Justin Posted on 2013-01-15 20:45:04.0Z
Sender: 4e50.50f5bcbc.1804289383@sybase.com
From: Justin
Newsgroups: sybase.public.ase.general
Subject: Re: How to specify a port with CT lib / ct_con_props(...CS_SERVERADDR...) errors
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50f5bfd0.4eb9.1681692777@sybase.com>
References: <50f5be97.4e89.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 15 Jan 2013 12:45:04 -0800
X-Trace: forums-1-dub 1358282704 172.20.134.41 (15 Jan 2013 12:45:04 -0800)
X-Original-Trace: 15 Jan 2013 12:45:04 -0800, 172.20.134.41
Lines: 5
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31654
Article PK: 1159042

Naturally, 2 minutes after finally deciding to post to the
newsgroup, I figured out the problem. I was initializing
the context with CS_VERSION_100. Switching to
CS_CURRENT_VERSION did the trick. I hope this helps someone
else.