Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SET ORDER TO problem

Status
Not open for further replies.

kosta

Programmer
Feb 9, 2001
186
CA
I have problem with SET ORDER TO in multiuser FoxPro 2.6 for dos under Win95.
I SET PATH TO \\test\c\test
USE found table but if i try to set order Fox can't open CDX file.
if i try USE testtable ORDER TAG testtag - same problem.

Kosta

PS. My English is bad. Sorry


 
What is the exact message you get?
Is it: "Structural CDX not found"?
If so, then see if the file \\test\c\test\testtable.CDX is really there.
 
After you have followed TheRambler's suggestion and verified that the CDX file is really there, you will also want to make certain that the TAG testtag has been created.

One thing that you can try is to build the TAG again. If the TAG already exists and you have SET SAFETY ON, you will be given a warning message that you are attempting to over-write an existing TAG.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
CDX files are really there and TAG exists.
Database is on diferent mashine.
USE testtable - work
USE testtable ORDER TAG testtag - not
Message is something like "Database is not ordered".
At the moment, I can't see that message.

Thanks.
Kosta
 
To me, it means the CDX file can't be found.
Put both, DBF and CDX files in the same folder.
 
Or perhaps the CDX file has become corrupt.

You might try deleting the CDX file. When you next attempt to open the data table you will get a warning message, tell it to Ignore the problem - Open it anyway.

If you Open the table EXCLUSIVE create new indicies. Then close the table (USE).

Try to re-Open it with the ORDER set.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
use SET DEFAULT TO to the drive & folders to ensure you can locate the files.

 
This is old application which work to years in singe user mode. Now a have request to use database from other mashine.
When i start copy of application from same mashine where are databese (DBF and CDX files in same forlder) and use path like "c:\test\testtable", everithing work fine.
But, if i try to use same database from diferent mashine using SET PATH TO "\\testmachine\c\test\testtable", SET ORDER TO have problem. Only - USE testtable - find DBF file and work fine and browse.

I hope that you understund my Tarzan english. :(
Thanks.
Kosta.
 
Kosta,
your index expression ?
May be it require variable from memo file
(omitted RESTORE FROM ... in your program...)
Tesar
 
I have no index expression. No memo file...
Problem persist in command window too.
USE testtable ORDER TAG test don't work.
TAG test exists. From same mashine that work.
Something like link between DBF and CDX is not right.

Kosta
 
"I have no index expression."
BUT
"TAG test exists"

If TAG Test exists, then you DO have an Index expression.

At some time you did a
Code:
   USE testtable EXCLUSIVE
   SELECT testtable
   INDEX ON <expression> TAG Test


So the difference you are seeing seems to be based in the difference between:
"c:\test\testtable" && Used in Command Mode
"\\testmachine\c\test\testtable" && Used by application

While "hard coding" is most definitely not recommended, have you tried to use "c:\test\testtable" in your application as a test?

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 

Sorry, my foult. I try to write that
I have NO PROBLEM with index expression :(((.

In application i use something like (simplified)
use company
company_path = company.path && \\machine_name\drive\database_folder
SET PATH TO &company_path

everything is fine if i use path "c:\database_folder" and database is on same machine like application.

I definetly have problem to explaine problem. :(
Application don't work under network.
I locate that problem is not in application
Even in command window if I try to use table from diferent mashine then (CDX)tag is not availlable.
If i try USE \\machine_name\drive\database_folder\testtable
SET ORDER TO testtag - don't work

Thanks to all for patience. Bye.
Kosta.
 
Rather than attempting to use the machine_name can you Map the other drive to a different drive letter within the Operating System on the remote workstation (example: F:\)?

If you can, then attempt to address the data table on the remote workstation with the mapped file name.

Code:
  * --- Example: ---
   mcDataPath = "F:\database_folder"
   mcDBF = mcPath + "\testtable.dbf"
   USE (mcDBF) IN 0
   SELECT TestTable
   SET ORDER TO TestTag

However if, as you say, "I locate that problem is not in application", then the problem might need to be resolved within your Operating System. Once that is corrected, then you can look into getting the FP application to work.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top