?
Solved

Stored Procs and Azure Mobile Service

Posted on 2014-01-03
6
Medium Priority
?
529 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Suggested Courses

764 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