PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Accessing a database found on the Mobile Device (Pocket PC)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Reads a record in a data file according to a given record number. This read mode is called "Direct access". The record read is loaded in memory.
Several cases may occur after the call to cdbRead:
  • the specified record number does not exist: no reading is performed and cdbOut returns True.
  • the data file is empty: no reading is performed and cdbOut returns True.
Caution: From Windows Mobile 5, the access to a standard database (tasks, contacts, appointments, ...) can no longer be performed from a Windows application (and therefore from a standard WINDEV application).
Accessible from the PC
Accessible from the simulator
Accessible from the Mobile Device (Pocket PC)
CDB database
Yes
Yes
Yes
Standard database
No
No
Yes
Example
// Read the current record
cdbRead("MyDatabase", "Customer")
// Adds the name of the customer into a list
ListAdd(LIST_CustomerList, cdbCol("MyDatabase", "Customer", "Name"))
// Save the current record number
NumSavedRec is int = cdbRecNum("", cdbContact)

// Other actions that lose the record number
...

// Restore the position on the record
cdbRead("", cdbContact, NumSavedRec)
Syntax
<Result> = cdbRead(<Database Name> , <Data File> [, <Record Number>])
<Result>: Boolean
  • True if the function was successful,
  • False otherwise. To find out the error details, use ErrorInfo.
<Database Name>: Character string (with quotes)
  • Name of database that was opened by cdbOpen,
  • Empty string ("") to handle one of the standard databases found on Mobile Device (tasks, contacts, ...).
<Data File>: Character string (with quotes) or constant
Data file to use. This parameter corresponds to:
  • the name of data file to use.
  • the constant corresponding to one of the standard databases:
    cdbContact"Contacts" database
    cdbTask"Tasks" database
    cdbAppointment"Appointments" database

If this parameter corresponds to an empty string (""), cdbRead handles the last data file used by the last function for managing the Mobile Device databases (starting with the letters cdb).
<Record Number>: Optional integer
Number of the record to read. This number is returned by cdbRecNum.
If this parameter is not specified, cdbRead handles the current record.
Caution: The record numbers are not consecutive numbers.
Remarks

Accessing a database found on the Mobile Device (Pocket PC)

The table below presents the actions that must be performed to access a database found on the Mobile Device:
DatabaseStandard database (tasks, contacts,
appointments, ...)
WINDEV application
  1. Establish a connection between the current computer and the Mobile Device (ceConnect).
  2. Open the database to use (cdbOpen).
Establish a connection between the current computer and the Mobile Device (ceConnect).
WINDEV Mobile applicationOpen the database to use (cdbOpen).No specific action is required.

Reminder: From Windows Mobile 5, the access to a standard database (tasks, contacts, appointments, ...) can no longer be performed from a Windows application (and therefore from a standard WINDEV application).
Components
WINDEVReports and QueriesWindows Mobile wd230ce.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment