×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Visual Foxpro sp1 vs Visual Foxpro sp2

Visual Foxpro sp1 vs Visual Foxpro sp2

Visual Foxpro sp1 vs Visual Foxpro sp2

(OP)

hello, when I create a new table or using one table witout CDX TAGS and immediately I create an index the sp2 asks that it be opened in exclusive mode:

xtable = "new" + sys (3)
select * from city into table (xtable)
use (xtable) alias newcity
index on cod_city tag cod_city

What other changes are there with the handling of indices in SP2?

RE: Visual Foxpro sp1 vs Visual Foxpro sp2

This is nothing new, you have always needed to open a table exclusive to create index tags. Could it be that you are used to having "Set Exclusive On" ?

RE: Visual Foxpro sp1 vs Visual Foxpro sp2

(OP)
I used set exclusive in network environment

when a table does not have structural indexes CDX allowed indexes without opening the exclusive table, I'm using sp2 and I found this problem because in all the programs that use temporary tables I had not opened them in exclusive mode:
Example to reproduce:
in SP1:
use tablex exclusive
delete tag all
use tablex shared
index ON fieldx TAG tagx
in SP2
the last instruction causes the error: file must be open exclusive

RE: Visual Foxpro sp1 vs Visual Foxpro sp2

You are wrong, or your memory is wrong! Re-read my first message. To create an "old fashioned" index file (IDX), you don't need to have the table opened exclusive, but to create an index tag, you must have exclusive access. This has never changed!!!

My guess is that you are mixing tables with cursors. Cursors are exclusive "by design", so to say.

RE: Visual Foxpro sp1 vs Visual Foxpro sp2

Tore is right, to create a structural index tag you are altering the tables structure - storing the tag details in the table and the index in the associated .cdx - so exclusive access is needed.

For an independent idx index there is no structural mod required, so the exclusivity is not needed - but then the idx may not be up to date next time you open the table, because it could have been opened meanwhile without the idx being opened.

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Visual Foxpro sp1 vs Visual Foxpro sp2

Avsalf, I have run your code in SP1. I am seeing the same error that you reported in SP2. The answer to your question is: there are no changes concerning indexes between SP1 and SP2. In both cases, you need exclusive access - just as in all previous versions.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Visual Foxpro sp1 vs Visual Foxpro sp2

(OP)
Thanks for the answers, where I get a documents of changes or corrections in VFP SP2?

RE: Visual Foxpro sp1 vs Visual Foxpro sp2


Mike,

I read also in this long list, but that are the bugs fixed is it not?
Under chapture Data:
It is possible to create structural index for a table opened in read-only mode, but it is not opened next time the table is opened.

That seems to be the case here I believe.

Koen

RE: Visual Foxpro sp1 vs Visual Foxpro sp2

Coming late to the party,

you actually don't really have a problem, do you? As you create a newtable you can choose to delay the use (xtable) alias newcity. Just do it after you created all index tags.

CODE

xtable = "new" + sys (3)
select * from city into table (xtable)
index on cod_city tag cod_city
*...any further stuff needing exclusive access
use (xtable) alias newcity 

I also don't think many developers were affected by this bugfix, if it really is what Koen found as security gap.

You always test against new versions before rolling them out, that also applies to SPs.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close