FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour CDX ordKey question
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
CDX ordKey question
Posted: Wed Jan 14, 2009 09:15 AM

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

Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: CDX ordKey question
Posted: Wed Jan 14, 2009 09:24 AM

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
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: CDX ordKey question
Posted: Wed Jan 14, 2009 10:10 AM

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

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: CDX ordKey question
Posted: Wed Jan 14, 2009 10:31 AM

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
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: CDX ordKey question
Posted: Wed Jan 14, 2009 10:43 AM

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

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: CDX ordKey question
Posted: Wed Jan 14, 2009 12:55 PM
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
Posts: 117
Joined: Tue Jan 03, 2006 06:18 PM
Re: CDX ordKey question
Posted: Wed Jan 14, 2009 01:59 PM

Dear Otto,

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

regards,

Kok Joek Hoa

Continue the discussion