Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make a view with free tables
Message
From
26/12/2005 10:00:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/12/2005 09:43:20
Reza Meamar
Homa Programming Group
Shiraz, Iran
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:
01080820
Views:
12
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform