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


Data Bases > Xbase Fox > Re: Creating In...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 757 of 857
Post > Topic >>

Re: Creating Index in DbaseIV

by "zuna" <zuna22@[EMAIL PROTECTED] > Apr 24, 2007 at 08:05 PM

hello peter,

just try to change the name of index file to something other then the name
of the dbf file....if you have structural index file (same name as dbf
file)
fox/dbase try to automaticaly open index file, so if it is deleted, you
receive error message....on the other way, when the index is open you
can't
delete it...so in this case you have to use reindex command....on the
other
way in foxpro, when dbf have open structural index, you can use command
delete tag all, and then create new index....all this is for foxpro/visual
foxpro, couse i haven't work with dbase from version III...


here is txt from help file about delete tag all (foxpro help)

DELETE TAG ALL [OF CDXFileName]ParametersTagName1 [OF CDXFileName1] [,
TagName2 [OF CDXFileName2]] ... Specifies a tag to remove from a compound
index file. You can delete multiple tags with one DELETE TAG by including
a
list of tag names separated by commas. If two or more tags with the same
name exist in the open index files, you can remove a tag from a specific
index file by including OF CDXFileName.ALL [OF CDXFileName] Removes every
tag from a compound index file. If the current table has a structural
compound index file, all tags are removed from the index file, the index
file is deleted from the disk, and the flag in the table's header
indicating
the presence of an associated structural compound index file is removed.
Use
ALL with OF CDXFileName to remove all tags from an open compound index
file
other than the structural compound index file.RemarksCompound index files,
created with INDEX, contain tags corresponding to index entries. DELETE
TAG
is used to remove a tag or tags from open compound index files. You can
delete only tags from compound index files open in the current work area.
If
you remove all the tags from a compound index file, the file is deleted
from
the disk.Visual FoxPro looks first for a tag in the structural compound
index file (if one is open). If the tag isn't in the structural compound
index file, Visual FoxPro then looks for the tag in the other open
compound
index files.Visual FoxPro issues a warning if you attempt to delete a
primary or candidate index tag and SET SAFETY is ON.
hope this will help...

zuna

"Peter" <petercritic@[EMAIL PROTECTED]
> wrote in message 
news:1176916247.401315.320850@[EMAIL PROTECTED]
>I have a dos batch file that opens dbaseiv and runs the following code
> in a .prg
>
> When the .mdx don't exist it gives me the error Production .MDX file
> not found: INDUSTOL.mdx
>
> if the .mdx already exists I get the error File already exists
>
> either way the batch file stops running.  I've tried deleting the .mdx
> files but then get error 1 and also leaving them alone and getting
> error 2.  I've started reading about using reindex but can't make that
> work either.  Does anybody know what I need to do to get this
> working.
>
> Thanks,
> Pete
>
> ps. this code below works fine on XP Home edition but when I moved it
> to XP Pro it doesn't work anymore.
> ~~~~~~~~~~~~~~~~~~~~~~
>
>
> use industol.dbf
> index on city+stnm+str(stnum) tag address of industol.mdx
> index on str(rent,10,2) tag rent of industol.mdx
> index on stnm tag street of industol.mdx
> close all
>
>
> use officeol.dbf
> index on city+stnm+str(stnum) tag address of officeol.mdx
> index on str(rent,10,2) tag rent of officeol.mdx
> index on stnm tag street of officeol.mdx
> close all
>
>
> use webol.dbf
> index on city+stnm+str(stnum) tag address of webol.mdx
> index on str(rent,10,2) tag rent of webol.mdx
> index on stnm tag street of webol.mdx
> close all
>
 




 2 Posts in Topic:
Creating Index in DbaseIV
Peter <petercritic@[EM  2007-04-18 10:10:47 
Re: Creating Index in DbaseIV
"zuna" <zuna  2007-04-24 20:05:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Wed Aug 20 8:05:07 CDT 2008.