Cherry City Software
2722 McAhren Lane South, Salem, Oregon 97306, USA
Support@CherryCitySoftware.com
Home  
Providers  
Download  
Activation  
Documents  
Feedback  
Login  
 
Introduction
This PalmDB provider is developed for developers who want to create Palm database (PDB) file on desktop or laptop and then install it on Palm devices. To use the provider to create PDB shall be as easy as A, B, and C as long as you have a little bit experience with ADO and SQL. You may also use this provider to view records in existing PDB files or to modify existing PDB files. In other words, you can use it to read records from and/or write records to PDB files.

This provider uses SQLite engine for data manipulation because SQLite is lightweight and very fast. Refer to the SQLite Website to find more information about SQLite if you are interested in it. If you do not have much experience about ADO, please refer to the pages about SQLite OLE DB Provider, MySQL OLE DB Provider and Firebird OLE DB Provider Those pages shall give you a clue on how to use ADO. Actually, even if you know nothing about SQL and ADO, you still can fellow me to create PDB files easily.
Architecture
As mentioned above, PalmDB Provider can be used with ADO or ADO.NET. You may use PalmDB Provider in your .NET, VB, and C++ (native) applications.

The right side diagram depicts the Architecture of the data access in your application. On the top is your application. You application can interface PalmDB Provider directly. You may also choose to interface this provider indirectly via ADO/ADO.NET.

At the bottom are 3 files, PDB Schema definition file, existing PDB file, and new PDB file. The PDB Schema file defines the PDB table columns so that PDB records can be easily manipulated with SQL queries. The existing PDB file is optional. If this file is supplied, records in this PDB will be retrieved based on the schema defined in the schema file and put into temporary SQL table. Then you may read/delete/add/update the records in the temporary table. At the very end, you can execute one single provider specific to flush out all records into a New PDB File.
PalmDB Provider Architecture
Features
The following are the features that this PalmDB Provider supports:
  • Transaction
  • Record scroll
  • Parameters
  • Bookmarks
  • Database Schema - tables and their columns
  • Extended error information
  • Multiple queries in one single execution
PalmDB Provider Connection String

"Provider=OlePDB.PalmSource; Data Source=PDBFileFullPath; Schema=PDBSchemaFileFullPath; Table Name=PDBTableName;Creator ID=PDBCreatorID;"
where
  • PDBFileFullPath - full path of an existing PDB file from which you want to read records. If you do not want to read any existing PDBs, leave it blank.
  • PDBSchemaFileFullPath - the full path of the schema file that defines the PDB table schema. The schema is used to interpret an existing PDB file and/or define a new PDB table to be created. For schema definition, refer to section Working With PalmDB Provider.
  • PDBTableName - Name of a PDB to be created. 1 to 32 characters long.
  • PDBCreatorID - creator ID of a PDB to be created. Must be 4 characters long.
PalmDB Provider Specific Query
PalmDB defines only one provider specific query to write records to a new PDB file:

FLUSH INTO [PDBFile] ORDER BY ...

where PDFile is the full path of a new PDB file to be created. '[' and ']' are mandatory too. ORDER BY clause is optional
Working With PalmDB Provider

Creating a Palm database (PDB) is as easy as A, B and C using PalmDB Provider.
  • Create your PDB schema with an XML file
  • Create an ADO connection to a PDB file via PalmDB Provider
  • Insert data into the data and call FLUSH to create the PDB file
You shall be able to follow 3 steps above to create your PDB file very easily. If you have any problems, feel free to send us feedback. Here are more details a long with sample code.

Step A: Create PDB schema and save it to file. This file will be used in step B. The PDB schema definition sample includes all data types this PalmDB Provider supports.


Step B: Create an ADO connection to a PDB file via PalmDB Provider
To open ADO connecton to a PDB file via PalmDB Provider, Provider, Data Source, Schema, Table Name and Create ID must be provided in the ADO connection string. Here is a sample ADO connection string:

"Provider=OlePDB.PalmSource; Data Source=C:\public\MySource.pdb; Schema=c:\public\PDB.schema.xml; Table Name=Tbl_test; Creator ID=SEAN"

Where Provider must be "OlePDB.PalmSource"; Data Source shall be the PDB file path and name; Schema shall be the PDB schema definition file path and name; Table Name shall be the PDB table name; and Creator ID shall be the PDB creator ID. If you do not want to read data from existing PDB, leave data source empty.
Step C: Insert data into database and create PDB file
Once you have an open connection to the PDB file via ADO, you may execute SQL queries to insert data into the PDB. Always execute command "FLUSH INTO [file name];" in order to generate PDB file.
Below is the sample code for steps B and C.


Here is another sample application written in C#. You may write SQLite queries to insert and/or change records and then commit your changes into a new PDB File by executing the 'flush' command.

You may use the sample application shown on the right side to get familiar with the PalmDB Provider. The download includes a PDB table schema definition file. No PDB files are included. You may leave PDB Source blank and create a new PDB file.Then use the newly created PDB file as PDB source and read the data back.
PDB Test
You may type your queries in the text area and then select each query to execute. Once you have get all records into the database, execute the last command to flush out records into a PDB file.
Activation
PalmDB Provider must be activated before you can use it. To activate it, you must download the provider and get your pass code from the ActUtil included in the download. Click here to get activation code.
Download
Update History:
DateChanges
2007-01-20Fixed an activation defect.
2006-09-12Added a new feature such that it can read/modify existing PDB files.
2006-03-05Fixed a critical activation bug.
2006-01-02Fixed a binary input parameter binding issue.
2005-11-27Upgraded to support ADO.NET 2.0.
2005-11-12Initial public release.

PalmDB Provider
C# sample source code
PalmDB VB sample code
Disclaim
This whole post here including the downloads is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software.
Feedback
To send me feedback, click here

Copyright © Cherry City Software LLC, 2006 - 2009. All Rights Reserved.