Anzahl Records in Filter / Scope

Auf dem Weg von Clipper, FoxPro u.ä. nach Xbase++

Moderator: Moderatoren

Antworten
Benutzeravatar
AUGE_OHR
Marvin
Marvin
Beiträge: 12903
Registriert: Do, 16. Mär 2006 7:55
Wohnort: Hamburg
Hat sich bedankt: 19 Mal
Danksagung erhalten: 44 Mal

Anzahl Records in Filter / Scope

Beitrag von AUGE_OHR »

hi,

unter Clipper gab es DBORDERINFO() und ORDKEYCOUNT().
was hat Xbase++ als Ersatz :idea:
gruss by OHR
Jimmy
Benutzeravatar
Jan
Marvin
Marvin
Beiträge: 14641
Registriert: Fr, 23. Sep 2005 18:23
Wohnort: 49328 Melle
Hat sich bedankt: 21 Mal
Danksagung erhalten: 87 Mal
Kontaktdaten:

Re: Anzahl Records in Filter / Scope

Beitrag von Jan »

Jimmy,

welche Clipper-Version soll denn das gewesen sein?

Jan
Mitglied der XUG Osnabrück
Mitglied der XUG Berlin/Brandenburg
Mitglied des Deutschsprachige Xbase-Entwickler e. V.
Benutzeravatar
brandelh
Foren-Moderator
Foren-Moderator
Beiträge: 15688
Registriert: Mo, 23. Jan 2006 20:54
Wohnort: Germersheim
Hat sich bedankt: 65 Mal
Danksagung erhalten: 33 Mal
Kontaktdaten:

Re: Anzahl Records in Filter / Scope

Beitrag von brandelh »

Clipper kannte keine Skopes und die Anzahl der ausgefilterten oder angezeigten Sätze musste man selbst ermitteln.
Gruß
Hubert
Benutzeravatar
Jan
Marvin
Marvin
Beiträge: 14641
Registriert: Fr, 23. Sep 2005 18:23
Wohnort: 49328 Melle
Hat sich bedankt: 21 Mal
Danksagung erhalten: 87 Mal
Kontaktdaten:

Re: Anzahl Records in Filter / Scope

Beitrag von Jan »

Hubert,

exakt. Skopes gab es in Xbase++ glaube ich ab der 1.82 (aber da bin ich mir nicht ganz sicher). Und meine alten Clipper-Dokus bis einschl. 5.01 kennen beide von Jimmy erwähnten Funktionen nicht - wobei die Db-Funktionen ja auch erst mit der 5 raus kamen. Daher meine Frage, von welcher Version er da spricht.

Jan
Mitglied der XUG Osnabrück
Mitglied der XUG Berlin/Brandenburg
Mitglied des Deutschsprachige Xbase-Entwickler e. V.
flanelli
Rekursionen-Architekt
Rekursionen-Architekt
Beiträge: 151
Registriert: Di, 11. Mai 2010 16:27
Hat sich bedankt: 3 Mal
Danksagung erhalten: 9 Mal

Re: Anzahl Records in Filter / Scope

Beitrag von flanelli »

dborderinfo() etc. gab es jedenfalls in Clipper 5.3
Ahoile aus dem Süden
flanelli
Rekursionen-Architekt
Rekursionen-Architekt
Beiträge: 151
Registriert: Di, 11. Mai 2010 16:27
Hat sich bedankt: 3 Mal
Danksagung erhalten: 9 Mal

Re: Anzahl Records in Filter / Scope

Beitrag von flanelli »

brandelh hat geschrieben: Sa, 11. Jul 2020 8:06 Clipper kannte keine Skopes und die Anzahl der ausgefilterten oder angezeigten Sätze musste man selbst ermitteln.
da hast du natürlich recht...

btw..-
auch wenn es nicht so ganz zum thema passt, es gab für clipper allerdings eine, für damalige zeiten
geradezu geniale 3rd-party lib namens SUBNTX.LIB und die hat, zumindest nach meinem wissenstand damals sehr
vielen clipperianern mehr oder weniger das "überleben" gerettet denn ohne die function SUBNTX() wären wohl
die meisten kunden aufgrund extrem langsamer verarbeitung bzw. eingegrenzter datenanzeigen abgesprungen.
wir selbst hätten damals einen großkunden mit 320 benutzern jedenfalls aus performancegründen verloren,
so haben wir ihn aber auch heute noch ( nagut, natürlich nicht nur wegen der damaligen subntx-lösung :-) )
Ahoile aus dem Süden
Benutzeravatar
AUGE_OHR
Marvin
Marvin
Beiträge: 12903
Registriert: Do, 16. Mär 2006 7:55
Wohnort: Hamburg
Hat sich bedankt: 19 Mal
Danksagung erhalten: 44 Mal

Re: Anzahl Records in Filter / Scope

Beitrag von AUGE_OHR »

hi,

hat wirklich keiner damit gearbeitet :?:

unter Cl*pper v5.2e gab es
^bDBORDERINFO^b
Information needed to open/address an Order in the workarea
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
^bStructure^b

^btypedef struct
^b{
^b ITEM orderBag;
^b ITEM order;
^b
^b ITEM result;
^b
^b} DBORDERINFO;
^b
^btypedef DBORDERINFO far * DBORDERINFOP;

^bElements^b

^borderBag

Contains a CA-Clipper-level reference to a character value indicating
the name of the Order Bag.

^border

Contains a CA-Clipper-level reference to a character value indicating
the name of the Order.

^bresult

Contains an Item that is used on occasion by the CA-Clipper runtime
system and may be used by the RDD developer as an all purpose result
holder.

^bFiles:^b Header file is Rdd.api.

^bUsed by:^b orderListAdd(), orderListFocus(), orderInfo()

---

unter Cl*pper v5.3 gab es
DBORDERINFO()
Return and optionally change information about orders and index files
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Syntax

DBORDERINFO(<nInfoType>, [<cIndexFile>],
[<cOrder> | <nPosition>],
[<expNewSetting>]) --> uCurrentSetting

Arguments

<nInfoType> determines the type of information as specified by the
constants below. Note, however, that not all constants are supported
for all RDDs. These constants are defined in the Dbinfo.ch header file,
which must be included (#include) in your application.

Order/Index Information Type Constants
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Constant Description
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
DBOI_CONDITION For condition of the specified order as a
string.
DBOI_CUSTOM Logical flag indicating whether the
specified order is custom-built (for RDDs
that support custom-built orders). Note
that although you can turn the custom-
built flag on for a standard order by
specifying true (.T.) for the <uNewSetting>
argument, you cannot turn a custom-built
order into a standard order. Specifying
false (.F.) for <uNewSetting> is the same
as not specifying the argument at all--
both return the current setting.
DBOI_EXPRESSION Order key expression of the specified
order as a string.
DBOI_FILEHANDLE Handle of the specified index file as a
number.
DBOI_HPLOCKING Logical flag indicating whether the
specified index file uses the high
performance index locking schema.
DBOI_INDEXEXT (DBOI_BAGEXT) Default index file extension as a string.
DBOI_INDEXNAME (DBOI_BAGNAME) Name of the specified index file as a
string.
DBOI_ISCOND Logical flag that determines whether the
specified order was defined using a FOR
condition.
DBOI_ISDESC Logical flag that determines if the
specified order is descending. For
drivers that support dynamically setting
the descending flag at runtime, specify
the new value as a logical, using
DBORDERINFO(DBOI_ISDESC, [<cIndexFile>],
[<cOrder> | <nPosition>], <lNewSetting>).
The current setting is returned before it
is changed.
DBOI_KEYADD Logical flag indicating whether a key has
been successfully added to the specified
custom-built order.
DBOI_KEYCOUNT Number of keys in the specified order.
DBOI_KEYDEC Number of decimals in the key of the
specified order.
DBOI_KEYDELETE Logical flag indicating whether a key has
been successfully deleted from the
specified custom-built order.
DBOI_KEYGOTO Logical flag indicating whether the record
pointer has been successfully moved to a
record specified by its logical record
number in the controlling order.
DBOI_KEYSINCLUDED Number of keys included in the specified
order so far. This is primarily useful
for conditional orders. It can be used
during the status display process (with
the EVAL clause of the INDEX command).
DBOI_KEYSIZE Size of the key in the specified order as
a number.
DBOI_KEYTYPE Data type of the key in the specified
order as a string.
DBOI_KEYVAL Key value of the current record from the
controlling order.
DBOI_LOCKOFFSET Locking offset for the specified index
file as a numeric value.
DBOI_NAME Name of the specified order as a string.
DBOI_NUMBER Numeric position of the specified order in
the order list.
DBOI_ORDERCOUNT Number of orders in the specified index
file.
DBOI_POSITION Logical record number of the current
record within the specified order.
DBOI_RECNO Physical record number of the current
record within the specified order.
DBOI_SCOPEBOTTOM Bottom boundary of the scope (as a number)
for the specified order.
DBOI_SCOPEBOTTOMCLEAR Clears the bottom boundary of the scope
for the specified order.
DBOI_SCOPETOP Top boundary of the scope (as a number)
for the specified order.
DBOI_SCOPETOPCLEAR Clears the top boundary of the scope for
the specified order.
DBOI_SETCODEBLOCK Key for the specified order as a code
block.
DBOI_SKIPUNIQUE Logical flag indicating whether the record
pointer has been successfully moved to the
next or previous unique key in the
controlling order.
DBOI_UNIQUE Logical flag indicating whether the
specified order has the unique attribute
set.
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

Important! DBOI_USER is a constant that returns the minimum value
that third-party RDD developers can use for defining new <nInfoType>
parameters. Values less than DBOI_USER are reserved for Computer
Associates development.

<cIndexFile> is the name of an index file, including an optional
drive and directory (no extension should be specified). Use this
argument with <cOrder> to remove ambiguity when there are two or more
orders with the same name in different index files.

<cOrder> | <nPosition> is the name of the order about which you
want to obtain information or a number representing its position in the
order list. For single-order index files, the order name is the
eight-letter index file name. Using the order name is the preferred
method since the position may be difficult to determine using
multiple-order index files. Invalid values are ignored. If no index
file or order is specified, the controlling order is assumed.

<expNewSetting> is reserved for RDDs that allow the file information
to be changed, in addition to being retrieved. None of the RDDs
supplied with CA-Clipper support this argument. It can be omitted or
specified as NIL.

Returns

If <expNewSetting> is not specified, DBORDERINFO() returns the current
setting. If <expNewSetting> is specified, the previous setting is
returned.

Description

DBORDERINFO() retrieves information about the orders and index files.
By default, DBORDERINFO() operates on the currently selected work area.
It can be made to operate on an unselected work area by specifying it
within an aliased expression.

Examples

þ This example uses DBOI_NAME to save the current controlling
order. After changing to a new controlling order, it uses the saved
value to restore the original order:

#include Dbinfo.ch

USE Customer INDEX Name, Serial NEW
cOrder := DBORDERINFO(DBOI_NAME) // Name
Customer->DBSETORDER("Serial")
? DBORDERINFO(DBOI_NAME) // Serial
Customer->DBSETORDER(cOrder)
? DBORDERINFO(DBOI_NAME) // Name

þ This example uses aliased expressions to return the default
index file extension (using DBOI_INDEXEXT) in two different work
areas:

#include Dbinfo.ch

USE Sales INDEX All_Sales VIA "DBFCDX" NEW
USE Customer INDEX Name, Serial VIA "DBFNTX" NEW
? Sales->DBORDERINFO(DBOI_INDEXEXT) // .CDX
? Customer->DBORDERINFO(DBOI_INDEXEXT) // .NTX

þ In this example, DBORDERINFO(DBOI_INDEXEXT) checks for the
existence of the Customer index file independent of the RDD linked
into the current work area:

#include Dbinfo.ch

USE Customer NEW
IF !FILE( "Customer" + DBORDERINFO(DBOI_INDEXEXT))
Customer->DBCREATEINDEX("Customer", "CustName",;
{||Customer->CustName} )
ENDIF

þ This example accesses the key expression of several orders
from the same index file:

#include Dbinfo.ch

USE Customer INDEX All_Cust VIA "DBFMDX" NEW
Customer->DBSETORDER("Serial")
? DBORDERINFO(DBOI_EXPRESSION,, "Name")
// Result: key expression for name order
? DBORDERINFO(DBOI_EXPRESSION,, "Serial")
// Result: key expression for serial order

þ This example uses DBORDERINFO() as part of a TOTAL ON key
expression. Since DBORDERINFO() returns the expression as a string,
it is specified using a macro expression to force evaluation of the
key expression:

#include Dbinfo.ch

USE Sales INDEX Salesman NEW
TOTAL ON &(DBORDERINFO(DBOI_EXPRESSION)) ;
FIELDS SaleAmount TO Summary

þ In this example, All_Cust.mdx contains three orders named
CuAcct, CuName, CuZip. The DBOI_INDEXNAME constant is used to
display the name of the index file using one of its orders:

#include Dbinfo.ch

USE Customer VIA "DBFNTX" NEW
Customer->DBSETINDEX("All_Cust")
? DBORDERINFO(DBOI_INDEXNAME,, "CuName")
// Returns: All_Cust

þ The following example searches for CuName in the order list:

#include Dbinfo.ch

USE Customer VIA "DBFNTX" NEW
Customer->DBSETINDEX("CuAcct")
Customer->DBSETINDEX("CuName")
Customer->DBSETINDEX("CuZip")
? DBORDERINFO(DBOI_NUMBER,, "CuName") // 2

þ This example retrieves the FOR condition from an order:

#include Dbinfo.ch

USE Customer NEW
INDEX ON Customer->Acct TO Customer ;
FOR Customer->Acct > "AZZZZZ"
? DBORDERINFO(DBOI_CONDITION,, "Customer")
// Returns: Customer->Acct > "AZZZZZ"

Files Library is CLIPPER.LIB, header file is Dbinfo.ch.
---

richtig ist das es schon vorher SixDrive gab was in v5.3 dann Comix wurde.

also noch mal die Frage : wie macht man es unter Xbase++ :idea:
gruss by OHR
Jimmy
flanelli
Rekursionen-Architekt
Rekursionen-Architekt
Beiträge: 151
Registriert: Di, 11. Mai 2010 16:27
Hat sich bedankt: 3 Mal
Danksagung erhalten: 9 Mal

Re: Anzahl Records in Filter / Scope

Beitrag von flanelli »

AUGE_OHR hat geschrieben: Sa, 11. Jul 2020 18:36 hi,
hat wirklich keiner damit gearbeitet :?:
unter Cl*pper v5.2e gab es
also noch mal die Frage : wie macht man es unter Xbase++ :idea:
Jimmy, ich habe ja bereits gepostet dass es diese Function etc.etc. unter Clipper gab
und logischerweise wurde damit auch gearbeitet ( aus mehreren Gründen )
flanelli hat geschrieben: Sa, 11. Jul 2020 10:46 dborderinfo() etc. gab es jedenfalls in Clipper 5.3
aber in Xbase++ wüßte ich da ad hoc ( und wohl auch beim länger grübeln ) keinen direkten Ersatz
auch wenn du nochmal die Frage stellst :-)
Ahoile aus dem Süden
Benutzeravatar
AUGE_OHR
Marvin
Marvin
Beiträge: 12903
Registriert: Do, 16. Mär 2006 7:55
Wohnort: Hamburg
Hat sich bedankt: 19 Mal
Danksagung erhalten: 44 Mal

Re: Anzahl Records in Filter / Scope

Beitrag von AUGE_OHR »

hi,

mir ist klar das Xbase++ "nur" Stand Cl*pper v5.2x ist aber es existierte schon in v5.2e API
das es Alaska nicht umgesetzt hat heisst ja nicht das es nicht geht.

sieht man sich das Cl*pper v5.2e RDD Sample an so entdeckt man eine Structure

Code: Alles auswählen

typedef struct
{
 ITEM orderBag;
 ITEM order;

 ITEM result;

} DBORDERINFO;

btypedef DBORDERINFO far * DBORDERINFOP;
es ist wohl keine Frage für Xbase++ User ... aber Frank++ ist ja im Forum unterwegs und kann vielleicht die Frage beantworten.
gruss by OHR
Jimmy
Antworten