Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I create a VIEW from a free table?
Message
De
19/04/1999 15:23:01
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00209037
Message ID:
00209830
Vues:
29
>This may have been answered dow the thread but allow me to interject.
>
>1) You can create a local view on a free table.
>2) The table is free but the view is part of the DBC
>3) You will have to tweak the view to make it usable.
>
>Go to the files section and download the EViews program. It's great to get the twaek into code.
>
>Here is a good start on a parameterized view, deals with 2.6 data in SBT
>
>
>CREATE SQL VIEW "LV_CUST" ;
> AS SELECT Arcust01.custno, Arcust01.company, Arcust01.contact, Arcust01.city, ;
> Arcust01.state, Arcust01.phone ;
> FROM f:\pro30\ardata\arcust01 ;
> where arcust01.type< '99';
> and arcust01.name= ?vp_name;
> and arcust01.custno= ?vp_custno;
> and arcust01.contact= ?vp_contact
>
>Just putting that into code and running it will create the base of your view. You will need to set all of these too:
>
>DBSetProp('LV_CUST', 'View', 'UpdateType', 1)
>DBSetProp('LV_CUST', 'View', 'WhereType', 3)
>DBSetProp('LV_CUST', 'View', 'FetchMemo', .T.)
>DBSetProp('LV_CUST', 'View', 'SendUpdates', .T.)
>DBSetProp('LV_CUST', 'View', 'UseMemoSize', 255)
>DBSetProp('LV_CUST', 'View', 'FetchSize', 100)
>DBSetProp('LV_CUST', 'View', 'MaxRecords', -1)
>DBSetProp('LV_CUST', 'View', 'Tables', 'arcust01')
>DBSetProp('LV_CUST', 'View', 'Prepared', .F.)
>DBSetProp('LV_CUST', 'View', 'CompareMemo', .T.)
>DBSetProp('LV_CUST', 'View', 'FetchAsNeeded', .T.)
>DBSetProp('LV_CUST', 'View', 'FetchSize', 100)
>DBSetProp('LV_CUST', 'View', 'Comment', "")
>DBSetProp('LV_CUST', 'View', 'BatchUpdateCount', 1)
>DBSetProp('LV_CUST', 'View', 'ShareConnection', .F.)
>
>
>*!* Field Level Properties for LV_CUST
>* Props for the LV_CUST.custno field.
>DBSetProp('LV_CUST.custno', 'Field', 'KeyField', .T.)
>DBSetProp('LV_CUST.custno', 'Field', 'Updatable', .F.)
>DBSetProp('LV_CUST.custno', 'Field', 'UpdateName', 'arcust01.custno')
>DBSetProp('LV_CUST.custno', 'Field', 'DataType', "C(6)")
>
>
>All of the DBSET stuff was generated via EView. You will have to change the update type and updataable but that is easy in the command window.
>
>__Stephen Russell
>Memphis VFP User Group
>
>>>>Can I create a VIEW from a free table?
>>>
>>>Yeah, but the view has to be contained in the DBC.
>>----
>>Hi Erik,
>>I do not want to contained the view in a DBC.
>>Can I have a DBC with nothing in it but free tables?
----
Hi Steve and thanks for the code,
I have been using views for my buffering in network apps. If I use cusorsetprop() instead of views, why do I need views?
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform