About    Download    Order    Support


InnPlanner Reservation Software Videos

About
Download
Order/Prices
Support/Contact
Partner Program
Press Room
Online Help


Recent News

InnPlanner 2010 Released
New faster database engine, more customization features, weekly tariffs, full multi-user work support and much more...

2010 Feb 10

InnPlanner 2010 RC1
InnPlanner 2010 Release Candidate 1 is ready for downloading and testing. You can download it from the "Downloads" section.

2010 Jan 14


Hotel Software Documentation

Exporting to 3rd part DB using script

Exporting to 3rd part DB using script

Introduction

Besides basic data export, i.e. setting correspondence between fields, while exporting data it is available to change cells of a different database using a script. It may be quite useful, in cases when it is not possible to find the exact correspondence between your DB fields and fields of the DB you need to export to.

Example

The easy way to understand script usage is to give an example. For instance, there is an Excel-based DB stored at "c:\example.xls". Suppose, the main sheet of this DB has the following cells:

Report Date:--
---
TitleQuantityPrice
---

We need to fill in this document using data from our database.

  1. Open export dialog box (File->Import/Export->Export To 3rd Part Database.)
  2. Choose example.xls database and tables within this database.
  3. Go to Advanced tab and set Don't export records. I will use script to update external database flag.
  4. Open the script editor by clicking on Edit Script
  5. Create another script by using "Export DB Operation" action:



    Script listing:
    • Line 1. Go to the first line in the table;
    • Line 2. Start data editing of this line;
    • Line 3. Enter the current date in cell #2;
    • Line 4. Save changes;
    • Line 5. Get a number of records into [$records] variable using a query;
    • Lines 6, 12 Perform lines 7-11 for each record of the set;
    • Line 7. Add the record to the table;
    • Lines 8-10. Enter the records from our database into the Excel table.
    • Line 11. Save changes;
  6. Save the script and click on the "Export" button.

If everything was done correctly, the file example.xls should contain the following data:

Report Date:10.11.2007-
---
TitleQuantityPrice
---
Apple16$32
Lemon4$12

Saving export settings as a template will allow to edit the created script from the script editor (Designer->Edit Database Scripts).

See Also:

Synchronization

Importing/Exporting from 3rd part DB.

Custom Export Editor

Custom Import (Parsing)




Today"s Poll

What software do use for your inn/b&b/hotel/etc?

Do not use
Inn Planner
Access, Excel
ASSD
Auberge
Digitalrez
Easy Inn Keeping
EnSuite HR
GuestMaster
iMagic HR
Smart FX
Other