SQLite WinRT empowers Windows and Windows Phone developers to build mobile enterprise apps using Windows Runtime (WinRT) APIs to work with the world’s most popular mobile database.
SQLite advantages include cross-platform (OS + Processor) support, speed, ACID reliability, and support for indexes, views, foreign keys, and triggers. Developers of SQLite apps on iPhones, iPads and Android devices will feel right at home programming against the SQLite WinRT APIs since they provide just a thin layer around familiar SQLite functions.
To get started with the installation, you need to get the SQLite Extension SDK downloaded and working with Visual Studio. From within Visual Studio, go to the menu and select Tools | Extensions and Updates. From the dialog that appears, expand the Online tree view node on the left and then type SQLite in the search box on the right and hit enter. You’ll be shown a list of search results as shown in the figure below:
Click Download for both SQLite for Windows Runtime and SQLite for Windows Phone so you’ll be ready to develop across all platforms. The VSIX Installer dialog will pop up during both downloads and you’ll need to click Install for each. Click the Restart Now button at the bottom of the dialog so that the changes will take effect. This gets the SQLite3.dll native library installed and Visual Studio will notify you whenever future updates are available. Keep in mind that future versions will prevent your existing Visual Studio projects from opening due to file path changes because of new version numbers. You simply need to update the reference in your project file each time you choose to work with newer versions of SQLite.
The next step in the installation process is to download the SQLite WinRT source code from http://sqlwinrt.codeplex.com/. On the CodePlex site, click the Source Code tab, and then click the Download icon to download the zip file. When you extract the zip file, you’ll see a Visual Studio solution with a project for Windows and another project for Windows Phone.
Create a new Windows Phone App project in Visual Studio and target Windows Phone 8.0. Once the empty project has opened, go to the Solution Explorer and right click on the Solution then select Add | Existing Project. When the file dialog pops up, navigate to the SQLiteWinRTPhone folder within the extracted files you downloaded and select SQLiteWinRTPhone.vcxproj to add the project to your solution. From the Phone solution, right click on References and select Add Reference. In the Reference Manager dialog, expand the Solution node on the left to show Projects. Check the checkbox for SQLiteWinRTPhone and click OK. Save and rebuild the solution to ensure everything installed properly and then you’re ready to go.
Create a new Windows Store App project in Visual Studio. Once the empty project has opened, go to the Solution Explorer and right click on the Solution then select Add | Existing Project. When the file dialog pops up, navigate to the SQLiteWinRT folder within the extracted files you downloaded and select SQLiteWinRT.vcxproj to add the project to your solution. From the Windows Store solution, right click on References and select Add Reference. In the Reference Manager dialog, expand the Solution node on the left to show Projects. Check the checkbox for SQLiteWinRT and click OK. Save and rebuild the solution to ensure everything installed properly and you’re all set.
With the installation steps complete, you’re now ready to begin developing apps for Windows Phones, Tablets, Laptops, and Desktops. In my next SQLite article I’ll get you started with basic Data Definition Language (DDL) tasks.
This afternoon at TechEd Europe 2013 in Madrid, I’ll be finishing the day with my session, “All Aboard for the Future of HTML5 Mobile and Hybrid Web Apps for Windows Phone 8 and Windows Tablets” at 17:00 in room N102.
I hope to see you there!
Wow, ”Keeping Windows 8 Tablets in Sync with SQL Server 2012″ has already surged up to be the number one Kindle book in the Microsoft Mobile and Tablet category! Couldn’t be happier. I appreciate the support.
For all you tech readers that like to keep your books digital, I’m happy to announce my new book “Keeping Windows 8 Tablets in Sync with SQL Server 2012″ is available on the Kindle.
For just $9.99 USD, you can learn how to rapidly virtualize your data sync infrastructure for private, public, or hybrid cloud scenarios. Building on that, the book shows you how leverage Microsoft’s data sync technologies and mobile database to avoid writing thousands of lines of unnecessary code. Lastly, you get to combine your existing desktop .NET development skills with Modern UI concepts to port existing or create new Windows 8 tablet apps for the enterprise.
The eBook is available globally through Amazon including:
- India – $6.99
- UK – £7.20
- Germany – €8,23
- France – €8,23
- Spain – €8,23
- Italy – €7.99
- Japan – ¥1004
- Brazil – R$21.39
- Canada – $9.99
Reduce your time to market, lower risk to your projects, and leverage your existing skills, assets, and technologies to enter the tablet era.