Multiple queries at a time

Last post 11-02-2009 5:31 AM by preeja.preeja. 4 replies.

Sort Posts:

  • Multiple queries at a time

    09-18-2009, 1:59 AM
    • Member
      81 point Member
    • dodul
    • Member since 02-14-2008, 10:19 AM
    • Posts 66

    Hi all,

    I am developing one application where I have  1000 records to insert into MySQL Database . Is it possible to insert using one connection ? I have no idea how to accomplish it.. Can anyone suggest piece of code to run multiple queries at a time?

    I appreciate your help.

    Please: don't forget to click Mark as Answer on the post that helped you.
    Filed under:
  • Re: Multiple queries at a time

    09-18-2009, 7:49 AM
    • Contributor
      4,825 point Contributor
    • karthicks
    • Member since 01-09-2009, 12:43 PM
    • Chennai
    • Posts 849

     Refer SQLBulkCopy, or you can use xml to transfer data from .net to sql

    If this post is useful,
    Please,Dont Forget to click Mark As Answer and Earn Your Point

    Thanks,
    Karthick S
    Celebrate Programming
  • Re: Multiple queries at a time

    09-18-2009, 7:52 AM
    • Participant
      966 point Participant
    • abhijeet_dighe
    • Member since 03-22-2007, 11:57 AM
    • Nasik, India
    • Posts 265

    INSERT INTO <table> (<col1>, <col2>...)

    VALUES

    (<val1 for col1>, val1 for col2>...),

    (<val2 for col1>,<val2 for col2>...)...;


    Check this: http://www.brainbell.com/tutorials/MySQL/Inserting_Multiple_Rows.htm





    Please Mark As Answer if this helps.

    Regards,
    Abhijeet Dighe
  • Re: Multiple queries at a time

    09-18-2009, 7:55 AM
    • Member
      750 point Member
    • akhilrajau
    • Member since 06-03-2008, 2:16 PM
    • India
    • Posts 192

    i agree with sqlbulkcopy. But sqbulk copy is tranfer with sql server..For MySQL just check the fowllowing. I think that may help you..

    http://forums.asp.net/t/1332814.aspx

    Regards,

    Akhil Raj K R
    Esquire Scientific.

    Please Mark as Answer if it helps u

  • Re: Multiple queries at a time

    11-02-2009, 5:31 AM
    • Member
      39 point Member
    • preeja.preeja
    • Member since 10-31-2009, 12:13 AM
    • Kottayam-Kerala
    • Posts 33

    If you wan to run multiple queries [successfully] at a time, you can simply do it with SQL transactions. 

    Preeja P Prabhakar
Page 1 of 1 (5 items)