Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DBCs drive me nuts!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01496239
Message ID:
01496247
Vues:
79
>I am going in circles with my DBC. In Design Mode, I am going round and round. It also is affecting the Production mode. This is why I've never liked FoxPro's DBCs.
>
>I wrote in the following in the Form's LOAD method:
>
>OPEN DATABASE C:\Karls\Data\Karls.DBC
>
>
>I initially had a DBC in a folder called Data, as follows: C:\Dev\Karls\Data, however, I got rid of it and am going directly to the folder called C:\Karls\Data where the production data will reside. This is not a big time client who would want or even know what a server is; this is data which resides on the client's own desktop.
>
>I continually get this error when I bring up my form:
>
>Error instantiating cursor object. Cannot find
>C:\Karls\Data|Orders in C:\Karls\Data\Karls.dbc.
>
>
>The data is there and all I do is hit the LOCATE button to lead the program to it. But, why won't this work automatically?
>Here is what I have in the Form's DataEnvironment.BeforeOpenTables method:
>
>This.Cursor1.Database="C:\Karls\Data\Karls.dbc"
>This.cursor1.CursorSource="C:\Karls\Data\Orders"
>This.Cursor2.Database="C:\Karls\Data\Karls.dbc"
>This.cursor2.CursorSource="C:\Karls\Data\Customers"
>This.cursor3.CursorSource="C:\Karls\Data\States"
>This.cursor4.CursorSource="C:\Karls\Data\Warranty"
>
Sounds like table(s) are no longer on the same relative path to their DBC. I believe this can be fixed using VALIDATE DATABASE RECOVER (back up the DBC and tables first).

In my experience the best bet is to always have the DBC and its tables in the same folder. That way, no path information is stored. If you ever move the tables to a different folder than the DBC, relative paths start getting stored, and will still get stored even if you move the tables back to the same folder.

If you do have the DBC and tables in different folders, as Craig points out you need to maintain their relative path locations.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform