Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make a view with free tables
Message
From
31/12/2005 05:52:08
Reza Meamar
Homa Programming Group
Shiraz, Iran
 
 
To
26/12/2005 10:00:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01080816
Message ID:
01082240
Views:
7
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform