![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
#3
| |||
| |||
|
|
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? |
#4
| |||
| |||
|
|
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? |
![]() |
| Thread Tools | |
| Display Modes | |
| |