ASP.NET using Oracle

oracle United States
  • 17 years ago

    I have been using WebSphere 4.0 to run several web sites.  WebSphere currently maintains 15 connections to
    my Oracle instance.  Any process that needs a connection, grabs one of the connections and uses it.  This saves the
    considerable overhead of re-establishing a connection for every sql statement.  How do I accomplish the same thing
    using AP.NET?  I wish to continue to use Oracle as my database.  I am not yet ready to use SQLServer.


    Thank,
    Ray

  • 17 years ago

    in ASP.NET, connections to things like databases are automatically pooled. That means that provided you connect using the same connection string, ASP.NET will simply give you a handle to a connection that its kept open but isn't currently in use.

  • 17 years ago

    can you control the number of connections that are pooled?
    Thanks for your reply.


    Ray

  • 17 years ago

    I believe you can control this via the connection string. I grabbed the following sample from the aDO.NET quick start tutorial:


    Code:

    Dim connString as String


    ' Specification in the connection string:
    ' Please note: Pooling is implicit, you automatically get it unless you disable it.
    '              Therefore, "true" is the default for the pooling keyword (pooling=true).  
    ' Connection Reset:    False
    ' Connection Lifetime: 5
    ' Enlist:              true
    ' Min Pool Size:       1
    ' Max Pool Size:       50


    connString = "server=(local)\VSdotNET;Trusted_Connection=yes;database=northwind;" & _
                "connection reset=false;" & _
                "connection lifetime=5;" & _
                "enlist=true;" & _
                "min pool size=1;" & _
                "max pool size=50"

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.” - Bill Gates