DbOpen                                                                                                   Function

 

DBOPEN(dbName as Database, fileName as String, cardNo as Integer)

 

Description

To open an existing database on a specified memory card of the Palm OS device. Returns an integer result.

 

DbName is the reference to the database inside the program. All actions on the database will identify it by this name. FileName is the name of the database as recorded on the Palm OS device Memory system. CardNo is the Palm OS device memory card on which this database resides. Normally, this is card 0. A database name must be defined by DIM dbname as Database before being used in a DBOPEN command.

 

A DBOPEN is required before any subsequent actions on a database.

 

Database Result Codes

 

-1

EOF on DbGet

0

Operation Successful

1

Operation Failed

2

Key not found - next higher key returned

3

File opened in read only mode

513

Memory Error

514

Index Out Of Range

515

Invalid Parameter

516

Read Only

517

Database Open

518

Can't Open

519

Can't Find

520

Record In Wrong Card

521

Corrupt Database

522

Record Deleted

523

Record Archived

524

Not Record DB

525

Not Resource DB

526

ROM Based or invalid Database name

527

Record Busy

528

Resource Not Found

529

No Open Database

530

Invalid Category

531

Not Valid Record

532

Write Out Of Bounds

533

Seek Failed

534

Already Open For Writes

535

Opened By Another Task

536

UniqueID Not Found

537

Already Exists

538

Invalid Database Name

539

Database Protected

540

Database Not Protected

 

Example

Dim result as integer

Dim CustomerDb as database

Result=DbOpen(CustomerDb, "Company-Test", 0)