dbTalk Databases Forums  

Extended Stored Procedures in SQL Anywhere 11/Sybase Central?

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Extended Stored Procedures in SQL Anywhere 11/Sybase Central? in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Victor Roman
 
Posts: n/a

Default Extended Stored Procedures in SQL Anywhere 11/Sybase Central? - 08-26-2009 , 10:34 PM






I have created a database using Sybase Central 6 and it is running on SQL
Anywhere Personal Server 11 (Dev Edition). How do I create an extended
stored procedure in my database? I've tried sp_addextendedproc and the
create procedure methods, but the former cannot be found and the latter
results in a syntax error at "as external". Is this not supported in the
version I have?

Reply With Quote
  #2  
Old   
Volker Barth
 
Posts: n/a

Default Re: Extended Stored Procedures in SQL Anywhere 11/Sybase Central? - 08-27-2009 , 02:32 AM






Victor,

what do you mean by "extended stored procedure"?
SA has so called "extended system procedures" - i.e. the builtin
procedures with names starting with "xp_..." like xp_cmdshell or
xp_sendmail. Naturally, you can't add system procedures.

Generally, you will use the CREATE PROCEDURE statement to create procedures.

If you are refering to "external procedures", you might think of:

a) remote procedures (i.e. ones that are defined in a different
database, maybe on a different db server/different dbms)
-> Have a look at the CREATE PROCEDURE ... AT clause and the "Remote
Data Access" topics, e.g.
http://dcx.sybase.com/index.php#http...mni-using.html

b) external procedures (i.e. ones that are not defined as SQL batches
but in different programming languages/environments such as C/C++, Java,
PHP and the like)
-> Have a look at the CREATE PROCEDURE ... EXTERNAL NAME clause
http://dcx.sybase.com/index.php#http...-external.html

HTH
Volker

Victor Roman wrote:
Quote:
I have created a database using Sybase Central 6 and it is running on SQL
Anywhere Personal Server 11 (Dev Edition). How do I create an extended
stored procedure in my database? I've tried sp_addextendedproc and the
create procedure methods, but the former cannot be found and the latter
results in a syntax error at "as external". Is this not supported in the
version I have?


Reply With Quote
  #3  
Old   
Victor Roman
 
Posts: n/a

Default Re: Extended Stored Procedures in SQL Anywhere 11/Sybase Central? - 08-27-2009 , 12:26 PM



Hi Volker,

Thank you for your reply! An extended stored procedure, in SQL Server at
least, can be a system procedure or a reference to a DLL. In my case, I
want to create an extended stored procedure that accesses a DLL so I can
pass into into the DLL via SQL and get the output.

Here's a page from the Adaptive Service Enterprise User Guide that
references what I am talking about:
http://infocenter.sybase.com/help/in...ug/sqlug35.htm
I have tried both the sp_addextendedproc method and "create procedure"
method and both do not work, as I previously described.

Of course I'm using SQL Anywhere Personal Server, so this User Guide doesn't
necessarily apply. Still, my problem is that I want to be able to pass
input into a DLL from SQL and then get the output. Extended stored
procedures was my first guess, since we use them in SQL Server to do exactly
that, but if there is another way to do it I'd happily accept that.

-Victor

"Volker Barth" <No_VBarth (AT) Spam_GLOBAL-FINANZ (DOT) de> wrote

Quote:
Victor,

what do you mean by "extended stored procedure"?
SA has so called "extended system procedures" - i.e. the builtin
procedures with names starting with "xp_..." like xp_cmdshell or
xp_sendmail. Naturally, you can't add system procedures.

Generally, you will use the CREATE PROCEDURE statement to create
procedures.

If you are refering to "external procedures", you might think of:

a) remote procedures (i.e. ones that are defined in a different database,
maybe on a different db server/different dbms)
-> Have a look at the CREATE PROCEDURE ... AT clause and the "Remote Data
Access" topics, e.g.
http://dcx.sybase.com/index.php#http...mni-using.html

b) external procedures (i.e. ones that are not defined as SQL batches but
in different programming languages/environments such as C/C++, Java, PHP
and the like)
-> Have a look at the CREATE PROCEDURE ... EXTERNAL NAME clause
http://dcx.sybase.com/index.php#http...-external.html

HTH
Volker

Victor Roman wrote:
I have created a database using Sybase Central 6 and it is running on SQL
Anywhere Personal Server 11 (Dev Edition). How do I create an extended
stored procedure in my database? I've tried sp_addextendedproc and the
create procedure methods, but the former cannot be found and the latter
results in a syntax error at "as external". Is this not supported in the
version I have?

Reply With Quote
  #4  
Old   
Chis Keating (Sybase iAnywhere)
 
Posts: n/a

Default Re: Extended Stored Procedures in SQL Anywhere 11/Sybase Central? - 08-27-2009 , 02:08 PM



See

http://dcx.sybase.com/index.php#http...un-extlib.html

Victor Roman wrote:
Quote:
Hi Volker,

Thank you for your reply! An extended stored procedure, in SQL Server at
least, can be a system procedure or a reference to a DLL. In my case, I
want to create an extended stored procedure that accesses a DLL so I can
pass into into the DLL via SQL and get the output.

Here's a page from the Adaptive Service Enterprise User Guide that
references what I am talking about:
http://infocenter.sybase.com/help/in...ug/sqlug35.htm
I have tried both the sp_addextendedproc method and "create procedure"
method and both do not work, as I previously described.

Of course I'm using SQL Anywhere Personal Server, so this User Guide doesn't
necessarily apply. Still, my problem is that I want to be able to pass
input into a DLL from SQL and then get the output. Extended stored
procedures was my first guess, since we use them in SQL Server to do exactly
that, but if there is another way to do it I'd happily accept that.

-Victor

"Volker Barth" <No_VBarth (AT) Spam_GLOBAL-FINANZ (DOT) de> wrote in message
news:4a963675$1 (AT) forums-1-dub (DOT) ..
Victor,

what do you mean by "extended stored procedure"?
SA has so called "extended system procedures" - i.e. the builtin
procedures with names starting with "xp_..." like xp_cmdshell or
xp_sendmail. Naturally, you can't add system procedures.

Generally, you will use the CREATE PROCEDURE statement to create
procedures.

If you are refering to "external procedures", you might think of:

a) remote procedures (i.e. ones that are defined in a different database,
maybe on a different db server/different dbms)
-> Have a look at the CREATE PROCEDURE ... AT clause and the "Remote Data
Access" topics, e.g.
http://dcx.sybase.com/index.php#http...mni-using.html

b) external procedures (i.e. ones that are not defined as SQL batches but
in different programming languages/environments such as C/C++, Java, PHP
and the like)
-> Have a look at the CREATE PROCEDURE ... EXTERNAL NAME clause
http://dcx.sybase.com/index.php#http...-external.html

HTH
Volker

Victor Roman wrote:
I have created a database using Sybase Central 6 and it is running on SQL
Anywhere Personal Server 11 (Dev Edition). How do I create an extended
stored procedure in my database? I've tried sp_addextendedproc and the
create procedure methods, but the former cannot be found and the latter
results in a syntax error at "as external". Is this not supported in the
version I have?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.