C# DataTable to MySQL

I had a very basic problem while coding on a project and it was simply bulkinsert from a .NET DataTable to the MySQL Server and do this FAST! After crawling the net for a while I came to the conclusion that every one of those methods where either slow or didn’t fit my needs so I hacked together my own Solution!

Tested this within my application. Took around 3 seconds for ~30K rows with this!! Not beatable by anything i’ve found :O

there you go, I hope this helps some ppl out there!


Edit: some polishing 😉

12 Antworten zu “C# DataTable to MySQL”

  1. Could you please provide an example of the usage of this? I do not see connection part. Also when I try to use the name from the target mysql table it won’t allow it.

  2. I do agree with all the ideas you have introduced for your post. They are really convincing and can certainly work. Still, the posts are very brief for newbies. May you please extend them a bit from subsequent time? Thank you for the post.

    1. Well yeah, but these posts are no guides and I don’t intend to write them as such. I post them first of all for myself so I don’t forget it and obviously that I might help ppl searching for similar solutions. But I don’t target newbies and probably never will since I’m way to lazy :(. If you have some suggestions to posts feel free to comment and I’ll add them!

  3. Oh my goodness! Amazing article dude! Thanks, However
    I am encountering troubles with your RSS. I don’t know why I am unable to subscribe to it.

    Is there anyone else getting the same RSS issues?
    Anybody who knows the solution will you kindly respond?

  4. I am really impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you modify it yourself? Anyway keep up the excellent quality writing, its rare to see a great blog like this one nowadays

  5. Hey would you mind letting me know which web host you’re working with? I’ve loaded your blog in 3 completely different internet browsers and I must say this blog loads a lot faster then most. Can you suggest a good internet hosting provider at a fair price? Kudos, I appreciate it!

    1. Oh that’s my own private vServer hosted by the german provider netcup (netcup.de). It’s fairly cheap (I’m paying 9€/Month for 1 vCPU with 4 GB RAM and 240 GB HDD space). As for the tech side: The Server is running on nginx with php-fpm and spdy 3.1 enabled. Hope this helps you a little!

Kommentar verfassen

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.