Solved

Stored Procs and Azure Mobile Service

Posted on 2014-01-03
6
499 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
Comment Utility
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
Comment Utility
I read this before.  Isn't that example server-side ?
0
 
LVL 16

Expert Comment

by:DcpKing
Comment Utility
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 1

Author Comment

by:Dodsworth
Comment Utility
I dunno.  Hence the question :)
0
 
LVL 1

Accepted Solution

by:
Dodsworth earned 0 total points
Comment Utility
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
Comment Utility
No further comments
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now