For Programmers: Free Programming Magazines  


Home > Archive > Clipper > March 2004 > AutoOpen index file ??









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author AutoOpen index file ??
Gejza Horvath

2004-03-26, 10:59 pm

Hi,
using Clipper 5.2.e since 1995. The file DODLIST.DBF is opened with INDEX
DODLIST.CDX, which contains 3 orders. Somwhere in application I want to
build a temporary index with FOR expression with the same 3 orders, to show
only the part of records. Here is the code, DODLIST is the current workarea:

cTmpNtx1 := "Temp111.CDX"
DBCLEARINDEX() && close the zoznamdl.cdx -> works O.K., no opened
index file

INDEX ON (dodavatel+cislofakt) TAG CisloFak TO (cTmpNtx1) FOR;
RIGHT(DTOC(DatumDod),7) == cObd

DBCLEARINDEX()
INDEX ON DTOS(datumdod) TAG Datum TO (cTmpNtx1) FOR;
RIGHT(DTOC(DatumDod),7) == cObd

DBCLEARINDEX()
INDEX ON Doklad TAG Doklad TO (cTmpNtx1) FOR;
RIGHT(DTOC(DatumDod),7) == cObd

CLOSE INDEXES

SET INDEX TO (cTmpNtx1)

All works fine: after CLOSE INDEXES the debugger shows: the workarea is not
indexed -> O.K.
but
after SET INDEX TO (cTmpNtx1) the debugger shows the workarea has 2 opened
index files DODLIST and TMP111 and 6 active orders !!!!
I have 2 questions:

1. Why is opened the DODLIST.CDX ?? It seems, like the Autoopen feature of
CDX driver in Visual Objects, but I did not read about it in documentation.

2. How can I close only one order bag, in this case DODLIST? The NG says
about the next order managment functions:
- OrdlistClear() - closes ALL the indexes
- OrdDestroy() - removes the specified order from the order bag

Gejza Horvath



Stephen Quinn

2004-03-26, 10:59 pm

Gejza

> DBCLEARINDEX() && close the zoznamdl.cdx -> works O.K., no opened index file

To my knowledge that doesn't work for the 'DBFCDX' implemented by Successware which the 'DBFCDX' RDD
driver in 5.2 is based on (SIX2) (not sure about COMIX as I haven't tried to do it).
ie - You cannot close the structural index and keep the DBF open.

--
HTH
Steve Quinn


Ray Marron

2004-03-26, 10:59 pm

"Stephen Quinn" <steveqNOSPAM@integritynet.com.au> wrote in message
news:c3o1tv$29l1b0$1@ID-88745.news.uni-berlin.de...
> Gejza
>
> To my knowledge that doesn't work for the 'DBFCDX'
> implemented by Successware which the 'DBFCDX' RDD
> driver in 5.2 is based on (SIX2) (not sure about COMIX
> as I haven't tried to do it).
> ie - You cannot close the structural index and keep the
> DBF open.


That is correct in regards to 5.2+Comix. The only way to close a structural
index is to close the dbf, turn off autoopen (cmxAutoOpen(.F.)) and reopen
the dbf.

--
Ray Marron

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com