It's been a while since I used Clipper or dBase files but I seem to
remember that you can use xBase functions in the expression to build the
index.  ie 'fld1 + str(fld2,5) + fld3' should work if you create the
index in database desktop.



> -----Original Message-----
> From: Stephen Barker [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, March 15, 1999 1:36 AM
> To:   Multiple recipients of list delphi
> Subject:      [DUG]:  dbf indexes
> 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 -
>                   Website:
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]

Reply via email to