Strange Index problem for ADS RDD
- kokookao2007
- Posts: 59
- Joined: Thu May 17, 2007 8:27 am
Strange Index problem for ADS RDD
hi all :
I have a item database whice has a normal index key.
But the sort was very strange .
NO (item.dbf)
=================
HST-1002-1
HST-1002
HST-1002-2
HST-1002-4
HST-1002-3
USE ITEM NEW EXCL
INDEX ON NO TO ITEM
BROWSE()
show in ADS RDD:
HST-1002-1
HST-1002-2
HST-1002-3
HST-1002-4
HST-1002 ==> shoule be first
should be:
HST-1002
HST-1002-1
HST-1002-2
HST-1002-3
HST-1002-4
Anyone know about it ?
--
Best Regards
-----------------
kokoo KAO
I have a item database whice has a normal index key.
But the sort was very strange .
NO (item.dbf)
=================
HST-1002-1
HST-1002
HST-1002-2
HST-1002-4
HST-1002-3
USE ITEM NEW EXCL
INDEX ON NO TO ITEM
BROWSE()
show in ADS RDD:
HST-1002-1
HST-1002-2
HST-1002-3
HST-1002-4
HST-1002 ==> shoule be first
should be:
HST-1002
HST-1002-1
HST-1002-2
HST-1002-3
HST-1002-4
Anyone know about it ?
--
Best Regards
-----------------
kokoo KAO
- Detlef Hoefner
- Posts: 312
- Joined: Sat Oct 08, 2005 9:12 am
- Location: Germany
- Contact:
kokookao2007,
plerase try as the following ...
hth,
Regards,
Detlef
plerase try as the following ...
Code: Select all
USE ITEM NEW EXCL
INDEX ON NO TO ITEM
SET INDEX TO ITEM
BROWSE()
Regards,
Detlef
- Detlef Hoefner
- Posts: 312
- Joined: Sat Oct 08, 2005 9:12 am
- Location: Germany
- Contact:
kokookao2007,
i'm sorry but i've no experience with ADS.
But what happens if you code
If it's still the same, you should ask our ADS master, RF for help.
Regards,
Detlef
i'm sorry but i've no experience with ADS.
But what happens if you code
Code: Select all
USE ITEM NEW EXCL
INDEX ON NO TO ITEM
SET INDEX TO ITEM
item->( dbGoTop() )
BROWSE()
Regards,
Detlef
- RAMESHBABU
- Posts: 591
- Joined: Fri Oct 21, 2005 5:54 am
- Location: Secunderabad (T.S), India
Hello Mr.kokoo KAO
I am using ADS 7.10 and I am getting the same result what you are
expecting. And this is the result browse screen of the test program :
AND THE RESULT SCREEN IS :
http://img129.imageshack.us/my.php?imag ... dexer2.png]
Which version of ADS you are using ?
Regards
- Ramesh Babu P
I am using ADS 7.10 and I am getting the same result what you are
expecting. And this is the result browse screen of the test program :
Code: Select all
#include "fivewin.ch"
#include "ads.ch"
FUNCTION main()
* Advantage Database Server Settings
REQUEST ADS, ADSKeyCount, ADSKeyNo, OrdKeyCount, OrdKeyNo
rddRegister( "ADS", 2 )
rddsetdefault( "ADS" )
SET SERVER LOCAL
SET FILETYPE TO CDX
AdsSetDeleted(.T.)
?adsversion()
USE adsindex.asc
INDEX ON adsindex->no TO adsindex
SET INDEX TO adsindex
BROWSE()
RETURN nil
AND THE RESULT SCREEN IS :
http://img129.imageshack.us/my.php?imag ... dexer2.png]
Which version of ADS you are using ?
Regards
- Ramesh Babu P
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- kokookao2007
- Posts: 59
- Joined: Thu May 17, 2007 8:27 am
hi all:
http://kokookao.myweb.hinet.net/xharbou ... browse.jpg
try edit item no:
HST-1002-1
HST-1002 ==>HST-1002-
HST-1002-2
HST-1002-4
HST-1002-3
BROWSE():
HST-1002- ==>first now
HST-1002-1
HST-1002-2
HST-1002-3
HST-1002-4
why HST-1002 can not sort in first ?
bug or library problem ?
it is correct sort in "dbfcdx" rdd .
--
Best Regards
-----------------
kokoo KAO
?adsversion() ==> 8.10
Do not use a database pointer in the creation of your indexes ..
INDEX ON adsindex->no TO adsindex
INDEX ON no TO adsindex
==> same
what my screen image:my xHarbour version :99.70
http://kokookao.myweb.hinet.net/xharbou ... browse.jpg
try edit item no:
HST-1002-1
HST-1002 ==>HST-1002-
HST-1002-2
HST-1002-4
HST-1002-3
BROWSE():
HST-1002- ==>first now
HST-1002-1
HST-1002-2
HST-1002-3
HST-1002-4
why HST-1002 can not sort in first ?
bug or library problem ?
it is correct sort in "dbfcdx" rdd .
--
Best Regards
-----------------
kokoo KAO
- kokookao2007
- Posts: 59
- Joined: Thu May 17, 2007 8:27 am
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- kokookao2007
- Posts: 59
- Joined: Thu May 17, 2007 8:27 am
hi James :
Thank you for reply.
--
Best Regards
-----------------
kokoo KAO
Thank you for reply.
What my problem is the Index Sorting not correct , not dbseek() problem.IN RDD "DBFCDX" FIELD NO:
================
HST-1002
HST-1002-1
HST-1002-2
HST-1002-3
HST-1002-4
===============
DBSEEK(TRIM(cITEM)) //==> "HST-1002 "
IN RDD "ADS" FIELD NO:
================
HST-1002-1
HST-1002-2
HST-1002-3
HST-1002-4
HST-1002
===============
DBSEEK(TRIM(cITEM)) //==> "HST-1002-1"
--
Best Regards
-----------------
kokoo KAO
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- kokookao2007
- Posts: 59
- Joined: Thu May 17, 2007 8:27 am
hi all:
Should I edit any includ file code for RDD "ADS" ?
-----------------
kokoo KAO
Should I edit any includ file code for RDD "ADS" ?
Best Regards
#include "fivewin.ch"
#include "ads.ch"
RddRegister( "ADS", 1 )
RddSetDefault( "ADS" )
SET FILETYPE TO CDX
AdsSetServerType(1) //local
AdsSetDeleted(.T.)
USE ITEM NEW EXCL
INDEX ON ITEM->NO TO ITEM
=>
dbUseArea(.T.,,"ITEM",,if(.F. .or. .T.,!.T.,NIL),.F. )
dbCreateIndex((FILE_TH + "ITEM"),"ITEM->NO",{||ITEM->NO},IIF(.F.,.t.,NIL ) )
Now the "Index on " command transfer form fwstd.ch.
-----------------
kokoo KAO