Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

No luck with InsertRow - ExecuteNonQuery slow (no replies)

$
0
0
The scenario is this - a local SQL Server database with data from 7 different tables needs to synchronize data to a mysql database over the web (a secured customer portal accesses the data on the mysql site).

I'm using .Net connector for the mysql connection. Is it best to use a mysqlcommand, generate my sql insert, and the executenonquery for each row in my source tables? FYI... I have this working but it's extremely slow, almost 2 hours to process all 7 tables.

I tried:


For Each dr As DataRow In sourceTable.Rows
destinationTable.ImportRow(dr)
Next

But no luck. Just wondering if there's a better way? Any suggestions appreciated! Criticism too!

FYI... I originally used MySQL ODBC connector & a Microsoft Access database with linked tables to both the SQL server & MySQL server. This was a very simple, straightforward setup with Delete, Update, & Insert queries however, this was locking up the system after running for well over the 2 hrs the mysqlcommand is running now.

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>