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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NOT A DATABASE FILE Foxpro 2.5 & XP 2

Status
Not open for further replies.

rvctips

Programmer
Jun 20, 2003
17
ES
Hi everybody,

I'm using an application (written in Foxpro 2.5a) for years and it works fine under all OS Win I tried.

But now I've some troubles when running the app in a PC under XP: I don't know why but with some (not all) files if there's another user it gives a message "NOT A DATABASE FILE". Curiously if you press Enter key it runs ok.
Any Clue?

In the same sense I've a 'real trouble" again with any of the files, and the given message is "FILE ACCES DENIED". But here there's no possibility of working any more. It's a real barrier!

Notice that when running stand-alone (no other users in the net) all works fine...

Can anybody help me?

TIA
 
If you are copying Foxpro files from a server to a new WinXP PC to set up a user, I recommend you upgrade that user to an Administrator on the PC until you get all working smoothly, and then chane the priviledges back to previous.

This avoids certain rights issues.
 
rvctips,
check antivirus. (Standalone=antivirus check only files
from you and catch it without "file denied".
Other possibility is too fast CPU.
For example sql command create working files with same names, from CPU time period.
(especially for small data - conflict between work and output files)
I have no solution, only instead of sql use classic scan/endscan...(or upgrade to Visual...)
Tesar
 
Hi Cricket, Hi Tesar:

Thanks for your attention.

I'm just getting mad with this trouble!

It's not a matter of copying files to anywhere, it's just openning certain files when the app gives errors (just in XP PC clients).

I've read some questions as mine in the net (in some forums), but I couldn't find any one with a positive answer. It seems to be THE QUESTION!

Related to antivirus, it does the same even with the antivirus unloaded.

And yes, I've read about TOO FASTERS CPU's, but right no I don't find any solution. In any case, my PC is a Compaq nx7010 with 1.6 gHz...

Also I've modified the Register in order to solve a trouble I've seen in other post, related with "Opportunistic Locking"...

Right now, IT DOESN'T WORK !!


Can anybody help me?

TIA

 
This looks like no shared directory rights.
Have a good look at the rights for the users.
If the files aren't shared in the file-directory then this problem arises...

Rob.
 
Here's my usual list of suspects, some of which are already mentioned above:

Does the XP client have read/write/modify rights to those network tables? From that XP, Go into Start/Explore and right-click on some of the problem tables, select Properties, then Security.

Shared folders: Remember, when a directory or folder is shared, you have to go into the Permission button to enable writing. The default is to only allow reading. Make sure your user or his group is listed there with rights to read/write/modify.

Folder and/or file security rights: Are these different users on the different computers? If so, have one of the users who you know it works on his computer go and log in to the problem XP.

I wonder which files it's having problems with, are they the same ones all the time, or random ones? Are the files on the server or on the local computer? If it's on the server, verify the user or his group does have read/write/modify rights on that table/memo/indexes or folder(s). If it's a work or temp file on the local computer, then it could be a rights issue of the person logged onto the XP computer. If the user doesn't have Administrator rights, XP will not let them write to the root directory of the computer. Does your program write tables or other files to the C:\ root directory?

Another idea is that something about the table has changed and the program tries to change the table but can't because it's been opened with SHARED or maybe NOUPDATE. Was the CDX (table's compound index) changed by another database language so that FoxPro wants to rebuild the index? It needs exclusive access to do that. Or maybe the language driver is different?

Opportunistic Locking on the XP can affect this. If so, add 2 new entries in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\EnableOplocks REG_DWORD value = 0
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters\OplocksDisabled REG_DWORD value = 1

There's also a bug with XP clients that was fixed in XP Service Pack 1. Are you up-to-date on security updates?

Physical problems: Sometime a faulty NIC (network interface card) or network cable is at fault but that's pretty rare.

Computers faster than 3.0 GHz: Recently some users have reported that they've had problems with FoxPro either at or exceeding that speed. Probably some internal timers were designed long ago not expecting a computer to go that fast. (There was a FoxPro fix for computers going faster than 300MHz many years ago, but I wonder if that "fix" only bumped the limit from 0.3 GHz to 3.0 GHz...) Search the forum for these reports. Very unlikely to ever see a fix this time around.

Hard to really say what your fix will be, but these are some ideas to check out. When you do get it fixed, let us know what did it.

Windows NT, 2000, 2003 and XP all emulate DOS, not natively as the older Windows do, and as you now know, it does not emulate perfectly.

Even if you don't figure out the exact cause of your problems now, you can continue to use Windows 98se or Millennium. Long term, I'd suggest you decide to upgrade to Visual FoxPro 9.0 which just had Service Pack 1 beta released. All you need is to buy one copy per developer or whoever compiles the code and you can provide unlimited compiled EXEs or DLLs for all your other users. (The VFP development program must be installed on a Windows 2000, XP or newer computer but any Windows 98 or newer computer can run the compiled applications.) If your programs are not too complicated, a simple port can finally move you out of the DOS world. There are 5 VFP forums here:

 
rvctips,
my crazy troubles arised with my developed comp 233MHz,
2.0 Fox and user computer 1 GHz.
Unfortunately no CPU patch is for DOS version,
and therefore application all the time must run,
i must "sql" replace with "scan/endscan" classic commands..
Tesar
 
Thanks dbMark
Thanks rob444
Thanks tesar

I appreciate your contributions!

But still I think the problem is other than the ones you mentioned...

I know lots of people running Fox applications in XP with no troubles. Note tesar in Fox, not in Foxpro... I think it makes the difference... And in my application are not SQL sentences...

Let's go step by step:

Shared folders: and Folder and/or file security rights
The actual server is a Win98SE PC, and what I share is the entire drive, giving thus the users the capabilitie of writing (so I think there is no trouble with rigths.

Using Win98SE as a server has no sense the Securities options you mention, you share it just for reading, or for complete (reading and writting).

Related to I wonder which files it's having problems with, are they the same ones all the time, or random ones? Always are the same (and a just a few of the opened) files. I suspect thye're the biggers) Are the files on the server or on the local computer? If it's on the server, verify the user or his group does have read/write/modify rights on that table/memo/indexes or folder(s). For me, as said before, it has not sense in Win98SE OS (server app PC) If it's a work or temp file on the local computer, then it could be a rights issue of the person logged onto the XP computer. If the user doesn't have Administrator rights, XP will not let them write to the root directory of the computer. Does your program write tables or other files to the C:\ root directory

Another idea is that something about the table has changed and the program tries to change the table but can't because it's been opened with SHARED or maybe NOUPDATE. Was the CDX (table's compound index) changed by another database language so that FoxPro wants to rebuild the index? It needs exclusive access to do that. Or maybe the language driver is different?

When there are no other users running the application from other PC's in the net, everything works fine. The application can read, write, create temp files, etc...

Opportunistic Locking I've already did this, and nothing has changed.

Physical problems: and Computers faster than 3.0 GHz: Again, when no other users, it works fine. And the processor is 1.6 gHz.

So, my point is the trouble are the biggers files (even though they're aprox. 3 to 6 Mb, or 15000 to 25000 regs... not really big...). Maybe the 'handle' XP uses has any trouble with these old files

In the other hand, and in the case I'm not able to solve this trouble, what is the VFP 9 compatibility with Foxpro 2.5 ? Other than screen sentences, inputs, etc, are there many other differences ? The files what are they like?

TIA
 
rvctips,
only for completion:
I use 2.0 FoxPro,
and unfortunately not without difficulties:
typically commands creating working files
(print, screens, copy, pack..) cca 1x daily ended with
"Use of transgressed handle" or similarly...
But if you have no trouble as standalone,
you case is different.
Tesar
 
rvctips,

When running a XP client for a Win98SE network often causes access denied or you're not authorized messages from Win98SE.

I've experienced this many times and it made me update the Win98SE machines to WinXP which solved the problem.
Re-establishing the network-share on both WinXP and Win98SE machines only solved the problem (in my case) for a short period.
Only the upgrade of Win98SE to WinXP made it stable for me.

Rob.
 
Check where FOXUSER file is being written when only one user and whenmultiple users are connected.
 
Thanks to everybody for your contributions.

As Master Yoda said: "Strange behaviour has ...!"

But, returning to the reality... what you mean with the problem could be FOXUSER? Every user get access to FOXUSER in the app path (just one for all...) I deleted the FOXUSER.dbf but not FOXUSER.fpt.

What would be the right configuration about FOXUSER?
Must I change it an use an FOXUSER.dbf for each user ???

TIA
 
The .FPT file is the file which holds MEMO field data. If you delete the .DBF, then you should delete the other too.

Probably the program will create a new table if it is missing, someone else may know more about that, but if not, you should be able to find an earlier or another valid set of DBF/FPT files. The SET RESOURCE ON/OFF setting can affect how/when that system table is used.
 
"Every user get access to FOXUSER in the app path (just one for all...)"

Why don't you try setting each user's workstation to use their own separate Foxuser resource file.

Assuming that you launch your FP 2.5 application utilizing a FPW file, you can set the RESOURCE parameter in there.

Within the FPW file you set each workstation to something like

SET RESOURCE TO c:\winnt\temp\foxuser.dbf && or some "known to exist" directory

Then each user's workstation will use its own file.

This may not resolve all of your issues, but it would eliminate one possible source of problems.

Another link you might want to look at is:
Sharing violation error
thread182-831085

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
It's really hard !!

Right now I do have a FOXUSER for each user and the awesome is when I did the change it seemed to me it worked fine .... but one hour later it's again with the same message "NOT A DATABASE FILE"... !!

When I was trying the changes I run the app in the Win98SE server, I started the sub that opens a few files, and simultaneously I run the app in the XP client, with the same sub and it run ..... but later on, it didn't...

I'll get crazy !!

But I don't have any other problems with XP and Foxpro....

Thanks to everybody for your contributions....

rvctips

 
Hello. Did you ever figure this out? I am experiencing the same things. Customer is in another state... hard to figure out why.....

thanks for your time,
Frank C.
Fort Mill, SC
 
Hello Cholewinsky,

First of all I beg your pardon for my english, but is your post related to this thread ?

I can't understand it...

cheers,

 
EXACT same thing. Win Xp get "NOT A DATABASE" when there is actually not a problem in the file, on a network. When other users get out goes away....

quote
"I'm using an application (written in Foxpro 2.5a) for years and it works fine under all OS Win I tried.

But now I've some troubles when running the app in a PC under XP: I don't know why but with some (not all) files if there's another user it gives a message "NOT A DATABASE FILE". Curiously if you press Enter key it runs ok.
Any Clue?"
 
I apologize for my lack of clarity in original post. "Customer in another state", means this is happening at a client site (customer) that is several hundred miles away (USA State Code), I cannot get actual hands-on the network to really dig-in and debug/pinpoint the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top