set index to...

Post Reply
yardenmo
Posts: 33
Joined: Tue Aug 12, 2008 7:08 am

set index to...

Post by yardenmo »

Hello,

Using: SET INDEX TO &cDbfName,

returns run time error: Open error stack calls: OrdListAdd(0)

I'm using dbf / cdx.

What should I change? (I'm using the same function for opening ordered dbf in my clipper / xBase++ applications)

Thanks,
Moshe Yarden
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Moshe,

Try it this way:

SET INDEX TO ( CurDir() + "\" + cDbfName )
regards, saludos

Antonio Linares
www.fivetechsoft.com
yardenmo
Posts: 33
Joined: Tue Aug 12, 2008 7:08 am

Post by yardenmo »

Antonio,

Thanks.

I have tried you suggestion, and many other different ways, with no success.

The USE do finds the file. The problem is just with SET INDEX.

Do you have any sample uses SET INDEX?


Regards,
Moshe Yarden
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Moshe,

Are you testing it on the emulator or on the real device ?

Please review fwppc\samples\TestBrwS.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
yardenmo
Posts: 33
Joined: Tue Aug 12, 2008 7:08 am

Post by yardenmo »

Antonio,

Thanks. It is working now.

I'm using it on the emulator. However, I think that the reason has to do with the the ... VIA "DBFCDX" .

I did try it with: DbUseArea( .T., "DBFCDX", cDbfName, @cAlias, .F., )

However I didn't call: REQUEST DBFCDX

Now it is ok.


Thanks again,
Moshe Yarden
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Moshe,

glad to know it is working fine :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply