Hi all,
I need to move a DataTable records to a table. How can I do that quickly?
Now I'm iterate the DataTable, and for each record I'm build the sql
instruction and insert it. The problem it is the time.
Any ideea?
Thank you,
Catalin
Ginny Caughey [MVP] - 13 Mar 2008 15:23 GMT
Catalin,
Generally inserting SqlCeResultSet updatable records is faster than issuing
a SQL statement. You may also be able to improve insert performance by
managing transactions so you neither commit after each insert or only once
at the end of the group of transactions.

Signature
Ginny Caughey
Device Application Development MVP
www.wasteworks.com
Software for Waste Management
> Hi all,
> I need to move a DataTable records to a table. How can I do that quickly?
[quoted text clipped - 4 lines]
> Thank you,
> Catalin
Ginny Caughey [MVP] - 13 Mar 2008 16:12 GMT
Catalin,
One other thing that usually improves insert performance is not creating any
indexes until the tables are populated.

Signature
Ginny Caughey
Device Application Development MVP
www.wasteworks.com
Software for Waste Management
> Hi all,
> I need to move a DataTable records to a table. How can I do that quickly?
[quoted text clipped - 4 lines]
> Thank you,
> Catalin
Catalin Lungu - 13 Mar 2008 17:12 GMT
Thanks, I will try that.
> Catalin,
>
[quoted text clipped - 9 lines]
>> Thank you,
>> Catalin
William Vaughn - 13 Mar 2008 18:50 GMT
Ginny is right. I also discuss a couple of other techniques in my Ebook. See
www.hitchhikerguides.net.

Signature
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
> Hi all,
> I need to move a DataTable records to a table. How can I do that quickly?
[quoted text clipped - 4 lines]
> Thank you,
> Catalin
Jin - 14 Mar 2008 15:59 GMT
> Hi all,
> I need to move a DataTable records to a table. How can I do that quickly?
[quoted text clipped - 4 lines]
> Thank you,
> Catalin
Catalin,
Here's a perfect article to help you out with Insert performance:
http://www.pocketpcdn.com/print/articles/?&atb.set(c_id)=74&atb.set(a_id)=11003&
atb.perform(details)=&