views:

444

answers:

2

I have a silverlight application to call the SQL Azure's stored procedure and show the data. I use the service to call stored procedure, and it is working when it is run at VS 2008. But when I integrate in php page, the data is not shown. I think the service is not running.

How can I call SQL Azure stored procedure without using service? I cannot use ADO.Net Entity Domain Model and LINQ to SQL(I don't have permission to access that database in GUI). I cannot connect to SQL Azure, so which method can I use to call SQL Azure stored procedure in silverlight?

Please give me the information.

{I don't know very much about that silverlight. To take the detailes of my project. I want to call SQL Azure's stored procedure. So, I tried to call that Stored Procedure from ADO.Net Entity Domain Model. The problem is I cannot access that SQL Azure database. It show "Buit_in function suer_sname is not supported in this version of SQL server. Therefore, I connect to that Stored Procedure in code beind and call that function in Service and to use that data in presentation layer, I add service reference in silverlight(I mean the service is at the same project). It is perfectly working when it is running at VS. So,I take out xap file and call that xap file in php. The silverlight is running in that PHP page but the data is not shown. I think the service is not hosted. So, how can I solve my problem? I use xampp to run my php page. }

A: 

You say very little, but.... inät silverlight by default only allowed to connect back to the place from where it was loaded? Security issues, you know.

TomTom
I write the details at my post.
sweetsweet
+1  A: 

Hi there,

could you explain a little more about your architecture, in particular the "Service". From memory, you will not be able to call your stored procedure, or any other database function, directly from Silverlight.

When I've built these systems, it's always been through a WCF Service on a server (the Silverlight application runs in the client, and will never have any visibility of the database).

So, if you can design a WCF Service that calls the database, it should not make any difference if the service is being called from Visual Studio, PHP or anything else that can connect the the service.

From reading your question again though, it looks as if your question has already been asked elsewhere: http://social.msdn.microsoft.com/Forums/en/ssdsgetstarted/thread/3fdfff13-3fa5-4cc6-a8e4-5ffe2cf66486

You are trying to call the SQL function "SUSER_SNAME" - this is one of the functions that is not supported in the current version of SQL Azure, hence the error messsage: ""Buit_in function suer_sname is not supported in this version of SQL server."

It can be quite frustrating trying to get SQL Azure running at first, especially if you've originally built to the more fully-featured SQL 2005/2008. However, if you use the SQL Azure Migration Wizard, you will get a more realistic picture of what is involved - http://sqlazuremw.codeplex.com/

Hope this helps

Toby

TobyEvans