Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Clipper Visual-Objects > Re: CDX index c...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 10 Topic 11363 of 11703
Post > Topic >>

Re: CDX index corruption?

by "Geoff Schaller" <geoffx@[EMAIL PROTECTED] > May 1, 2008 at 11:51 PM

Bert.

1.  You must not mix clipper function calls with DBServer class object 
use. Unfortunately there will be problems relating to workarea usage.

2.   When you open a CDX based DBF the index of the same name is 
automatically opened unless you suppress that. DO NOT reopen the index. 
DO NOT open another index unless you really know what you are doing.

3.   With CDX you generally only have one index with multiple orders. 
Set the order you need, when you need it.

4.   Done this way, the orders self-maintain.

Geoff


"Bert Bonnemaijers" <h.nospam.bonnemaijers.geenspam@[EMAIL PROTECTED]
> 
wrote in message news:481a3387$0$24400$5fc3050@[EMAIL PROTECTED]
> Hello Dick,
>
> Bedankt voor je reactie!
>
> Everything I tried gives the same result:
>
> The very  old Clipper-style:
> USE INGREDIENT VIA "DBFCDX" NEW
> INDEX ON INGREDIENT TO ING_INGRED
>
> The less old Clipper-style:
> IF DBUSEAREA(TRUE, "DBFCDX", "INGREDIENT",,TRUE)
> DBCREATEINDEX("Ing_Ingred",,{||INGREDIENT->INGREDIENT})
>
> The CreateOrder() way:
> LOCAL oIngredient AS Ingredient
> oIngredient:=Ingredient{}
> oIngredient:CreateOrder(,"Ing_IngNr","INGRNR")
> oIngredient:CreateOrder(,"Ing_Ingred","INGREDIENT")
>
> All these different approaches create a file called ING_INGRED.CDX with
a
> size of 7168 bytes.
>
> So I think the index itself is OK.
>
> So maybe it is something wrong in the way I call the server. I have a
> dataserver with a Postinit() in which I put the following lines:
>
> SELF:SetIndex("Ing_ingred")
> SELF:SetIndex("Ing_ingnr")
> SELF:SetOrder("Ing_ingred")
>
> Attaching the dataserver to a datawindow or datadialog gave the right
index
> and worked fine until I built the new indexes. After that the index
didn't
> work properly. (see my first post in this topic).
>
> If the index is created by the DB-editor all works fine, if the index is
> created by one of the index-commands of functions it doesn't work
properly.
> So I suppose it are two different kind of index-files, otherwise this
> problem wouldn't occur.
>
> If I drop the indexmodule, things will be working like I want them to,
but
> what happens if it is necessary to rebuild the indexes in case of
> powerfailure or something like that? Or is there no way the CDX-indexes
can
> get corrupt? Sorry, but I don't get it.
>
> Greetings,
>
> Bert Bonnemaijers
>
>
> "D.J.W. van Kooten" <public@[EMAIL PROTECTED]
> schreef in bericht
> news:6l6k145m97kqjmmcrvj1krp4vt3ftgsbbk@[EMAIL PROTECTED]
> > On Thu, 1 May 2008 21:00:09 +0200, "Bert Bonnemaijers"
> > <h.nospam.bonnemaijers.geenspam@[EMAIL PROTECTED]
> wrote:
> >
> > Hello Bert,
> >
> >>But from what I am reading now, I understand that it is possible to
> >>rebuild
> >>indexfiles from a dataserver attached to a datawindow? I didn't see a
> >>method
> >>in the datawindow or dataserver class to do that.
> >>
> >>Can you give me any clue?
> >>
> >
> > You mean something like:
> >
> > IF !odb:CreateOrder("uid",cCdx,"userid") // Create order 1
> > lSuccess:=FALSE
> > ENDIF
> > IF !odb:CreateOrder("relatie",cCdx,"relatie+userid")// Create order 2
> > lSuccess:=FALSE
> > ENDIF
> >
> > From the help file:
> >
> > <oDBServer>:CreateOrder(<cOrderName>, <oFSIndex> | <cIndex>, <cExpr>,
> > [<cbExpr>], [<lUnique>]) ---> lSuccess
> >
> >
> >
> > Dick van Kooten
 




 10 Posts in Topic:
CDX index corruption?
"Bert Bonnemaijers&q  2008-05-01 16:52:31 
Re: CDX index corruption?
"Stephen Quinn"  2008-05-01 15:47:41 
Re: CDX index corruption?
"Bert Bonnemaijers&q  2008-05-01 21:00:09 
Re: CDX index corruption?
D.J.W. van Kooten <pub  2008-05-01 21:33:37 
Re: CDX index corruption?
"Bert Bonnemaijers&q  2008-05-01 23:17:54 
Re: CDX index corruption?
"Geoff Schaller"  2008-05-01 23:51:48 
Re: CDX index corruption?
"Stephen Quinn"  2008-05-02 03:28:09 
Re: CDX index corruption?
"Bert Bonnemaijers&q  2008-05-02 23:27:43 
Re: CDX index corruption?
Karl Faller <k.faller_  2008-05-03 14:22:23 
Re: CDX index corruption?
"Bert Bonnemaijers&q  2008-05-03 22:46:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 21:10:25 CDT 2008.