Default is false. Use this only if you know that some other software of yours produces incorrect headers. Creates new database file on disk and initializes it with 0 records. A dbt memo file will be also created if the table contains some memo fields. Parameters to create are passed as hash. You can call this method as method of another XBase object and then you only need to pass name value of the hash; the structure fields of the new file will be the same as of the original object.
The field types are specified by one letter strings C, N, L, D, If you set some value as undefined, create will make it into some reasonable default. Other attributes are memofile for non standard memo file location, codepage to set the codepage flag in the dbf header it does not affect how XBase.
The new file mustn't exist yet -- XBase will not allow you to overwrite existing table. Use drop or unlink to delete it first. This method closes the table and deletes it on disk including associated memo file, if there is any. Returns number of the last record in the file. The lines deleted but present in the file are included in this number. For a field name, returns the appropriate value. Returns undef if the field doesn't exist in the table. When dealing with the records one by one, reading or writing the following six methods , you have to specify the number of the record in the file as the first argument.
The range is Returns a list of data field values from the specified record line of the table. The first parameter in the call is the number of the record. If you do not specify any other parameters, all fields are returned in the same order as they appear in the file. You can also put list of field names after the record number and then only those will be returned. In the Czech language, we have about 6 different encoding that affect possition at which accented characters appear.
At least, I hope no. The software is provided without any warranty, in a hope you might find is usefull. Which is by the way the same as with most other software, even if you pay for that.
What is different with XBase. There are many clones of XBase-like software, each adding its own extension. The module tries to accept all different variations. To do that, I need your cooperation however -- usually good description of the problem, file sample and expected results lead to rather fast patch.
So you can do select, delete, insert and update, create and drop table. If there is something that should be added, let me know and I will consider it. Having said that, I do not expect to ever support joins, for example. This module is more a parser to read files from your legacy applications that a RDBMS -- you can find plenty of them around -- use them. Where did it fail? This module uses a standard way modules in Perl are installed.
If you've never installed a module on your system and your system is so non-standard that the general instruction do not help, you should contact your system administrator or the support for your system. Aggregate functions are not supported.
It would probably be very slow, since the DBD doesn't make use of indexes at the moment. In the connect call, specify the directory containing the dbf files and other, memo, etc. It defaults to the current directory. Note that with dbf, there is no database server that the driver would talk to.
If you really need indexed access, check XBase 3 for notes about support for variour index types. The where condition specifies which rows will be returned, you can have arbitrary arithmetic and boolean expression here, compare fields and constants and use and and or. Match using like is also supported. You can use bind parameters in the where clause, as the last example shows. Please note that you can only select from one table, joins are not supported and are not planned to be supported.
Separator of memo records in the dBase III memo files. Prevents new to treat the decimal value of character fields as high byte of the length -- there are some broken products around producing character fields with decimal values set.
Name of arrayref of names of index files to attach to the opened object. The cdx, mdx and SDBM indexes are attached by default. If the new or any subsequent call to the object fail, they generate a warning using warn. The default is undef but future versions may default to 1.
If the new or any subsequent call to the object fail, they raise an exception die. The default is undef. Creates new empty dbf file on disk; memo file will be also created if the table contains some memo fields.
Parameters to create are passed as hash. You can call this method as method of another XBase object and then you only need to pass name value of the hash; the structure fields of the new file will be the same as of the original object. If you call create using class name XBase , you have to besides name also specify the structure of the file:. Arrayref to list of field types, specified either by one letter strings C, N, L, D, Force different version of the dbf or memo file.
The default is version of the source table if you call create on an object , 3 dBase III compatible otherwise. If you keep some value undefined, create will make it into some reasonable default.
The new dbf file nor memo file mustn't exist yet -- create will not allow you to overwrite existing table. Use drop or unlink to delete it first. All records that were marked deleted in the table, will be purged from the file. Effectively does a fresh copy to new file and then moves it to original location, so is not aimed at efficiency.
Also recreates all attached index files. This method closes the table and deletes it on disk including associated memo file and attached index files, if there are any. Called either as a class method after new or create or on a table object, it returns error string describing the last error of previous failed method call. Returns number of the last record in the file.
The records marked deleted but present in the file are included in this number. For a field name, returns the appropriate value.
0コメント