Presentation is loading. Please wait.

Presentation is loading. Please wait.

Getting Started with Oracle Berkeley DB 11gR2 and ADO.NET

Similar presentations


Presentation on theme: "Getting Started with Oracle Berkeley DB 11gR2 and ADO.NET"— Presentation transcript:

1

2 Getting Started with Oracle Berkeley DB 11gR2 and ADO.NET Ron.Cohen@oracle.com

3 Scope.NET Platforms 3.5 and higher running on Windows 32 and x64 bit platforms including Windows XP and Windows Server Vista Windows 7 Using Berkeley DB with ADO.NET and building applications using. NET languages such as C# and Visual Basic This tutorial and sample application uses C# Windows Mobile Platform and the Compact Framework is beyond the scope of this tutorial.

4 Building and Using ADO.NET Support with Oracle Berkeley DB Installation and Configuration ADO.NET Data Provider Documentation Optional Components Berkeley DB ADO.NET Application Introduction Project Reference Core Objects Used Classes Running BerkeleyDBwithADO

5 Installation and Configuration Required Software ADO.NET Package Includes Berkeley DB 11gR2 (11.2.5.2.28) Visual Studio 2008 or 2010 Professional Download ADO.Net Package BDB SQL ADO.NET Package Expand and Build ADO.NET driver Expand dbsql-adodotnet-5.2.28.zip or greater

6 Installation and Configuration Expand and Build ADO.NET driver Open SQLite.NET.2008 or SQLite.NET.2010 Select Load Project Normally on Security Warning Message see next slide Solution Configuration either DebugNativeOnly or ReleaseNativeOnly Solution Platform win32 (or x64) Win32 used here Build Project System.Data.SQLite.2008 Optionally build entire solution SQLITE.Interop.dll created either way Debug and run project named test All tests should run successfully after select run command

7 Building ADO.NET Support with Berkeley DB

8

9

10 Building ADO.NET Support with Oracle Berkeley DB Installation and Configuration ADO.NET Data Provider Documentation Optional Components Berkeley DB ADO Application Introduction Project Reference Core Objects Used Classes Running BerkeleyDBwithADO

11 Access Berkeley DB databases using the.NET Framework (Version 3.5) sork The build created required dll’s for ADO.NET System.Data.SQLite.dll is a custom data provider of System.Data.dll Contains overloaded classes Needed at design time and runtime Mixed assembly SQLite.Interop.dll Needed at runtime Copy to.exe directory. ADO.NET - Data Provider

12 ADO.NET - Documentation SQLite.NET Help File System.Data.SQLite Object Browser

13 Building ADO.NET Support with Berkeley DB ADO.NET Documentation to use

14 Optional Components are created if all requirements met and you build the Linq and/or SQLiteDesigner project files System.Data.SQLite.Linq.dll.Net Framework 3.5 SP1. SQLiteDesigner.dll SQLite.Designer requires Microsoft Visual Studio SDK. ADO.NET - Optional Components

15 Optionally can build the dbsql shell and Berkeley DB library for access outside of ADO.NET Open dbsql-adodotnet- 5.2.nn\build_windows\Berkeley_DB.sln Build solution file see Using the ADO.NET DriverUsing the ADO.NET Driver If plan to use more than dbsql, recommend downloading Berkeley DB Kit Berkeley DB Downloads Optional Components - dbsql

16 Building ADO.NET Support with Oracle Berkeley DB Installation and Configuration ADO.NET Data Provider Documentation Optional Components Berkeley DB ADO Application Introduction Project Reference Core Objects Used Classes Running BerkeleyDBwithADO

17 Application Introduction Visual Studio C# Windows Application Built using Visual Studio Professional 2008 Berkeley DB database using ADO.NET to perform CRUD operations Schema (subset of a real License Manager App) _idd * (text) user_id (text) app_package (text) Desc (text)

18 The License Application - Introduction Sample Data Row Downloaded fastvpn package _idd * “USER01~com.swcompany.fastvpn” User “USER01” app_package “com.swcompany.fastvpn” Desc (text) “ultra secure and fast vpn” Use Visual Studio to examine the application in more detail

19 Application Project Reference

20 Core Objects Used SQLiteConnection Establish Connection to Berkeley DB Database SQLiteDataAdapter Populates a DataSet and resolves updates with Berkeley DB Transmits changes made to the grid back to Berkley Db Dataset In-memory representation of data retrieved from Berkeley DB. DataSet consists of a collection of DataTable objects DataGridView Binds to Berkeley DB Data Source

21 ADO.NET Application – Class Files frmBerkeleyDB.cs Main Form Contains UI for Grid and CRUD operations Contains DataGridView Implements Save changes and Exit application Program.cs By Convention, the entry point for the BerkeleyDBwithADO application frmSignon.cs Simple signon form to identify use and assist in creating primary keys Needed when Synchronization is added

22 Running BerkeleyDBwithADO About to Insert a new package

23 Running BerkeleyDBwithADO Package inserted in Grid

24 Running BerkeleyDBwithADO File Save to Berkeley DB

25 Running BerkeleyDBwithADO Start Delete Operation highlight rows

26 Running BerkeleyDBwithADO Press Delete Key just before saving changes

27 Running BerkeleyDBwithADO Restart application to confirm changes

28 End of Tutorial


Download ppt "Getting Started with Oracle Berkeley DB 11gR2 and ADO.NET"

Similar presentations


Ads by Google