Page 2 of 2

Re: dbfs on Network : wich performance method?

Posted: Wed Oct 31, 2018 1:47 pm
by Silvio.Falconi
Enrico Maria Giordano wrote:Can you send me the DBF and the CDX to reproduce the problem here, please?

EMG

SENT

Re: dbfs on Network : wich performance method?

Posted: Wed Oct 31, 2018 2:00 pm
by Enrico Maria Giordano
Ok, thank you. As you can check for yourself, the CDX contains a tag with "id" key. So it's just a corrupted CDX. Please delete it, rebuild it and let me know.

EMG

Re: dbfs on Network : wich performance method?

Posted: Fri Nov 02, 2018 10:34 am
by Silvio.Falconi
I erase the cdx.
then I run the test made from James
it create the cdx
then open emagdbu , open customer database
Open the cdx and set the tag id
the same

Re: dbfs on Network : wich performance method?

Posted: Fri Nov 02, 2018 10:54 am
by Enrico Maria Giordano
The example from James is not valid for your customer.dbf because it builds the wrong tag:

Code: Select all | Expand

Index on "id" tag "custno" to customer


Your customer.dbf doesn't have a field named "id".

EMG

Re: dbfs on Network : wich performance method?

Posted: Fri Nov 02, 2018 11:22 am
by Silvio.Falconi
yes of cource but...

why the code ( test.prg) compiled create the cdx if is not valid ?
we Know it's is not valid but the exe crete the cdx

Re: dbfs on Network : wich performance method?

Posted: Fri Nov 02, 2018 12:22 pm
by Enrico Maria Giordano
I don't know, sorry.

EMG

Re: dbfs on Network : wich performance method?

Posted: Fri Nov 02, 2018 3:13 pm
by James Bott
Sorry if I sent the wrong customer file. It is disconcerting that the CDX was created without any error message. That would be hard to track down as we have just seen.

Silvio, were you able to get the sample to run now?

James

Re: dbfs on Network : wich performance method?

Posted: Fri Nov 02, 2018 4:30 pm
by Silvio.Falconi
James,

I wanted understand why the command :

Code: Select all | Expand

Index on "id" tag "custno" to customer


create the cdx and not make error

It seem we can index any field not exist into a dbf ... :)

Re: dbfs on Network : wich performance method?

Posted: Fri Nov 02, 2018 4:35 pm
by Enrico Maria Giordano
I just realized that this syntax is uncorrect:

Code: Select all | Expand

Index on "id" tag "custno" to customer


The correct one is:

Code: Select all | Expand

Index on id tag "custno" to customer


Or, even better:

Code: Select all | Expand

Index on FIELD -> id tag "custno" to customer


EMG

Re: dbfs on Network : wich performance method?

Posted: Fri Nov 02, 2018 4:48 pm
by James Bott
Enrico,

Thanks for finding that.

I did a search of all my source and I did find a couple of other times I used quotes. It would be nice if this generated an error. I must have been going nuts trying to figure out why those indexes weren't working.

Enrico, would this be a (x)Harbour issue. If so, would you mind reporting it?

James

Re: dbfs on Network : wich performance method?

Posted: Fri Nov 02, 2018 5:04 pm
by Enrico Maria Giordano
This is not a bug. Is perfectly legal to build an index on a constant key:

Code: Select all | Expand

INDEX ON .T. TO TEST


EMG

Re: dbfs on Network : wich performance method?

Posted: Fri Nov 02, 2018 5:52 pm
by James Bott
Ok. I am curious of what use that would be?