Retrieving data from SQL using a C # Metro application

I am new to programming a Metro application for Win8 using C #. I am already familiar with C #, but when I try to use C # code to connect and retrieve information from an SQL database, this will not work.

The main problem is that I cannot reference "using System.Data/.SqlClient", so I cannot use SqlConnection / DataReader. I could not find a workaround for this.

Edit: during further research, I found out that Windows 8 Apps does not support access to local services (therefore, cannot access local SQL) based on this thread: http://social.msdn.microsoft.com/Forums/en- US / toolsforwinapps / thread / c1c6aa70-5be9-496c-9d2d-a5b0fc0890a9

Does anyone with experience help in the right direction of integrating SQL / Windows 8 applications?

Thank!

0
source share
3 answers

As far as I know, System.Data is not available for Metro applications. If you need to store / retrieve data, you need to either do it in a file (isolated storage) or through a service.

+2
source

You must use sqllite for WinRT, as described here.

http://timheuer.com/blog/

+1
source

, . Metro .

-1

All Articles