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!

local views and indexes

Status
Not open for further replies.

RGoldthorpe

Technical User
Aug 10, 2001
83
GB
hi

Well it raining and wet and misserable outside

And I have a problem with a local views I have writen a program that runs to create the local view code below

OPEN DATABASE "data\data1.dbc" exclusive
CREATE SQL VIEW ctdview as SELECT * ;
FROM 'data1!contact details table';
WHERE ((ALLTRIM(contact_details_table.ctd_sorg)==?org) OR (EMPTY(?org)=.T.));
AND ((ALLTRIM(contact_details_table.ctd_saddress4==?regions) OR (EMPTY(?regions)=.T.)))

It creates the local view fine but when I try to modify the local view it comes up.

Index does not match table. Delete the index file and recreate the index.

is there anything obviously wrong with code does it mean contact_details_table or the view.

I really stuck it used to work and now it does not.

All help appreciated

Rach
 
U need to set key field and update field, also to send sql updates.
 
skoko

Thanks for your reply but I do not understand what I have to do could you explain further please. AS I have not done this to the other views I have writen and they are OK.

Thanks in advance again

Rachel
 
With modifying the view, do you mean modifying the data in that view, or changing the view in the DBC ?

If it is the latter, I 'll go with Skoko ?

If you make a view with the view designer, you can use the GenDBC.prg utility (that comes with VFP) to create the code that will create your database. it really helps to see how to create a coded view with all its possibilities.

HTH,
Weedz (Edward W.F. Veld)
My private project:Download the CrownBase source code !!
 
I did code it then ran the code to create the view

but if I try to go in and modify the view it comes up with the error

Appologies for me being slow

Rach
 
It sounds to me like the index file for your Contact Details Table is corrupted. Try issuing a REINDEX on the table, and if that doesn't help, delete the index file and manually re-create each index.

Ian
 
thanks Ian

Have done this it a bit better now can modify the view now

Thanks Again

Rach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top