sort dbf with fpt

111 views
Skip to first unread message

Claudia Neumann

unread,
Mar 28, 2017, 3:00:53 AM3/28/17
to harbou...@googlegroups.com
Hi all,

how can I use sort or dbsort() to sort a database with fpt memo fields. At the
moment using

sort to <new database> on <some field>,<some field>

results in dbf with dbt memo fields.

Best regards

Claudia

GeoffD

unread,
Mar 28, 2017, 6:51:21 AM3/28/17
to Harbour Users
Hi Claudia

You need to open (USE) dbf file with the foxpro driver and then all the dbf workarea commands will work.

I am assuming that all your data files are Foxpro so you can add these calls to you program at the start

you will need to REQUEST the driver files.

REQUEST DBFCDX                      // Causes DBFCDX RDD to be linked in

REQUEST DBFFPT                      // Causes DBFFPT RDD to be linked in

RddSetDefault( "DBFCDX" )           // Set up DBFCDX as default driver

Now DBSort() will create an FPT memo file.

in fact the old clipper way to do this was to use the following prg file called rddsys.prg
and just add it to your list  of program files.

INIT PROCEDURES are called before the application starts

/***
*
*  RddSys.prg
*
*  This program is run each time your application is started to setup
*  the proper default driver.  You should modify a copy of this file
*  if you wish to use a default RDD other than DBFNTX.
*
*  Copyright (c) 1993, Computer Associates International, Inc.
*  All rights reserved.
*
*/


ANNOUNCE RDDSYS                        // This line must not change

INIT PROCEDURE RddInit
REQUEST DBFCDX                      // Causes DBFCDX RDD to be linked in

#ifdef __HARBOUR__
   REQUEST DBFFPT                      // Causes DBFFPT RDD to be linked in
#endif


RddSetDefault( "DBFCDX" )           // Set up DBFCDX as default driver


RETURN

// eof: rddsys.prg


Hope this helps 

Geoff


Alex Strickland

unread,
Mar 28, 2017, 7:14:55 AM3/28/17
to harbou...@googlegroups.com
On 2017-03-28 09:00 AM, Claudia Neumann wrote:
> how can I use sort or dbsort() to sort a database with fpt memo fields. At the
> moment using
>
> sort to <new database> on <some field>,<some field>
>
> results in dbf with dbt memo fields.

If you mean "dbf *without* dbt memo fields" it sounds like a bug to me.

--
Regards
Alex


Claudia Neumann

unread,
Mar 28, 2017, 8:19:02 AM3/28/17
to harbou...@googlegroups.com, Alex Strickland
Hi Alex,

as far as I can see does

sort to <new database> on <some field>,<some field>

from a dbf with fpt memo fields generate a dbf with dbt memo fields.

I would like to get a dbf with fpt memo fields.

Regards

Claudia
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Harbour Users" group.
> Unsubscribe: harbour-user...@googlegroups.com
> Web: http://groups.google.com/group/harbour-users
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Harbour Users" group. To unsubscribe from this group and stop receiving
> emails from it, send an email to
> harbour-user...@googlegroups.com. For more options, visit
> https://groups.google.com/d/optout.

Claudia Neumann

unread,
Mar 28, 2017, 8:38:16 AM3/28/17
to harbou...@googlegroups.com, GeoffD
Hi GoeffD,

yes, that's it.

I had done

REQUEST DBFCDX
and
REQUEST DBFFPT

but had forgotten to

RddSetDefault( "DBFCDX" )

Now it produces fpt memo files.

Thanx very much.

Best regards

Claudia
Reply all
Reply to author
Forward
0 new messages