dbTalk Databases Forums  

FoxPLUS 2.0 DOS/UNIX - index on Date

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss FoxPLUS 2.0 DOS/UNIX - index on Date in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sanjay Minni
 
Posts: n/a

Default FoxPLUS 2.0 DOS/UNIX - index on Date - 10-18-2004 , 09:24 PM






OK, I have to maintain this project on FoxBASE 2.0 (DOS/UNIX)

I have a file
code n,4
date date

indexed on str(code)+dtoc(date)
at all times
set date ansi
is done

The index does not behave properly,
and in a shortwhile the index gets corrupted
specially when I add records
Any Idea how I can keep it going stably specially
in a multiuser environment

Reply With Quote
  #2  
Old   
swdev2
 
Posts: n/a

Default Re: FoxPLUS 2.0 DOS/UNIX - index on Date - 10-18-2004 , 10:05 PM






hi - the code field is numeric - so to be absolute -
you want
padl(str(code),"0",10)
for example.
give it a shot - basically it
will take your number, up to 10 digits
and pad 0's to the front, on the left.
so a number of 320 becomes '0000000320'


also - I THINK you can use the other param in DTOC on that version, for the
indexing bit.
is it/was it ???? > dtoc(<dateval>,1) ??
i can't remember - its been some time.
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
VFP Webhosting? You BET! -> http://efgroup.net/vfpwebhosting
mySql / VFP / MS-SQL

"Sanjay Minni" <sminni_SPAM_DIVERTER (AT) planage (DOT) com> wrote

Quote:
OK, I have to maintain this project on FoxBASE 2.0 (DOS/UNIX)

I have a file
code n,4
date date

indexed on str(code)+dtoc(date)
at all times
set date ansi
is done

The index does not behave properly,
and in a shortwhile the index gets corrupted
specially when I add records
Any Idea how I can keep it going stably specially
in a multiuser environment



Reply With Quote
  #3  
Old   
Cass Lewart
 
Posts: n/a

Default Re: FoxPLUS 2.0 DOS/UNIX - index on Date - 10-19-2004 , 09:35 PM



Sanjay Minni (sminni_SPAM_DIVERTER (AT) planage (DOT) com) wrote:
: OK, I have to maintain this project on FoxBASE 2.0 (DOS/UNIX)

: I have a file
: code n,4
: date date

: indexed on str(code)+dtoc(date)
: at all times
: set date ansi
: is done

: The index does not behave properly,
: and in a shortwhile the index gets corrupted
: specially when I add records
: Any Idea how I can keep it going stably specially
: in a multiuser environment

All you have to do is add a parameter (1), e.g.,

index on text+dtoc(datefield,1) to indexfile


--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Cass Lewart Voice (732) 264-9541 Fax (630) 566-0349/_/
_/ e-mail: rlewart (AT) monmouth (DOT) com _/_/_/_/_/_/_/_/_/_/_/_/_/
_/ N 40 deg 23' 41.9", W 74 deg 11' 29.7"/_/_/_/_/_/_/_/_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.