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

Can't open one particular .DBF

Status
Not open for further replies.

TheBlainer

Programmer
Aug 31, 2011
37
CA
Hi,
I have one weird problem now and that's that I can't open the file having the name choixass.dbf (it was working fine before)

To see the errors I have see :

If I rename the file any other name like why_error.dbf, I can open it. But this particular name cause errors. Hopefully, I can use it in my application without no problem (insert,update and delete reccord,etc), but I can't just open it. I cleared my temp folder and restart my computer to be sure that it's not open somewhere, but with no success.

So if anyone had this kind of error before and fixed it. It would be nice to tell me how you did it.

Thanks

TheBlainer
 
Hang on. You're saying that the problem occurs when you "open it with FoxPro". But, when you use MODIFY STRUCTURE and BROWSE from within a form, it works OK.

But when you use MODIFY STRUCTURE and BROWSE from within a form, you are opening the table in FoxPro. What are doing differently when you "open it with FoxPro"?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
I just realized that the problem only occur when I double-click my choixass.dbf and open it with FoxPro.

If I open FoxPro and after write this in the Command Window
Code:
USE g:\choixass.dbf
BROWSE
I can see my table without any problem.

This weird problem only happens with this specific table.

TheBlainer
 
MODIFY STRUCTURE will open the table designer, that can't be what you're using in your form.

Bye, Olaf.
 
only occur when I double-click my choixass.dbf and open it with FoxPro.

If you mean that things are not working by having Windows automatically launch Foxpro to open the data table when you Double-click on the file name in the Windows directory, then the problem is not really FP/VFP or the data table.

It is instead the Windows file type association not handling things correctly.

I initially ran into this issue when I installed VFP9 after installing VFP7.

When I double clicked the DBF file name (data table) it opened in VFP9 when I wanted it to open into VFP7.
But when I manually attempted to change the file type association things got worse.
Windows tried to open the data table in VFP7, but instead threw an error message.

I uninstalled VFP7 and then reinstalled it again on my workstation and it resolved the problem.

Good Luck,
JRB-Bldr
 
If this is a file association problem search for a reg file from Berezniker, which put's the correct entries into the registry, but if it was file associations it would not only be at this one table, but with any DBF you double click.

Bye, Olaf.
 
the problem only occur when I double-click my choixass.dbf and open it with FoxPro

Well, that's an entirely different matter. I wish we had known that in the first place.

I would suspect something wrong with the file associations within windows. You can check (and alter) these in Tools / Folder Options / File Types in Windows Explorer.

Alternatively, it could be something wrong with the actual filename. Is it possible that it contains a special or hidden character that's not visible when you look at it in a folder window? Did you try changing the filenamem to something else, and then changing it back again?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Actually, I can open my choixass.dbf with vfp7.

If I rename the file to why.dbf, I was able to see it. After, I renamed it to choixass.dbf and the problem still happen.
It contains no special characters.

I think I will let the problem there because it's no big deal. I still can see and use my table.

TheBlainer
 
I agree. You've reached the point where it's better to accept the situation and move on, rather than spend any more time trying to solve it.

That said, if you ever do stumble on the solution, be sure to let us know.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
While it's just the use of the table there is quite much going on: dbc events, if those are present, and table validation. In VFP8 or 9 you could try SET TABLEVALIDATE, but it's unlikely to change behaviour with the change of the filename. If a tableopen event is prorammed it might behave different for a certain dbf name, but the first question would be, if it is a dbf belonging to a database or if it is a free table.

No matter what, you'd find out if some code is running if you execute USE choixass.dbf from a prg with a breakpoint there and single step "into" the USE command (which means pressing F8 once the debugger starts).

If that doesn't bring up anything I agree with Mike, as it doesn't bite you anymore, move on.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top