... then 4 bytes Warning: if someone created tables with such fields i.e. { "I:+", 8, 0 } after my modification which added support for AutoInc flags in all numeric DBF fields then he should update counters manually using DBS_COUNTER flag. New code uses 64bit counters for suuch field ...
... MAX('+cField+') FROM ' + cTable) + 1 It is not as simple as that. Even MySql server does not know the next autoinc value, till the time it actually inserts the record in the table. Between the moment server answers the query "SELECT MAX(fld) FROM table" ...
Use the new value in the next insert. Example: Autoinc field name is `ID` and the present value is 89. You want to use 101 onwards from the next record onwards. Solution: When you insert the next record: INSERT INTO mytable ID,..... VALUES ( 101, ...
AutoIncrement field in DBFCDX/DBFNTX is represented as "+". AutoInc fields of DBFCDX/DBFNTX are not compatible with autoincrement field of ADS. Older DBUs and other older DBF maintenance programs may not support ...
... use this approach with a simple sample. Let us also use the Demo Server provided by FWH. We have a table "STATES" with three fields ID (autoinc), CODE (VarChar(2)) and NAME (VarChar(25)). We have this latest data of CODEs and NAMEs. { { "MT", "MONTANA NEW" ...
Dear Mr. Silvio The basic issue is about AutoInc IDs. Basically the programmer has to decide the logic for this. Available alternatives: 1. Derive the new ID on the basis on RECNO() . This is what is used in your code above. The danger in this ...
Nages, May I ask? You have an AutoInc class. Can it not be used to work the way Mr. Silivo wants? See the message right before yours. Maybe they crossed during posting. Yes, it can be done, but there is still the packing issue that would ...
... TDataRow() and TDatabase() are compatible with this feature. Depending on the setting, both recycle records in the sameway. Note: Value of the autoinc field is not changed when recycling the records. Here are two samples using recycling feature, using DBF directly and with TDatabase. In both ...
... are not swapped. You decide whether to include ordine also in the list. If you include ordine in the list, ordine field also is swapped. Note: AutoInc fields are never swapped. Problem ....when you add a record the field ORDINE IS ZERO I revised the program. Please test the revised program. ...
... are not swapped. You decide whether to include ordine also in the list. If you include ordine in the list, ordine field also is swapped. Note: AutoInc fields are never swapped. Problem ....when you add a record the field ORDINE IS ZERO I revised the program. Please test the revised program.