Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Free tables or database ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01046547
Message ID:
01046647
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
Moises!

>
> I still use free tables and would like friends opinion if I
> should use or not database. I wonder if most of developers
> here use free table or database
>

You get a lot from using a Database for Your tables. One of the most important gains is that You get *logic* on a Database-level (RI, Triggers, Rules, Stored Procedures,...). On the first sight nothing You could not achieve in normal code (with a lot more work because You always have to think of it and use it). But that logic even works when someone from outside works with Your tables - let's say via OLEDB from Excel or VB. In that scenario normally all Your RI- or Triggercode does not work.

Thus using a Database makes Your model more robust and safe.

Then there are these practical things like long FieldNames and FieldCaptions. Even if You use a simple browse its much nicer if the customer sees "Customer No." than "CUST_NO" (You can do BROWSE fields ... h=.... but its extra work).

Buffering... I'm not sure. Yes buffering works without DB but Transactions do not work (You don't get an error, they simply do not work)

However as each dollar has two sides, this applies here too. You always have more file-handles (not a big deal today), You loose backward compatibility. Sometimes I have a VFP add-On for a Fox2.x-application. A table that belongs to a DB has a different header and cannot be read by Fox2.x.

You might run into maintennance issues that can be anything else but funny. If for some reason Information in the table does not match the information in the Database (fields, indices...), you can't easily open the table to correct that. All You get is something like "Database container not valid for this table..."

I also have some modules that I use in several of my applications like e-Mail functionality. This has tables like MAIL_BODY, MAIL_HEAD, MAIL_FOLDER, etc... If I add them to the project's Database, I get problems with my forms and classes as those sometimes hold the DBC-Information (see form's dataenvironment -> cursor).

So I ended up with an extra Database for these modules. That brought up other issues in coding....

Finally You should know, that a command like "Close Data" doesn't necessarily do what You expect when You work with databases. If You have a few tables open, some from a database, some free (or from another DBC), and the DB is not selected, "close data" closes the free tables (and from the selected DBC) but leaves the unselected DBC's tables open.






Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform