Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

sql server - WinRT System.Data - Connect to SQL

Just want to make sure I am not missing something. There does not appear to be a WinRT System.Data. What I am looking for is System.Data.SqlClient to connect to SQL. Can a Metro App connect to SQL? If yes can a Metro App connect to SQL in a App Store compliant manner.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You are correct, System.Data is not there (I looked for the same thing when I first started messing around with WinRT). You won't be able to reference it either. If you want to talk to a SQL database you're going to need to use some kind of other protocol (WebService, SOAP, WCF, etc.).

There are ports for SQLite available that appear to be working which will give you a local DB option but not a server based one without using some kind of middle man to get to the DB.

As a side note, I personally would have liked to have seen a desktop Metro app that could connect to a SQL Express Database for instance but it's not currently in the cards without jumping through hoops.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...