ADO .net (VB. net v1.0 --> OleDBConnection connection performance issue ) RRS feed

  • Question




    Has any one faced this before?


    I have a (1.0) WinForms project which connects to Oracle9i using OleDBConnection. Strangely the "Open" command of the "OleDBConnection" object takes a long time to complete (16 seconds).


    Initially we thought it had to do something with the network connection, the RAM of the machines etc. But surprisingly we figured out that in the same application when we used the COM style ADODB.Connection object the connection is almost instantaneous.


    And we tried to create a new .net 1.0 winforms application to connect to the same Oracle DB using the OleDbConnection and we were even more surprised and the connection was instantaneous.


    Anyone has any idea?




    Monday, December 29, 2008 4:05 PM

All replies

  • I don't think I've ever seen this before. Have you actually stepped through the code in debug to verify that it's the Open command? Also, have you tried opening a connection in another part of the application to see if this issue is reproducible? If you're opening the connection from a Form have you tried recreating the Form? Does this also happen with the native Oracle .NET Connection object?

    Without knowing everything your application is doing it would be rather difficult to tell you exactly why this is happening. Sometimes the very first connection created by the application appears to be slow because there's some overhead involved with creating the connection pool and establishing the first connection in the pool.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Tuesday, December 30, 2008 3:06 AM