

Note, that this method depends on Tcl 8.5 or newer. Removes deleted records from the file to reduce file size. You can use to find out if the handler is positioned correctly. May return empty list if no data was available. Remember to to proper record if you called any other method from this class before the. Returns record at current index and increments index. Returns -1 if it's not at any valid index currently (before opening file or after read last record). Returns record index at which the handler is currently. Returns true on success, false on failure (index out of range). Index is record order number in dbf (excluding deleted records), which is in range from 0 to -1. Moves reading/writing pointer at given position. For each record the body is executed with arrName prepared. Iterates through all records and puts each record values into array named arrName with column names as keys. Returns true on success or false on failure (index out of range). Updates all values of record with given index, or single column of that row if columnName is provided.

Use to force remove deleted records from file. Note that DBF records are not physically removed from file, they are just marked as deleted so they can be reused by. It inserts record in place of first record marked as deleted or if there's no deleted record, then it appends record to the end of DBF file.|& Values have to be in same format as returned from. Number of elements in 'values' has to be the same as number of columns, otherwise error will be raised. Dbf cannot contain any records in order to add column. Precision is always optional, but may be provided. Length is optional in most cases, except for types: N and C. Channel for DBT (memo table) is optional.Ĭloses file that was open with or passed to. Channel has to be readable (in any case) and writable (if you want to modify anything in file) and also switched to binary translation and non-blocking mode. You can consider this method as a variant of accepting channels instead of file. If necessary (during writing data) might create also a DBT file. If file doesn't exists, it creates new DBF file. It also opens DBT file (memo table) if it exists. If will be closed automatically at object destruction. Returns list of available character encodings that are supported by both Tcl and DBF. The "short date" is a date in format: "YYYYMMDD".Ĭonverts unixtime (no milliseconds, just like from clock seconds) to the "short date" format. If the conversion is not possible, then "0" is returned (which is actually equal to the beginning of 1970.).Ĭonverts unixtime (+ milliseconds) value to Julian Day date format, so it's applicable for field of type "T" or valueĬonverts "short date" format to unixtime (no milliseconds) format, but only if it's possible, otherwise returns 0.
#Sqlitestudio data type size update
Tried to update (with ) while there's not a single record in DBF.Ĭonverts value read from "T" or type into unixtime format (+ milliseconds), but only if it's possible (i.e. Column will still be added, but its name will be truncated to 10 characters. When adding column with name longer than 10 characters (this is limited by DBF format). Also column name is appended to error handler arguments. When trying to add any column while there are already some records in DBF. The addColumn will just skip this column. When trying to add column that already exist. dbt file has read-only permissions or you cannot create the new.

Possible values for writing file are: DBT_READ_ONLY It can be ignored, but in this case the referenced memo values will be returned as empty strings. dbt file (memo table) doesn't exist or it's not readable, but the database type requires it to exists. Possible values for reading file are: DBT_DOESNT_EXIST Dbf will still work but some limitations might be applied.
#Sqlitestudio data type size code
The errorHandler code will be evaluated with literal error code appended (and optionally some other arguments). MyDbf addColumn "col2" "C" 20 # (character/text type, 20 characters) MyDbf addColumn "col1" "N" 3 # (numeric type, length = 3 digits)
