function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dgrissendgrissen 

Batch Insert example in VB 6 or VBA?

Hi,

Can anyone help me out with a good example of a batch insert call in VB 6 or VBA?  Also, code to control the insert call in sizes of 200 would really help.

Thanks!

Darrell

Ron HessRon Hess

some (lots of) VBA code here to do batch inserts, download the add-in, install it and open the VBA environment within Excel,

look for the sub insert_range() in the Module "s_force" 

http://sforce.sourceforge.net/excel/

http://sforce.sourceforge.net/excel/downloads.htm

you will have to rip out a bunch of stuff to simplify the code, much of this code is spent on working with cells and ranges, this may not be interesting (or too much work) if you are using Access or Word...

 

Force2b_MikeForce2b_Mike
Also, the VB6 code I posted in Ron's "sforce Connector: new version 5.40" thread has some logic for Batch Inserts. I believe that the batch part is disabled, but it should be easy enough to reenable by letting it build an array of objects instead of creating them one at a time.

Mike