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:
01499665
Views:
48
Dmitry,

You're welcome and I am glad you found a solution. I responded to Naomi trying to clarify that what I suggested was not "fixing" the code, but rather a solution that could be more suitable for your situation. Hopefully, you see it the same way, and not just a more comfortable way of writing code.

Sorin

>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform