Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append blank or insert into
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00331925
Message ID:
00331976
Views:
15
>Hi all,
> We've just installed our first Mere Mortals application at a client location, and we're finding that some processes are running slower there than in our development environment. We're now in the process of trying to optimize our application as much as possible before we start blaming the network, and one item we're looking at but can't seem to agree on is whether we should be using append blank or insert into to add a record. We encountered some problems using insert into in one of our conversion programs because newid() wasn't firing. I know that append blank is being used in MM classes, so is it safe to assume that append blank is recommended/required by MM, and if so, why?
>
>TIA,
>Rita Cargill
>CMi Software

APPEND BLANK gives the framework more flexibility. You can grab the NewID() generated when adding the new ID w/o actually adding a new record. INSERT INTO doesn't allow you to easily populate other tables w/a foreign key (since we don't know it until it's already been added), or easily discard changes made by the user (the record has already been added).

You might want to read the section in the manual about optimizing the memory - it's possible that might be the cause of your problem.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform