[fdo-internals] IInsert.BatchParameterValues problems

Maksim Sestic max at geoinova.com
Wed Mar 5 11:26:01 EST 2008


Hi Traian,

That's exactly what I'm currently doing (more or less, but that's the
essence of it). Since there're tens of thousands of feature instances, it
seems very logical to me to prepare a batch and then execute a command
(Insert, Update, whatever). Orest noted that certain providers do detect
such attempts and do batch inserting under the hood.

Present row-by-row inserting/updating strategy didn't work well for large
number of feature instances for me.

Regards,
Maksim Sestic




Traian Stanev wrote:
> 
> 
> Hi Maksim,
> 
> I am interested in the problem you were orinigally having with the insert
> command. Is this what were you doing:
> 
> For (all features)
> {
> 1. Create a new Insert command
> 2. Set the property values
> 3. Execute Insert
> 4. Close resulting feature reader
> }
> 
> 
> Traian
> 
> 
> 
>> -----Original Message-----
>> From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-
>> bounces at lists.osgeo.org] On Behalf Of Maksim Sestic
>> Sent: Wednesday, March 05, 2008 6:16 AM
>> To: fdo-internals at lists.osgeo.org
>> Subject: RE: [fdo-internals] IInsert.BatchParameterValues problems
>>
>>
>> Hi Orest,
>>
>> If I understood well - in case provider does support parameters,
>> managed
>> IInsert will get instantied with BatchParameterValues propery
>> containing
>> empty BatchParameterValuesCollection collection. Otherwise - the
>> property is
>> Nothing (Null)... Something's strange here, the collection should exist
>> in
>> first place neverthless of provider's capabilities (it should throw an
>> error
>> afterwards, on IInsert.Execute).
>>
>> Is this an error in managed wrapper or a feature? :-)
>>
>> Regards,
>> Maksim Sestic
>>
>>
>>
>> Orest Halustchak wrote:
>> >
>> > Hi Maksim,
>> >
>> > Did you check if the provider that you're using supports this
>> capability?
>> > Check FdoICommandCapabilities::SupportsParameters.
>> >
>> > Note that some providers may do buffering internally so that even if
>> you
>> > call IInsert.Execute many times, internally those inserts are
>> buffered and
>> > use array inserts to the underlying server.
>> >
>> > Thanks,
>> > Orest.
>> >
>> > -----Original Message-----
>> > From: fdo-internals-bounces at lists.osgeo.org
>> > [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Maksim
>> Sestic
>> > Sent: Tuesday, March 04, 2008 5:25 AM
>> > To: fdo-internals at lists.osgeo.org
>> > Subject: [fdo-internals] IInsert.BatchParameterValues problems
>> >
>> >
>> > It's FDO 3.2.0 in question. I'm asking this because managed
>> > IInsert.BatchParameterValues cannot get instantiated via newing, and
>> it's
>> > Nothing (Null) by default when IInsert is created. Since
>> > IInsert.BatchParameterValues is read-only property, there's no way to
>> add
>> > a
>> > new instance of it and populate the collection with
>> > ParameterValueCollections for each row.
>> >
>> > Regards,
>> > Maksim Sestic
>> >
>> >
>> > Maksim Sestic wrote:
>> > Hi all,
>> >
>> > Is there any example of how to use managed
>> IInsert.BatchParameterValues
>> > collection to insert many features in a batch? I'm currently using
>> > IInsert.PropertyValues.Add(...) with consecutive IInsert.Execute to
>> fill
>> > the
>> > datastore row-by-row, but this fails when there're thousands of rows.
>> >
>> > Regards,
>> > Maksim Sestic
>> > --
>> > View this message in context:
>> > http://www.nabble.com/IInsert.BatchParameterValues-problems-
>> tp15824346s18162p15824346.html
>> > Sent from the fdo-internals mailing list archive at Nabble.com.
>> >
>> > _______________________________________________
>> > fdo-internals mailing list
>> > fdo-internals at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/fdo-internals
>> > _______________________________________________
>> > fdo-internals mailing list
>> > fdo-internals at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/fdo-internals
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/IInsert.BatchParameterValues-problems-
>> tp15824346s18162p15847951.html
>> Sent from the fdo-internals mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> fdo-internals mailing list
>> fdo-internals at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/fdo-internals
> _______________________________________________
> fdo-internals mailing list
> fdo-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-internals
> 
> 

-- 
View this message in context: http://www.nabble.com/IInsert.BatchParameterValues-problems-tp15824346s18162p15854276.html
Sent from the fdo-internals mailing list archive at Nabble.com.



More information about the fdo-internals mailing list