Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

SQLite For WinRT Available on Visual Studio Gallery

DZone's Guide to

SQLite For WinRT Available on Visual Studio Gallery

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

Thanks to Tim Heuer I’ve found that there’s an easier way to add SQLite to your Windows 8 application rather than the manual one described in my post. Now SQLite for WinRT is available as a Visual Studio extension, you can simply add it by searching for the keyword sqlite: the name of the extension is SQLite for Windows Runtime. Once you’ve installed it and restarted Visual Studio, you can now simply add SQLite to your application by adding a reference to two of the available libraries in the Extensions panel: Microsoft Visual C++ Runtime Package and SQLite for Windows Runtime. You can access to the panel by right clicking on the project, choosing Add reference and selecting Extensions from the Windows menu.

SNAGHTML12499e4

SNAGHTML125199d

Be aware that, since the library uses C++ extensions, you can’t compile the application using as a platform the Any CPU option, but you should target a specific platform. To do that, open the Configuration manager from the Build menu and set the platform to one of the available options (x86, x64 or ARM).

SNAGHTML1270275

If you don’t do this, you’ll see a warning sign on the two references Microsoft Visual C++ Runtime Package and SQLite for Windows Runtime and the project won’t compile.

image

And… you’re done! No more manually downloading the dll library and copying it to the Visual Studio project: you can simply go on, install sqlite-net and use the same code you’ve learned to use in my first post.

Thanks to Tim Heuer for the tip and… happy coding!

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:

Published at DZone with permission of Matteo Pagani, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}