Migrating SQL Server CE data to Windows Phone 8.1 - c#

I'm trying to update my Windows Phone app from using Silverlight to Windows Runtime so as to use the new universal application approach.
There's a huge problem though: in Silverlight there is integrated support for SQL Server CE through System.Data.Linq. I like it very much, but apparently this code is not available in Windows Runtime. Actually, there appears to be no native support for any kind of database in WinRT, but people are happy using the sqlite-net NuGet package for this purpose.
So, even if I used sqlite-net, there's still a problem - users will already have the data in SQL Server CE format when the app is updated - how then am I going to convert the data from SQL Server CE to SQLite so that I would be able to access it in Windows Runtime?

It is not possible to do this on a device, so you must move the SQL CE database elsewhere for conversion to sqlite, and the get hold of the converted database and put it back on the device. Some kind of web service should be able to do this non-trivial task.

Related

Database for Windows Phone 8.1 Silverlight

Any good recommendation of database for me to develop in the Windows Phone 8.1 Silverlight? There're SQLite, SQL Server CE 4.0. But I heard some of them still not compatible with the Windows Phone 8.1, so which database I can use for Windows Phone 8.1 Silverlight? And there're any tutorial for me to do the database for the Windows Phone 8.1 Silverlight? Anyone can help me? Please...
If you plan to update your project to universal apps, you should use SQLite because SQL Server CE is not supported in WinRT. Whereas SQLite is supported for both Windows Phone 8.1 and Windows 8.1.
Old question, but I couldn't spare my self.
Don't use sql in WP8(is it even allowed?) and client applications overall, it's bad architechture, really bad and dangerous.
Databases belongs on backends that host Webservices, like forinstance WCF with JSON and/or SOAP. It also lets the backend to the heavy db lifting.
Use Object Relation Models or Entitites for your data you get from the backend, and let the backend do all db magic independent off db type. It makes it so much easier for your client code as well, as you can just bind to these datamodels.
NHibernate is a pretty good provider, and I would reccomend you to have a look at it.
Cheers
Stian

Database to be used in Windows Phone 8

I am a new member in the field of building application in Windows Phone 8. What is/are the database local server to be used in building apps for windows phone 8 devices.
I have did some researched and found out about LINQ to SQL but I am not sure if that will be the one to be used for database connectivity. For example, MySQL to be used for web base system. is LINQ to SQL the same type as MySQL? Thanks in advance
You can Probably use SQLite database which is widely used for Android and IOS also.
Seems similar with this post
linq to sql (Local database for Windows Phone) better ? (OR) A sqlite-net version for mobile better ?? for windows phone 8 local database creation

Windows Form App - Which database type should I use?

I'm hoping someone can help me. I recently started the development of a windows form application connecting to a remote sql server database. I was happy enough developing it until a potential client queried if they would be able to buy the whole application but they do not want the application connecting to the db via the internet.
I predominantly develop websites using php/mysql but migrated to c# for this particular project. I'm familiar with sql but not sure what database I should be using if the client wishes to have the whole application on their own computer. I've considered providing the database install as a pre-requisite when publishing the app (although I'm currently not sure how to do that) but I'm having reservations whether that is suitable or could lead to more problems. I want to create an application that can install to a single computer and has little to no need for administration. Could someone advise the best way to approach the data storage in this instance.
Because you have already a SqlServer database operating on your remote site, the best path should be to use the LocalDB version of SqlServer Express 2012. See this link about deployment.
If you don't use stored procedures, views and triggers then also the SQL CE could be an option, but you will not have file binary compatibility and you should work on importing your schema and data.
SQL CE is a compact light weight way of going..
http://blogs.msdn.com/b/sqlservercompact/archive/2011/01/12/microsoft-sql-server-compact-4-0-is-available-for-download.aspx

C# and remote database connection (using Compact)

I'm developing an application on a Windows CE Platform and this application need a connection to a remote database (Sybase ASE). This remote database is on the internal network.
How can I do this?
It seems that ODBC isn't embedded in the Compact Framework...
The only one solution that I found was to develop an UNIX application that executes my SQL code and send it back to my C# application (using Socket...).
Better idea?
Thanks !
If you have access to IIS, you could create a web service and call that from your Windows CE application. This I think would be cleaner than anything you would do with raw sockets.
I don't know this for a fact, but it is very possible that the DataTable instance could be serialized and a lot of the parsing work would be done for you.
Your web method might be something like this:
DataTable ExecuteQuery(string query);
You might be able to use the ASE ADO.NET Data Provider. I believe it does work with the Compact Framework.
Just curious; doesn't Connecting to an ASA database on Windows CE documentation provide guidance for doing this on Windows CE?

Is there a compact or express SQL Server version that I can package with my WinForms app & is free?

Is there a light weight version of SQL Server I could use that has the characteristics of:
Free (assuming my winforms app is semi-commercial)
Can be seemlessly packaged for deployment as part of the winforms click-once application? (i.e. ease in installation for the user).
Light weight for the user (ideally something that just runs when the winforms application that uses it is running - but better than using XML sererialization for persistance).
Thanks
Yes - SQL Server Compact Edition:
Build embedded database applications for desktops and mobile devices
SQL Server Compact 3.5 is a free, easy-to-use embedded database engine that lets developers build robust Windows Desktop and mobile applications that run on all Windows platforms including Windows XP, Vista, Pocket PC, and Smartphone.
SQL Server CE is a set of DLL's you can ship included in your app.
SQL Server 2008 Express is also free, but it's a stand-alone server installation.
Marc
I don't know about any such (Microsoft) SQL server version. But if I'm in such situation I'll definitely go for SQLite or Firebird
Compact:
- you don't need to change logic of you application;
- MS Sql Management studio could be use to edit,create data structure visually ;)
- deployment, second time deployments more easy :)
SQLite:
- look in google search for the problems:), there lot of people who works with it and have problems, not form begining but during implementation "conctetical" tasks /projects
- no exists native visual interface to work with dbase (exist 3party products for that but they aren't free);
- again 2nd, 3 ... deployments needs more attention,time money :) ...
so, for me is beeter to work with MSSqlCompact, because i am working with .net kind of projects, i have to support my results, i must provide stable application etc...
Best choice is SQLite. There's ADO.NET implementation on .NET so its as easy to use as any other DB. Well, good example is Google Chrome.
There's only one unresolved issue: security. It's a pain to restrict access to SQLite database file as far as I know.

Categories

Resources