I’m porting an app from iPhone to Windows phone 7. The server sends an SQL file (T-SQL queries) with all info. Is there a way to execute these commands inside the SQL CE?
I can parse the sql file as its a flat text file, but I wonder if the sql ce can do it automatically?
There is no direct SQL access in Windows Phone, the only way is to use Linq to SQL!
All database access in Windows Phone is based on generated data models that make tables and their rows into collections of objects.
You can’t even call a method to execute an SQL command, like you would in the desktop with ExecuteNonQuery()
So, seems to me that the only way you will be able to work this out is if you just send the whole SQL Compact database file (*.sdf), save it to the Isolated Storage, and then access it with Linq to SQL, or you’ll have to write some code to parse your SQL file…