CDX ordKey question

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

CDX ordKey question

Post by Otto »

I can’t find out the function which returns the value “how many ordkey’s” a cdx file has.
Test.dbf
index on field->datum tag u_datum
index on dtos(field->datum)+str(field->renr) tag u_datrg
index on dtos(field->datum) + Upper(field->artnum) tag u_datart

The function should return for this example 3.

Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

Re: CDX ordKey question

Post by fraxzi »

Sir,

<cAlias>->( OrdKeyCount() ) will do.


Regards,
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: CDX ordKey question

Post by Otto »

Hello fraxzi,

OrdKeyCount() I think gives back the items within an key.
I need the number of key which are compound in on index file.

For example:
Test.dbf
Test.cdx has following tags:
tag u_datum
tag u_datrg
tag u_datart

I would need as anwer 3 in this example.
ordKeyCount() gives me back 2945, which are the records matching tag u_datum.

As a workaround I do:

for Itest := 1 to 20
if len(Alltrim(ordkey()))=0
msginfo(Itest)
endif
next

Do you know if there exists a function for that.

Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: CDX ordKey question

Post by StefanHaupt »

Otto,

OrdKeyCount() returns the number of matching records in an order.

In xharbour there is the function OrdCount(cBag) to get the no. of indexes in an order.
kind regards
Stefan
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: CDX ordKey question

Post by Otto »

Hello Stefan,

Thank you. This function is what I was looking for.
If I remember well you are a CAD expert.
Some years ago I saw and tested an AUTOCAD clone written in FIVEWIN.
Do you know if this program is still available?

I would need a CAD program like “AutoCAD lite” for my personal use.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: CDX ordKey question

Post by StefanHaupt »

Hello Otto,

this AutoCAD clone had been written by Arturo Tamayo Daza, on his website http://www.quark-costos.com/index.php you can get more informations.

For personal use there is open source project called CADEMIA, that offers a free CAD software. Look at http://www.cademia.org

If you need more informations about CAD please contact me directly: sthaupt@uni-kassel.de. I can give you some advices.
kind regards
Stefan
kok joek hoa
Posts: 117
Joined: Tue Jan 03, 2006 6:18 pm

Re: CDX ordKey question

Post by kok joek hoa »

Dear Otto,

Try this :
aindex:=getordnames()
msginfo(len(aindex))


regards,

Kok Joek Hoa
Post Reply