Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select into a table
Message
From
04/08/1999 22:46:27
 
 
To
04/08/1999 11:20:22
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00249767
Message ID:
00250051
Views:
40
>I use an select statement into a table to populate my grid (recordsourcetype= alias). The problem is that when I open a second instance of my exe the program halts I'm getting a FILE ACCESS DENIED from the select statement. What can I do to correct this?
>
>TIA
>
>Sam



Solution 1) Use View to handle, it can update the original table!!
but.... if View use wrong key assign, fail to update backward!
2nd, if you want to update all row of view, accually it update row by row with UPDATE SQL..
In past, I want to update all the data with 10K data in View, it waste need 5 minutes to finish!

but simply use Select into table(As Cetin taught), 10-20 second finish!

Solution 2) Select into Table C:\Temp\tmpTable
If you run the application in network drive, and everyone use the same function at the same time,
no problem because the table is temperately create at their own Local drive! ~_^
Cons: Can't run the same function in same machine!

Solution 3) SELECT cursor and reuse as Read/Write Cursor
As previous Nancy post, because the temp cursor IS a C:\Temp\###.tmp file
surely not duplicate and faster than Select into Table!

Solution 4) Select into array
Generally speak, I don't suggest this method as you need to count a lot to get the right field,
very hard to maintain especially you need to change the table structure!




I would suggest you first to make an Error handlier from ERROR() VFP help.
Fail to access is not the serious error to make you quit!

You can use FLOCK() to check if you can lock the file, if fail,
change the name with add a number on it.

But I would suggest you to use Set filter to, Set Field to to hide the
non-needed information and direct update on original table!

^_~ Good Luck!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Reply
Map
View

Click here to load this message in the networking platform