Sterling DB Windows mobile 10 support - silverlight

I have a WP8.0 Silverlight app in store. It uses SterlingPhone as DB. I downloaded my app in a Windows Mobile 10 Insider Preview Version (v10.0.10536.1004) and it seems that data is removed after I exit the app.
I am using IsolatedStorageDriver:
Database = _engine.SterlingDatabase.RegisterDatabase<ItemsDatabaseInstance>(new IsolatedStorageDriver());
Has anyone faced this situation? I know Sterling is pretty old, but I think it should continue working on WM10.
In case I have to change to another Database Engine, I'd appreciate suggestions (my Data Model makes it very difficult to work with Sqlite due to nested objects).
EDIT:
Apparently Sterling is unable to find the existing database so recreates it each time the app is relauched.
Isolated storage screenshot

For anybody who found this post with the same issue, the problem lies in changed behaviour for string.GetHashCode on Windows 10 Mobile.
Sterling uses the hashcode of the database name in the path for the database. On Windows 10 Mobile the behaviour has changed and everytime the app is restarted a different hash is calculated and the path changes to the previous database is not found.
To get your app working again, get the SterlingDB code from CodePlex and change the code in the PathProvider class, in the GetDatabasePath method, then recompile your app. You can add a check to see if you are running on WM10 so users on WP8 continue to work with the old database.
The newer version of SterlingDB on GitHub doesn't appear to use the hashcode anymore so should also keep working.

Related

How to force silverlight application to re-download if new version is available on server to prevent any operation on old application by any User

I know silverlight is outdated and Microsoft it self has shutdown further development on it. However I came across one strange & security issue.
Understand the following scenario: I have my silverlight application up & running on hosted server and there are approx 500 user who are using it same time with application version around 192.3XXXX.
Later on I have developed some crucial business functionality and released application on server with version around 192.4XXXX. Next day all 500 user are working on application version 192.4XXXX. and on same day I found that I have made some serious mistake & I have to fix it as soon as possible. so I have applied the fix and released the Application on server with version around 192.5XXXX.
Now here come my Question. How can I enforce this 500 user to use 192.5XXXX at same time. I can not tell each user to reload the app and some of may misuse the application's functionality (as earlier mention, some serious mistake I made in code like showing confrontational data on some form etc. )
How to overcome such situation? Or something like that I can manage from server to force client reload app and download new version.
Thank Your All,
I came up with wonderful solution. I have created one signalR hub and I am broadcasting the message to all connected client to reload the application.
Let me know if anyone want detail description.

Wordpress distributed development and database management

I am looking for a way to handle a distributed development for Wordpress. For the moment I set up a shared git repository on which I have all the code of the website versioned. The problem I'm having regards how to handle the database. Clearly I need our site running while we (me and other developers) improve the website locally. This means that the user of the website (which is not up yet) will be able to modify our database (user registration, etc.) while we are working on the development of the site locally, using a dump of the database.
What I am trying to understand is the best practice to handle a shared development like this, while the site is running and thus the database can change.
Not sure what you develop, theme or plugins but with WordPress the change in the database should not have an effect on your development, unless you set something up where the user can create new custom posts, with that I mean a new "custom post" not a new post based on a custom post, which could potentially change the behavior of what you are developing.
If the user runs into something odd because of what they did, well that's called bug fixing, the good news is that you can just export and import the database to fix whatever they run into.
Database data changes isn't your problem (dump exchange, if needed, solve most)
Changes of structure are another big question, you can try to see (for brain-powered solution) on LiquiBase

Pre populate client database with PhoneGap (primary target Android)

There have been a few articles and questions about how to do this but they all seem to have a bias to iOS.
So first of all I am currently using PhoneGaps database functionality:
http://docs.phonegap.com/en/1.0.0/phonegap_storage_storage.md.html
I have a database I need for the app to run from as it contains a lot of information, probably about 1mb worth (can be exposed as .db/.sql). So I want to be able to make my PhoneGap app and build it for as many platforms as possible. However I want it so that as soon as the user has installed the app it automatically installs the database for them.
Some of the solutions seem to recommend creating the database on first boot, but this just seems a bit hack-ish and sidestepping the problem.
I am more than happy to switch over to use webSQL if Android, iOS and other providers support it, however as PhoneGap wraps any available native OS DB functionality it seemed more realistic that you can get an app to pre-populate an Android database and access it via PhoneGap than pre-populate a web database and access it via webSql.
Hopefully this question makes sense and there have been advances since mid last year, which seems to be the last up to date post on this sort of thing.
I just answered another similar question on this topic. First PhoneGap doesn't implement the Storage function that is documented. In fact we take advantage of the sqlite and localStorage functionality that is implemented in all webkit based browsers.
My recommendation is for you to pre-populate a SQLite DB and on application startup copy the DB to the correct location so your app can access it. There is a good blog post on this topic at:
http://gauravstomar.blogspot.com/2011/08/prepopulate-sqlite-in-phonegap.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+GauravSTomarBootstrappingIntelligence+%28Gaurav+S+Tomar+%3A+Bootstrapping+Intelligence%29

Silverlight 4 Out Of Browser: Check for Updates without installing?

I have created a Silverlight 4 application, that is running out of browser. As you will know, there is a function that is checking if a new version of the app is available and installing it.
But what if I want to only check for the update and not installing it?
Personally, I do not like applications that silently update themselves, downloading something from the internet. So I'd like to have the following mechanism.
- when the app starts, it checks if updates are available
- if so, I show a messagebox to the user, telling her that there is an update and that she can download and installing it via the update-button
- the user can now decide to update
Unfortunately, there seems to be no option to just checking for updates without actually downloading and installing it. Any ideas, how to achieve this?
Thanks in advance,
Frank
You can roll your own update detection, by having a small file on your server next to the XAP for your app, that contains the latest version. For example:
http://localhost/myawesomeapp.xap
http://localhost/myawesomeapp.xap.ver
When you want to check for updates without downloading them, you can always hit the .ver file, check the version listed in it and if newer then the current running app, show the Update button to the user.
Note that this approach also would allow you to create more advanced scenarios, like prompting the user to upgrade to a different version of the app (Pro for example) or that they need to upgrade their Silverlight to get the latest.
And if you have multiple apps, you can list all of them in that file and do cross-promotion between your apps.

Update a local/client Microsoft Access Database from a server (MS SQL Server2005)

I've got a website that runs on a shared hosting environment, using ASP.net 2.0 (C#) and MS SQL Server 2005. I've recently been asked if I can integrate my website with a piece of third party desktop software that uses the Access runtime as its database (transparent to the end user).
Primarily I want to be able to offer users of my website the option of exporting their data into the Access database on their local machine. The data schema's match sufficiently, the question is how to actually do this, and in the simplest way possible for the user.
Simply having a webpage update the local Access database isn't possible due to the obvious security restrictions. I've considered asking them to upload the Access database to the server, so I can migrate the data then allow them to download it again, however the competency of the users of this software is such that even locating the Access database, let alone uploading and downloading it from the website might be too complicated.
I've also considered if Adobe Air or Silverlight could help here, but don't know them well enough to know for sure. Similarly I'm assuming another exe could be written to perform this task that the user could simply download and run, however my experience is in web development, not program development, so this isn't a 100% certainty for me, or an ideal development option for me.
So, can this be done, and if so what technique can achieve this, with the stated aims being ease of use for the end user, followed by ease of development by someone with web development as their main skill. Many thanks!
You may find this answer of interest: Best way to stream files in ASP.NET
It is about transferring a file from the server. You could save Excel or CSV and use that to update Access.
Instead of trying to do this in a web page you might just expose some views from your sql server to some client specific logins.
Then within the Access application, allow them to tie to your sql server. You might even provide an access application for getting the data from your site and stuffing it in their local access database.
In my work we have done something similar that is transparent to the user by creating an ActiveX control. The problem is that you are limiting the users to use only Internet Explorer.
I think that the best way to achieve what you are trying to do is by installing a service in the client's computer. If creating a service is beyond your experience you can post a project in a place like oDesk and find somebody that can help you with the development for the money that you are willing to pay to complete your project.
Good Luck.

Resources