Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I append and copy at the same time?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01499518
Message ID:
01499641
Views:
48
Sorin,

I stopped reading your message at the point of "Dmitry would be best.." :). Seriously though, I have tested your approach with SELECT * in the application and it works. So I am not arguing with success :)

Thank you

>Hi Naomi,
>
>Usually, I would agree with you in that listing all fields is a best practice. However, if the purpose is to "copy all fields except two", than dealing with the exceptions would make it suitable for a lower level of abstraction (I see that Thomas has provided some insight to that). My suggestion was meant as an alternative to listing all fields. I guess another option would be to dynamically build the list of fields for INSERT string, based on context. Of course, Dmitry would be best to decide which is "best practice" for his particular situation.
>PS: I never knew that SELECT * is only valid when you do it in the command window. Seems to work wherever I use it in my programs, no problemo :)
>
>>>>>Yes, this looks like will work. Especially I like it since I don't have to list all fields but do all (*). Thank you very much.
>>>>>
>>>>
>>>>Listing all fields is better than do such extra processing.
>>>>
>>>
>>>Could you please explain why?
>>
>>You list all the fields in the INSERT command and do a single insert operation. Listing all fields is a best practice, select * is only valid when you do it in the command window.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform