Solved

Stored Procs and Azure Mobile Service

Posted on 2014-01-03
6
515 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
  • 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Many CHPs use the buzzword ‘Cloud Hosting’ to sell the idea of reliability. Most consumers have the opinion that cloud hosting is easily scalable and can handle just about anything. Further, most CHPs are not transparent and hide the underlying arch…
Learn how the use of a bunch of disparate tools requiring a lot of manual attention led to a series of unfortunate backup events for one company.
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.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

777 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