Monday, March 26, 2012

how to create Extended procdure to invoke a webservice with C#

Hi,
Can anyone help me in creating an Extended procdure that can invoke a webservice with C#.So, I don't know if you want to create an extended proc in C# calling a web-service or if you want to create an extebded proc calling a C# web service.

Anyway, if the former - you can't. Extended stored procs can only be created using C/C++. If the latter, then Books On Line have some documentation of how to do it.

However, if you use SQL 2005 you should not have to use extended stored procedures, you can write your code using C# (or any .NET language) and create the code as "normal" stored procs.

Niels|||You should also consider using SQL Server Integration Services since it has built-in adapters to deal with all sorts of data. You can easily integrate that into your application rather than coding your own proc also.|||Hi,
Thanks for u r valuable suggestions Big Smile. Actually i wanted to call C# web service from a stored procedure. I dont know much about Integration services...will study it for sure. As of now, i call a vb method from the stored procedure using sp_oamethod. Then vb dll calls the C#dll which inturn frames the object and invokes the webservice. so i have just used vb as contact point between stored proc and the c# dll...
Pls post ur valuable suggestions on my work around.

-GSM|||If you are using SQL 2005 you can now write VB.NET/C# code which runs inside the database so you don't have to go through sp_OAxxxx.

Niels|||Hi,
sorry mate...i cannot use sql 2005 and im restricted with sql 2000 only, unfortunately :(. Now im trying to know how to return object or array using sp_OAMethod. Pls post...if u have examples that explains the sp_OAMethod returning object or array. Thank You....

-GSM

No comments:

Post a Comment