ESENT –JET APIs to create database in Metro Style App on Windows 8
ESENT –JET APIs to create database in Metro Style App on
Windows 8-
ESENT dll is a part of windows SDK and provides apis to
create and manage database on metro style application there is two major choices
that can be used to implement databse in metro style application:
1.
SqlLite v3
2.
ESENT – JET database model
SQLLite3 is not officially annouced to be used as database
engine on windows8. But winrt version is already available to play with
database.
ESENT is already the part of windows8 so winrt support is
already their to link esentlib statically to use the application. JET apis are much flexible to create indexed
base database and can be used to create huge database with thousands of table
and columns.
JET apis introduced in different levels according to
plateform like win2000, WINXP , VISTA and above.
Most of structures changed due to unicode support and
security enhancement. I have created database using esent - JET apis to work on metro style application
the following example will demonstrate the steps to create database using
native JET APIS.
Created a c ++ winrt component that will introduce classes
and methods to work with database. This component can be used in metro style
application created using any language like vc++ or c#.
The winrt component project will cretae .winmd file that
will be added as referance to othe projects to call databse methods.
In given samle I have worked to provide basic functionality
that can be used in metro style application to play with database:
1.
Initiating ESENT JET database engine
2.
Creation of database and table column
3.
Attach already created database and access table
information and related details.
4.
Insertion of records
5.
Deletion of records from database.
Use following steps to create winrt component in VS:
1.
Create winrt project from template list
2.
Link the project with esent.dll
3.
And use sample code to start with database.
Use the winrt component in metro app written in c#
1.
Add referance->locate the .winmd file and
add.
2.
Use the namespace and class in your project and
go with it.
//JetDatabasecomponent.cpp
Comments
https://www.kellermansoftware.com/p-49-ninja-winrt-database.aspx