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.

Help required on CIS

2 posts in Windows NT Last posting was on 2000-05-10 17:19:01.0Z
Puvendran Selvaratnam Posted on 2000-03-20 06:45:54.0Z
From: "Puvendran Selvaratnam" <puvendran.selvaratnam@btfinancialgroup.com>
Subject: Help required on CIS
Date: Mon, 20 Mar 2000 17:45:54 +1100
Lines: 26
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <4rM$wijk$GA.201@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: aupozx665.btal.com.au 203.10.111.3
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2402
Article PK: 1089854

Hi,

I am attempting to use CIS for server to server connectivity. So far I have
succeeded in retrieving data from a remote table.

However, I am difficulty setting up remote procedure calls where the call
procedure has a parameter passed and build a table with a result set and
which does NOT include the passed in parameter.

I have setup the procedure in the local server as

sp_addobjectdef
COM_Unitrac_Rpt,"sauafmd56.s95_service_item.dbo.COM_Unitrac_Rpt","rpc"

How should I set up the rpc call to include the parameter - my
interpretation of the doco. was to set up in the same fashion as if it were
a table i.e create existing table.

Your advise including examples would be greatly appreciated.

Thanks

Puvendran


Gordon R Sams Posted on 2000-05-10 17:19:01.0Z
Message-ID: <39199A05.9AD2BF8B@sybase.com>
Date: Wed, 10 May 2000 11:19:01 -0600
From: Gordon R Sams <gsams@sybase.com>
Reply-To: gsams@sybase.com
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Puvendran Selvaratnam <puvendran.selvaratnam@btfinancialgroup.com>
Subject: Re: Help required on CIS
References: <4rM$wijk$GA.201@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 87
NNTP-Posting-Host: gsams-pc2.sybase.com 157.133.215.54
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2186
Article PK: 1089618

Puvendran,

There is a public newsgroup for cis questions, sybase.public.omni. That's why
I had not seen this until now.

The capabilities of what you can do with proxy defs of rpc's depends on what
version of the ASE you are running. 11.5.1 is much more limited than 11.9.2
where a feature was added to accomodate representing parms in the proxy def.
That's covered in the "New Functionality in 11.9.2" in the 11.9.2 doc set in
Chapter 19, "Whats New in CIS". That's available on a public web site. Here's
a URL directly to that doc:

http://sybooks.sybase.com:80/onlinebooks/group-as/asg1192e/asefun92/@Generic__BookView;cs=default;ts=default

11.5.1 is more limited. It's difficult to explain and understand. At the end
of this I'll paste in an email I just sent to someone else on this subject. You
should be aware though that this feature of CIS was designed primarily to
accomodate selecting data from an rpc, and inserting into a table where you can
have the full power of t-sql. The t-sql you can run on a proxy def of an rpc is
very limited. This is not intended to allow all types of sql/queries against a
proxy def of an rpc.

Hope this helps.

Gordon R Sams
Sybase Product Support Engineering
================================

Omni Engineering has informed me the features added in 11.9.2 where never
back-ported to 11.5.1. That means parms can not be represeneted as _col in the
proxy def. However, parms can still be passed, but in a much more limited
fashion. Specifically the parm names in the remote procedure must be the same
as the columns in the table it's accessing, and no additional parms can be
specified unlike in 11.9.2. For example:

Remote server panther1192:
1> create proc myproc @a int as select a, b from mytable where a = @a
2> go
1> myproc 1
2> go
a b
----------- -----------
1 1

(1 row affected)
(return status = 0)

In this example mytable has two columns a and b both int. Notice how the parm
name matches one of the column names. It could also execpt a second parm b, but
not a third parm c.

In the 11.5.1 ASE:
1> sp_addobjectdef rtable, "panther1192.repro.dbo.myproc", "rpc"
2> go
(return status = 0)
1> create existing table rtable (a int, b int)
2> go
1> select a, b from rtable where a = 1
2> go
a b
----------- -----------
1 1

(1 row affected)
1>

This is the only way parms can be passed in 11.5.1 - when the parms in the
remote proc match the column names in the table it's accessing, and the column
names in the proxy def match both.

Puvendran Selvaratnam wrote:

> Hi,
>
> I am attempting to use CIS for server to server connectivity. So far I have
> succeeded in retrieving data from a remote table.
>
> However, I am difficulty setting up remote procedure calls where the call
> procedure has a parameter passed and build a table with a result set and
> which does NOT include the passed in parameter.
>
> I have setup the procedure in the local server as
>
> sp_addobjectdef
> COM_Unitrac_Rpt,"sauafmd56.s95_service_item.dbo.COM_Unitrac_Rpt","rpc"
>
> How should I set up the rpc call to include the parameter - my
> interpretation of the doco. was to set up in the same fashion as if it were
> a table i.e create existing table.
>
> Your advise including examples would be greatly appreciated.
>
> Thanks
>
> Puvendran