Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating a table from an SQL view?
Message
From
20/03/2000 10:45:39
John Vlahos
V I Software Solutions Design
Mississauga, Ontario, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Updating a table from an SQL view?
Miscellaneous
Thread ID:
00347878
Message ID:
00347878
Views:
50
Hi,

I would like to code the sending of updates from a SQL view to a base table named Invoice, whose primary key is ID.

I can't get the updates to work, smoothly. I get several error messages, one of which is:

"No key colums are specified for the update table "AMS!Invoice". Use the KeyFieldList property of the cursor"

When I use the KeyFieldList property on the Invoice table, I get another error message.

I can't use the view designer because I am limited to three tables.

Can I get some help?

The following is the SQL view I create:

CREATE SQL VIEW lvShipping AS;
SELECT SO.PONO,;
INVOICE.CUSTCODE,;
CUSTOMER.NAME AS CUSTOMERNAME,;
INVOICE.SHIPDATE,;
INVOICE.TRANSPORTCODE,;
TRANSPORT.NAME AS TRANSPORTNAME,;
INVOICE.WAYBILLNO,;
INVOICE.ID,;
INVOICE.INVDATE,;
INVOICE.SOID;
FROM AMS!INVOICE;
LEFT OUTER JOIN AMS!SO ON INVOICE.SOID=SO.ID;
LEFT OUTER JOIN CUSTOMER ON SO.CUSTOMERID=CUSTOMER.ID;
LEFT OUTER JOIN CUSTOMER_SHIP_VIA ON INVOICE.TRANSPORTID=CUSTOMER_SHIP_VIA.ID;
LEFT OUTER JOIN TRANSPORT ON TRANSPORT.ID=CUSTOMER_SHIP_VIA.TRANSPORTID;
ORDER BY INVOICE.SHIPDATE DESC

USE AMS!lvShipping IN 0 SHARED
CURSORSETPROP("SendUpdates", .T., "lvShipping")

Thanks in advance!
Next
Reply
Map
View

Click here to load this message in the networking platform