1

I want my WP7 application to fetch data from the DB; so it sends the query as string, the server execute the query, then send the result back.

how can I do that?

whatever you can do for me I am so thankful to you, I appreciate, if you provide any sample code (I am using C#).

thank you,

Regards,

Lena

Lena
  • 11
  • 1

2 Answers2

1

You can use web services (WCF, .asmx, REST, etc. - however you want to build them). However, you should not be sending your query across, that is very bad for security. You should just be passing in parameters to your web service functions.

Charles Boyung
  • 2,464
  • 1
  • 21
  • 31
0

I don't have sample code for it, but for any connected system (client application, mobile app, whatever) your two best choices (In my experience, and depending on needs) are publishing the data source as OData or using some more specific WCF (or other web-type service) service to handle pushing the data back and forth.

Then, to your phone app, the request is basically just a web call.

AllenG
  • 8,112
  • 29
  • 40
  • @Charles Boyung and @AllenG thank you, my DB will be on my laptop and I want just to connect my WP7 app with the DB in my laptop, is there any other way? I don't care about the security right now. thank you again – Lena Jul 18 '11 at 16:50