Hi,

I'm trying to find out if the Adaptive Server, Speciality Data Store
Developer's Kit is still around in any form? I'm trying to get hold of the
code examples which came with this kit - I believe that there was an
complete example of a file system access SDS. I am having some difficulty
in finding out the relevent information to complete my proof of concept
OpenServer which is, in effect, an SDS. Does anyone know if it still
available or where I might be able to obtain it from?

So far, I have magaged to build a proof-of-concept OpenServer app which
retrieves some data from an external system. I have implemented this using
a registered procedure and calling it as an RPC from ASE. I have mapped a
proxy table to the RPC and have successfully managed to retrieve data using
a simple SELECT without any joins.

1> osdemo...getarticles2 @P_doi='xx.xxx1/x.xxxx-xxxx.2006.01223.x'
2>
mluri doi jid jtl pissn eissn copyright issuedoi volume issue seqiniss
firstpage lastpage
---------------------------------------------------------------
...
--------------------------
XXXXXX/1010061X/2007/20/1/XXX1223/x.xxxx-xxxx.2006.01223.x.xml
xx.xxxx/x.xxxx-xxxx.2006.01223.x
JEB
xxxxxxx
1010-XXXX
1420-XXXX
Copyright XXXXX
xx.xxxx/xxx.2007.20.issue-1
20
1
9
30
33

(1 row affected)
1>


create existing table allarticles2 (
uri varchar(100) not null,
doi varchar(50) null,
jid varchar(10) null,
jtl varchar(100) null,
pissn varchar(15) null,
eissn varchar(15) null,
copyright univarchar(100) null,
issuedoi varchar(50) null,
volume varchar(15) null,
issue varchar(15) null,
seqiniss varchar(15) null,
firstpage varchar(15) null,
lastpage varchar(15) null,
_P_doi varchar(50) null,
_jid varchar(10) null,
_pissn varchar(15) null,
_eissn varchar(15) null,
_volume varchar(15) null,
_issue varchar(15) null
) external procedure at "osdemo...getarticles2"

1> select jid,volume,issue,firstpage from allarticles2 where _P_doi
='10.1111/x.xxxx-xxxx.2006.01223.x'
2>
jid volume issue firstpage
---------- --------------- --------------- ---------------
JEB 20 1 30

(1 row affected)


I can also join from a real user table [create table my_articles (doi
varchar(50) not null)] to the proxy table and select a subset of columns
from the proxy table:

1> select doi, jid,volume,issue,firstpage from allarticles2 ml,
my_articles my where my.doi=ml._P_doi
doi jid volume issue firstpage
-------------------------------- --- ------ ----- ---------
10.1111/j.xxxx-xxxx.2006.01164.x JEB 20 1 1
10.1111/j.xxxx-xxxx.2006.01181.x JEB 20 1 403
10.1111/j.xxxx-xxxx.2006.01183.x JEB 20 1 392
...
10.1111/j.xxxx-xxxx.2006.01232.x JEB 20 1 62
10.1111/j.xxxx-xxxx.2006.01237.x JEB 20 1 22
10.1111/j.xxxx-xxxx.2006.01241.x JEB 20 1 39

(48 rows affected)

However, when I try to select everything from the proxy table, I get the
following error:

1> select ml.* from allarticles2 ml, my_articles my where my.doi=ml._P_doi
2>
Msg 325, Level 18, State 4:
Server 'owldev1', Line 1:
Adaptive Server finds no legal query plan for this statement. If an Abstract
Plan is forcing the query plan, check its correspondence to the query. If
not, please contact Sybase Technical Support.

Is it because I'm trying to select input parameters (e.g. _volume) which I
have not supplied in the where clause? The RPC defines all the parameters
as allowing NULLs, i.e. I am setting datalen to 0 in the call to
srv_regparam() and my proxy table also maps the input parameters as
nullable.

As ever, any help greatly appreciated.

Tim Mottershead