Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make a view with free tables
Message
De
31/12/2005 05:52:08
Reza Meamar
Homa Programming Group
Shiraz, Iran
 
 
À
26/12/2005 10:00:18
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
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 7 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01080816
Message ID:
01082240
Vues:
6
>>Hi all
>>I have two free table :
>>Table1 (ACode N(5,0), AName C(30))
>>Table2 (ACode N(5,0), BName C(30))
>>
>>I want to have a view with ACode,AName,BName.
>>Can i make this view without having any Database?
>>If yes, HOW?
>>
>>Thanks
>
>Views need a database. However you might create a temporary database to host the view. Or you might simply use SPT that doesn't need a database.
>ie:
>
>create database myTempDb
>create sql view myView as ;
> Select  t1.Acode, t1.Aname, t2.Bname ;
> from table1 t1 ;
> inner join table2 t2 on t1.Acode == t2.Acode
>* Code for view properties
>* ...
>
>
>SPT way:
>
>lnHandle=Sqlstringconnect('Driver={Microsoft Visual FoxPro Driver};'+;
>		'SourceDB=c:\myFolder;SourceType=DBF;Exclusive=No;')
>SQLExec(m.lnHandle, ;
>  "Select  t1.Acode, t1.Aname, t2.Bname "+;
>  " from table1 t1 "+;
>  " inner join table2 t2 on t1.Acode == t2.Acode", 'myView')
>* Code to make it updatable
>SQLDisconnect(m.lnHandle)
>select myView
>Browse
>
Cetin


Thank you
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform