Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select from unintended table
Message
From
04/04/2003 10:59:18
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00773439
Message ID:
00774042
Views:
14
>Hi,
>
>>Can you change this into 'select * from MyTable', ie without the mydbc!
>
>Thanks for the suggestion - that works. Guess I'll have to stay away from the view designer *and* ignore the documentation in this instance. Still odd (and I'd claim wrong) that VFP should make a different choice with the DBC name specified.
>
>Thanks again,
>Viv

Viv,

You are welcome.

As an aside, I never use the view designer and I code all my views. That way I can easily change the view by re-running the code. I have one function per view

It goes like this
Function MyView()
    
    =view_delete(program())

    create sql view program() as ;
      ;
    select * ;
       from MyTable1, MyTable2 ;
       where ( MyTable1.Id == MyTable2.Id ) ;
         and ( .... ) ;
     order by 1, 3, ..

    use in MyTable1
    use in MyTable2
endfunc
*--------
*--------------------------------------------------------------------------
function	view_delete(v)
	if( indbc( v, 'View' ) )
		delete view ( v )
	endif
endfunc
*---------------------------------------------------------------------------
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform