Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server CE / March 2008

Tip: Looking for answers? Try searching our database.

DataTable to SQLServer table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Catalin Lungu - 13 Mar 2008 11:01 GMT
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
)=&
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.