none
ADO.NET slow RRS feed

  • Question

  • Hi

    I havea project inVB.NETandI am implementingtheconnection toanAccess databaseusing ADO.NET.
    Compared tothe previous project(VB6+DAO),theread queriesremainabout the sametimebut for aINSERTtakes600 timesmore (VB6->68uS;VB.NET->43mS).

    Is this possible?
    HowI canreduce the timeusingADO.NET?

    I've triedkeeping the connectionopen with thedatabase andthe timesdo not improvesignificantly.

    I await yourresponse.
    Thank you very much.
    • Moved by Bob Wu-MTModerator Friday, March 16, 2012 2:29 AM (From:Windows Forms Data Controls and Databinding)
    Wednesday, March 14, 2012 3:00 PM

Answers

  • Be aware that keeping the connection open does not increase your speed, only is there a chance on more problems because of the connection pool.

    However, the only faster provider than Ado net is Dao, it is not as complete (or whatever name you give to it than old Ado, so also not as Ado.Net).

    But 600 times more is extreme, that should be about milliseconds. 

    Can you show the code you use around the Insert (mainly around the oledb command) code ?

    Can be that you use no parameters so the caching is not affected (I don't know if Access does this the same as SQL server where that can be a problem).

    Be aware that if you write Insert I'm thinking about a direct insert SQL command and not a dataadapter for which is in fact this forum. But also I don't see a better forum for your question than this one.


    Success
    Cor


    Friday, March 16, 2012 12:20 PM

All replies

  • Hi Gercho25,
    According to your description, this is a ADO.NET issue. I will move it to ADO.NET DataSet Forum for better support.
    Best Regards,

    Bob Wu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, March 15, 2012 2:10 AM
    Moderator
  • Hi

    I havea project in VB.NET and I am implementing the connection to an Access database using ADO.NET.
    Compared to the previous project (VB6+DAO), the read queries remain about the same time but for a INSERT takes 600 times more (VB6->68uS;VB.NET->43mS).

    Is this possible?
    How I can reduce the time using ADO.NET?

    I've tried keeping the connection open with the database and the times do not improve significantly.

    I await your response.
    Thank you very much.

    Friday, March 16, 2012 12:12 PM
  • Be aware that keeping the connection open does not increase your speed, only is there a chance on more problems because of the connection pool.

    However, the only faster provider than Ado net is Dao, it is not as complete (or whatever name you give to it than old Ado, so also not as Ado.Net).

    But 600 times more is extreme, that should be about milliseconds. 

    Can you show the code you use around the Insert (mainly around the oledb command) code ?

    Can be that you use no parameters so the caching is not affected (I don't know if Access does this the same as SQL server where that can be a problem).

    Be aware that if you write Insert I'm thinking about a direct insert SQL command and not a dataadapter for which is in fact this forum. But also I don't see a better forum for your question than this one.


    Success
    Cor


    Friday, March 16, 2012 12:20 PM