Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New to Views
Message
De
12/09/2002 20:49:35
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
12/09/2002 19:26:05
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00694270
Message ID:
00700018
Vues:
20
Steven

1) *Always* add records to the View. That'll make it easier to move data to SQL Server, Oracle or MySQL Later.
2) Why are you restating parameters and reopening the view? Why not use requery() ?
3) If you append blank to the view, you can just set focus to the control in column1 to start entering. The rest is not needed.
4) *Always* check the return value from tableupdate(). If the record did not save properly you can see all sorts of weird results. Trap the errors, offer the user another chance or tablerevert() if they Cancel.
5) What buffering mode are you using? From what you say it sounds as if you need table buffering rather than row buffering. That way you can add 1, 2 or 10 records and save them all at once when you finish.
6) Are you using primary keys? Word to the wise if not: add them now and use them as key in your views. Again, that'll make it easy to upsize later.

A couple of other issues:

1) 100 users *might* yield the dreaded "database is in use by another user" error. Check out CONNSTRING in the VFP7 manuals and consider including your pviews in a dbc included in your app, or look at http://fox.wikis.com/wc.dll?Wiki~CreatingDBCforViews~VFP for advice.

If you are using local views, *still* include the views in a dbc included in your app. VFP uses SELECT * FROM MYDBC!MYVIEW so if you set your path to the DBC path and open the MYDBC database, your included views will work fine. We include the connstring and path in an encrypted string FWIW, look at cryptoapi for easy ways to encrypt.

HTH

Regards

JR
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform