|
|
|
|
- Default values when adding an appointment
- Accessing a database found on Mobile Device (Pocket PC)
cdbAdd (Function) In french: cdbAjoute Adds the record found in memory into a data file (standard database found on Mobile Device or ".CDB" database). The indexes corresponding to all the keys used in the file are automatically updated. After the call to cdbAdd, the added record becomes the current record. By default, the current browse is not affected. 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 |
// Add a record into Customer file cdbWriteCol("MyDatabase", "Customer", "LastName", "Smith") cdbWriteCol("MyDatabase", "Customer", "FirstName", "Paul") cdbWriteCol("MyDatabase", "Customer", "City", "Avignon") ResAdd = cdbAdd("MyDatabase", "Customer") // Has a problem occurred? IF ResAdd = False THEN Error(ErrorInfo())
// Standard "Contacts" database // Add a record into the Contacts file cdbContact.Name = "Smith" cdbContact.FirstName = "Paul" cdbContact.DisplayedName = "Paul Smith" cdbContact.HomeCity = "Avignon" ResAdd = cdbAdd("", cdbContact) // Has a problem occurred? IF ResAdd = False THEN Error(ErrorInfo())
Syntax
<Result> = cdbAdd(<Database> , <Data file>)
<Result>: Boolean - True if the function was successful,
- False otherwise. To find out the error details, use ErrorInfo.
<Database>: 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 (""), cdbAdd handles the last data file used by the last function for managing databases on Mobile Device (starting with cdb). Remarks Default values when adding an appointment If the cdbAppointment.Status and cdbAppointment.Day items are not filled in the CDB structure before the record is added, the following default values are automatically taken into account: - cdbAppointment.Status = 2 (corresponds to the busy status)
- cdbAppointment.Day = 2 (corresponds to False)
Accessing a database found on Mobile Device (Pocket PC) The table below presents the actions that must be performed to access a database found on Mobile Device:
| | | | Database | Standard database (tasks, contacts, appointments, ...) | Standard WINDEV application | - Establish a connection between the current computer and the Mobile Device (ceConnect).
- Open the database to use (cdbOpen).
| Establish a connection between the current computer and the Mobile Device (ceConnect). | WINDEV Mobile application | Open 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).
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|