CDX ordKey question

CDX ordKey question

Postby Otto » Wed Jan 14, 2009 9: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: CDX ordKey question

Postby fraxzi » Wed Jan 14, 2009 9: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: CDX ordKey question

Postby Otto » 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: CDX ordKey question

Postby StefanHaupt » 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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: CDX ordKey question

Postby Otto » 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: CDX ordKey question

Postby StefanHaupt » 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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: CDX ordKey question

Postby kok joek hoa » Wed Jan 14, 2009 1:59 pm

Dear Otto,

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


regards,

Kok Joek Hoa
kok joek hoa
 
Posts: 117
Joined: Tue Jan 03, 2006 6:18 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 91 guests