Call Web Api json webservice from SQL Server stored procedure - sql-server

I am trying to find a way to call a web api web service that returns json from a SQL Server stored procedure. I have found ways to call SOAP web services but not web services that return json.
Also the web service requires authentication with username and passwd.
Any ideas?

You can use CLR (Common Language Runtime) SQL Server objects which enables programming in .NET within SQL Server
I used once created and used a CLR split function in SQL Server

Related

Can I register data in SQL Server from an Angular project without using .NET Core?

I want to know if I can capture data from a form made with Angular and save it in a SQL Server table without using .NET Core.
.Net core is not the issueĜŒthe subject is that you required a back end api that save your data on sql server to http requst.
.net core,nodejs,and...

Http Request from Azure SQL Stored Procedure (no CLR)

I'm moving an on-premise SQL Server database to Azure SQL Database.
From inside a stored procedure, we need to make HTTP request.
I had built a CLR assembly to make HTTP request, and all was working well.
From what I understand, CLR Assemblies are not supported by Azure SQL Database.
So I have to find an alternative,
Note that the use of stored procedure is for a legacy app to communicate with our app.
The legacy app cannot make an HTTP request (or the devs don't know how).
So basically it goes like:
Legacy App --> Our Stored Proc --> Our Web App.
I'm looking for the simplest solution for an Azure SQL Database stored procedure to make a call to a Web App.
I would prefer no polling solution, ie: Legacy App insert row, then our Web App pools the database.

SOAP Server Application on Delphi XE8 communicate with SQL database

I have created a SOAP Server Application on Delphi XE8.
I used it as a ISAPI SOAP service, with interface and implementation files.
I deployed this service on IIS, and called it's functions from a VCL client.
I am now trying to make a new function on the SOAP service that communicates with a MSSQL database on the SQL server.
But every time i create a new Data module on the SOAP server, the service stops working.
Can anyone please tell me how to make a database layer, then connect my SOAP service to it, to be able to call from other clients.
Note : I am creating ISAPI.dll
Thanks.

Permissions on SQL Server FILESTREAM

Now I've got a question for you. I'm running a ASP.NET REST Web API using OWIN running as a windows service. Now I've got SQL Server running on a different host, containing a table with binary data and FILESTREAM enabled.
I want to pass this binary data from the web API to the caller. How do I get owin to access SQL Server with credentials that can access the FILESTREAM?
Appreciate your help!

Plain text connection to SQL Server 2005

If I did not want to create SqlConnection and SqlCommand objects etc etc but instead wanted to use only System.Net.WebClient (or some other "essentially plain text" communication) to talk to a SQL Server 2005 or above database, how would I go about connecting, issuing commands and receiving result sets?
I'm assuming I'll need to do a lot of parsing of data to get the structure I'm used to, but how would you go about a "bare-bones" SQL connection?
I recommend you go over Creating an OData API for StackOverflow including XML and JSON in 30 minutes to get a feel of how to add an OData layer to your application.
SqlClient (ie. SqlConnection and SqlCommand) is the bare-bones SQL connection objects. They're the lowest API that offers access to the TDS connections and there is nothing lower than that. Anything bellow this level would mean you'd have to write your own TDS implementation.
There is an alternative way of communicating with SQL Server, namely via HTTP SOAP services, see Overview of Native XML Web Services for Microsoft SQL Server 2005. However, this is
a deprecated feature and it doesn't give you any advantage.
If you want your client to communicate via plain HTTP with a SQL Server, you should place a web service layer to act as a communication mid-tier. Your client would talk to this layer using SOAP or REST, and this layer would talk to SQL in turn using TDS. Luckly there is a way to achieve this with just a few lines of code and a couple of clicks, by deploying an OData service.

Resources