[fdo-users] Re: Bulk Insert in Sqlite
Romica Dascalescu
Romica.Dascalescu at autodesk.com
Mon May 31 12:10:16 EDT 2010
Having only one insert command, keeping same property values collection, keeping the property values and setting only the value or NULL is best for all providers. You just avoid allocating and releasing memory at each insert.
Now regarding transaction you can check if the provider supports transactions (the capability), e.g.:
FdoPtr<FdoITransaction> trans;
FdoPtr<FdoIConnectionCapabilities> conncap = conn->GetConnectionCapabilities();
if (conncap->SupportsTransactions())
trans = conn->BeginTransaction();
// Inserts
if (trans)
trans->Commit();
So no providername == "sqlite"
Romy.
-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Bruno Scott
Sent: Monday, May 31, 2010 12:02 PM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] Re: Bulk Insert in Sqlite
Thanks for response,
Do you think we can do the same with other fdo providers.
Is not i would need a way to detect if we can do it that way ( a bit like
capabilities )
Because my program is quite generic ( a bit like fdo2Fdo )
and i don't like doing things like
if providerName == "Sqlite" then ...
Thanks a lot for your fast answer
Bruno
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Bulk-Insert-in-Sqlite-tp5122126p5122318.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users
More information about the fdo-users
mailing list