Steve

I have and am using dbase .dbf tables and Delphi/BDE with delphi 
since the beta of Delphi 1 (with the exception of a short excursion 
into Apollo).

Delphi with create an xbase expression as an index so that an 
expression like
           'fld1 + str(fld2,8,0) + dtos(fld3)'
will work fine.

I use 'locate' as my main find tool.  Syntax like
      table1.locate('fld1', MyValue, []);
works fine.     

If you continue to have trouble - particularly with creating the 
index using either the TTable method or the BDE method, let me know 
and I will send code segments!

Alternatively send me some code fragments to audit.

Steven


> Has anyone here done much with dbase .dbf tables and Delphi/BDE?
> 
> I am just trying to do a very simple price quote app for a customer against
> their existing dbf tables.
> 
> I copy the table (small) to a local drive first, then create an index on 3
> fields using an expression i.e. 'fld1+fld2+fld3'
> 
> First problem: This works if all those fields are character, but not if one
> is numeric - the index is created in this case but the sort order is not
> what would be expected. In dBase (or Clipper etc) we could do something
> like: 'fld1+str(fld2,5)+fld3' if one of the fields was numeric. Apart from
> using another product such as Apollo, has anyone got any tips here?
> 
> I have actually worked around this by changing the field type from numeric
> to character on the fly on my local copy of the table (not nice but it
> works).
> 
> Second problem: I can't seem to get table1.locate to work. What is the
> correct syntax when using dbf index expressions as above?
> 
> Any general tips on working with dbf files from Delphi (3 or 4) would be
> appreciated.
> 
> thanks,
> 
> Steve.
> 
> 
> 
> 
> ---------------------------------------------------------------------------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> 
> 


Wild Software Ltd
P O Box 33-216
Christchurch
NEW ZEALAND

=========================================================
I haven't lost my mind; it's backed up on tape somewhere.
=========================================================
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to