Showing posts with label invoke. Show all posts
Showing posts with label invoke. Show all posts

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....

-GSMsql

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

Monday, March 19, 2012

How to create a SAPConnection in .Net Code with .NET Data Provider

In the SQL Server Technical Article Microsoft .NET Data Provider for mySAP? Business Suite

is a Code example of how to invoke a BAPI in .Net Code. First line shows how to create a Connection to SAP, but there is no information in which lib the SAPConnection type is stored:

SAPConnection con = new SAPConnection("ASHOST=<SAPserver>; CLIENT=<client>;SYSNR=<sysnr>;USER=<user>;PASSWD=<password>;LANG=<logon

language>");
con.Open();

Does somebody can help me?Assembly Microsoft.Adapter.SAP.SAPProvider|||Correct! That really helped me out! Thanks.

Monday, March 12, 2012

How to create a new Backup device?

How do I create a new Backup device in SQL Server 2005? When I invoke "Back
Up..." from Management, I only get the option to select a file path (under
Select Backup Destionation). The option to select a Backup device is empty
and greyed out.
OlavYou need to create the backup device first. This is under the "Server Objects" folder, or use
sp_addumpdevice directly.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Olav" <x@.y.com> wrote in message news:%234EW0V$WGHA.5012@.TK2MSFTNGP05.phx.gbl...
> How do I create a new Backup device in SQL Server 2005? When I invoke "Back Up..." from
> Management, I only get the option to select a file path (under Select Backup Destionation). The
> option to select a Backup device is empty and greyed out.
> Olav
>

How to create a new Backup device?

How do I create a new Backup device in SQL Server 2005? When I invoke "Back
Up..." from Management, I only get the option to select a file path (under
Select Backup Destionation). The option to select a Backup device is empty
and greyed out.
OlavYou need to create the backup device first. This is under the "Server Object
s" folder, or use
sp_addumpdevice directly.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Olav" <x@.y.com> wrote in message news:%234EW0V$WGHA.5012@.TK2MSFTNGP05.phx.gbl...reen">
> How do I create a new Backup device in SQL Server 2005? When I invoke "Bac
k Up..." from
> Management, I only get the option to select a file path (under Select Back
up Destionation). The
> option to select a Backup device is empty and greyed out.
> Olav
>