Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I don't understand!
Message
From
16/12/2001 13:54:08
 
 
To
16/12/2001 13:33:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00594933
Message ID:
00594948
Views:
32
>>>>Hello All,
>>>>
>>>>Can anyone please tell me why this error message is occurring?
>>>>
>>>> File 'c:\genesis\wilco1\histview.dbf' does not exist.
>>>>
>>>>I have the following code to open the view named [Histview] in the click event of a button on a form. When I click the button the code is failing on the "Use History" line. I agree it should be simple bit I'm missing something.
>>>>
>>>> If Used("histview")
>>>> select histview
>>>> Browse
>>>> else
>>>> Use histview
>>>> select histview
>>>> Browse
>>>> Endif
>>>> Use
>>>
>>>It doesn't know it's a view, untill you tell it. You either have to Open Database {dbc name here}, or Use dbcname!histview - otherwise it will be looking for histview.dbf. Also, make sure the dbc can be found along the VFP path.
>>
>>Dragan,
>>I believe what you are saying, but I thought views functioned the same as tables. Also, where is this syntax located in the help files, I would like to read it for future reference.
>
>Don't believe - try it. Look under "open database" and "use" in Help.
>
>The explanation is that a view doesn't exist as a file - it's basically a definition of a cursor (with its SQL statement, field properties etc) which resides in a DBC. If the DBC is not opened (explicitly by Open Database, or implicitly by qualifying the view with the dbc - as in dbc!view syntax), VFP can't find the view. It needs to read the view definition from the DBC. Once DBC is found, the views behave as tables in many ways - you can do with them pretty much anything that you can do with a table; the difference is in that the buffers don't flush into the view itself (because it's not a table), but into its underlying table.

Dragan,

Thanks I appreciate the information.
Previous
Reply
Map
View

Click here to load this message in the networking platform