Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Define View 2

Status
Not open for further replies.

FoxKid

MIS
Jun 8, 2003
92
IN
Can anybody please explain me the usage of creating view in a project.
Why should I use view? How can it help me?

Thanks and Regards

Santosh
 
I've got a whole paper you can download that explains views and how to create them. It's at Look for views.zip.

Anyway, one of the best uses for a view is when you have a grid that only displays a subset of records (like the children for the current parent). You can use a parameterized view, change the variable used to filter it, and Requery it.



-BP
 
Thanks Bpeisch,
I have downloaded it and will revert you if find any other problem.

Thanks and Regards

 
Thanks Bpeisch,
Your view on view and the way of explaing it is fantastic. Have a star. I am now too much clear idea on view...

Thanks and Regards
 
A side note to the views. I suggest getting into the habit of copying the view code (its just a sql statement) into a seperate prg file.

This provides 2 advantages.
1. backup in case your database container gets so corrupt that you need to recreate it.

2. You can use the code to create the view in your production environment - you don't need to manually create it.

Example:

CREATE VIEW v_females AS SELECT name, address, city, state FROM customers WHERE gender = "F"






Jim Osieczonek
Delta Business Group, LLC
 
FoxKid, thanks for the star.

Hi Jim,

In the paper that I had FoxKid download, I do discuss this. I don't necessarily have the code to create the view in a separate PRG, but I do put it in a PRG, and talk about the advantages of recreating the views each time the app starts, as well as the advantage of keep the view DBC on each local workstation.



-BP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top