Establishing a Connection
The objects available within our connector are accessible from the "cdata.xbase" module. To use the module's objects directly:
- Import the module as follows:
import cdata.xbase as mod
- To establish a connection string, call the connect() method from the connector object using an appropriate connection string, such as:
mod.connect("Data Source=C:\\MyData;")
The DataSource property must be set to the name of the folder that contains the .dbf files. Specify the IncludeFiles property to work with xBase table files having extensions that differ from .dbf. Specify multiple extensions in a comma-separated list. Specify the CodePage property to set correct encoding for text fields in .dbf tables.