Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Missing Feature of Insert - SQL
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00458085
Message ID:
00458090
Views:
12
Good point. I forgot you could SCATTER NAME oObject. So you sould:

USE Customer
SCATTER NAME oCustomer BLANK

oCustomer.Name = "Microsoft"
oCustoemr.State = "WA"

INSERT INTO Customer FROM OBJECT oCustomer

This would be a nice feature.

>Hi Chris
>
>Just take it's value and insert it of course. I've not tested it, but what happens with a "name" field when you gather from an object?
>
>I don't think this would be a real problem. Fields that exist as properties of the object get filled by those values, others that haven't a corresponding object property are filled by the default values and properties that haven't a corresponding field were disregarded.
>
>With this kind of a rule I could live quite well. ;)
>
>Happy New Year
>Markus
>
>------------------------------------------------------------------------
>How would VFP know how to match the object properties to the table field names? I guess this would have to be by name:
>
>Object.Customer = Table.Customer
>Object.Address = Table.Address
>
>What do you do when your table has a field like Name, as each object does?
>--------------------------------------------------------------------------
Chris McCandless
Red Sky Software
Previous
Reply
Map
View

Click here to load this message in the networking platform