Hi all

I inherited an app programmed originally in VFP 6 and am trying to convert it 
to VFP9. This app has about 95 updatable views which last week were mostly all 
corrupted because of a hardware problem with the server. Not only the views but 
the underlying tables were corrupted and it was a painful process rebuilding 
the database and all tables, from one week old backups and then posting all 
transactions again. A very costly exercise for my client.

I decided to replace all views with cursor adapters but encountered the 
following problems:

a) some tables do not have candidate or primary keys.With views they are 
updatable, but the CA's do not even work

b) I created some complicated CA's from code, because they involve more than 
one table and the CA builder cannot build them. However, they do not update the 
base tables. Yes I changed the sendupdates property to .T. and send the 
updatable field list and update name list properly. As a matter of fact, just 
to make sure I get them right, I use the view definitions and build the CA´s 
using them as guidelines.

the CAs are created thus:

thisform.oCA = createobject('cursoradapter')
then  I set all applicable properties, incluiding the key field, the 
Updatenamelist the updatable field list and the schema, as well as setting the 
sendupdates property to .T.

I use buffering 5 and attempt the update with tableupdate. However the tables 
do not update. This only happens with selects involving more than one table, in 
fact, two tables, one of them with a primary key, the other with no primary 
key. However, the updatable table is the one with the primary key, the other 
being just  an information table.

I do this:

select (the cursor created by the CA)
tableupdate(1,.t.)

Should I try this instead?:

select thisform.CA.alias
tableupdate(1,.t.)

I am baffled by this behaviour because, so far, all my CA's worked well

Any hints?

Also, is there a way to build a cursor adapter from tables with no primary 
keys, just as one can do with views?

TIA

Pamechu Umgobwe



Pamechu Umgobwe
                
---------------------------------
The best gets better. See why everyone is raving about the All-new Yahoo! Mail. 
 

--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to