Solved

Stored Procs and Azure Mobile Service

Posted on 2014-01-03
6
522 Views
Last Modified: 2014-11-12
I have found many examples of using mssql.query in Azure server-side scripts to run stored procedures.

My question is...

Can I call an SP from my client application through Azure Mobile Service ?
0
Comment
Question by:Dodsworth
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 16

Expert Comment

by:DcpKing
ID: 39754963
Yes you can. Brian Hitney of Microsoft explains it here.

 var sql = "exec schema.StoredProcName";
       mssql.query(sql, params,
       {
            success: function(results)   //etc
      }

hth

Mike
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 39756001
I read this before.  Isn't that example server-side ?
0
 
LVL 16

Expert Comment

by:DcpKing
ID: 39756588
It seemed to be client-side, from what he says, but I'll admit, he's not totally explicit.

The point he's really making, I think, is that if you can run a straight T-SQL query, like "select field1, field2 from table1 where field3 is not null", then you can rum a stored procedure in the same way - "exec storedprocedurename", and shows how to give it a parameter (using a placeholder, the "?").

Can you execute straight T-SQL?

Mike
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 1

Author Comment

by:Dodsworth
ID: 39759411
I dunno.  Hence the question :)
0
 
LVL 1

Accepted Solution

by:
Dodsworth earned 0 total points
ID: 39765043
Looks like this is the way to go..

http://www.windowsazure.com/en-us/develop/mobile/tutorials/call-custom-api-dotnet/

Long winded or what ?

an App.MobileService.RunSQLAsync method would be nice :)

Any further thoughts ?
0
 
LVL 1

Author Closing Comment

by:Dodsworth
ID: 39843899
No further comments
0

Featured Post

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question