Click here to Skip to main content
15,907,910 members
Home / Discussions / C#
   

C#

 
GeneralRe: typeof operator Pin
Ed.Poore23-Nov-08 1:04
Ed.Poore23-Nov-08 1:04 
QuestionSystem.Double (CLR type) vs double (C# type) Pin
devvvy22-Nov-08 22:02
devvvy22-Nov-08 22:02 
AnswerRe: System.Double (CLR type) vs double (C# type) Pin
Christian Graus22-Nov-08 22:34
protectorChristian Graus22-Nov-08 22:34 
AnswerRe: System.Double (CLR type) vs double (C# type) Pin
Dave Kreskowiak23-Nov-08 5:16
mveDave Kreskowiak23-Nov-08 5:16 
QuestionLINQ to SQL question, what would be the effect if I change the database table structure ??1 Pin
Nadia Monalisa22-Nov-08 20:39
Nadia Monalisa22-Nov-08 20:39 
AnswerRe: LINQ to SQL question, what would be the effect if I change the database table structure ??1 Pin
Mark Churchill23-Nov-08 12:16
Mark Churchill23-Nov-08 12:16 
GeneralRe: LINQ to SQL question, what would be the effect if I change the database table structure ??1 Pin
Nadia Monalisa23-Nov-08 12:32
Nadia Monalisa23-Nov-08 12:32 
Question.NET Connection pooling max/min setting vs Perfmon Pin
devvvy22-Nov-08 20:25
devvvy22-Nov-08 20:25 
hello,

I'm testing .NET connection pooling facility, I configured max pool size 10 and in accordance there was no exception when I oConn.Open until I opened the 11th connection.

<br />
static void Main()<br />
        {<br />
            string strConn = "Data Source=DEV\\SQLEXPRESS;Initial Catalog=Northwind;Persist Security Info=True;User ID=NorthwindSA;Password=xxxxx;connection reset=false;connection lifetime=5;min pool size=5;max pool size=10";<br />
<br />
            IDbConnection oConn = null;<br />
            ArrayList oConnections = new ArrayList();<br />
            int nIndex = 0;<br />
<br />
            for (int i = 0; i < 20; i++)<br />
            {<br />
                try<br />
                {<br />
                    oConn = new SqlConnection(strConn);<br />
                    oConn.Open();<br />
                    oConnections.Add(oConn);<br />
<br />
                    Thread.Sleep(100);<br />
                }<br />
                catch (Exception ex)<br />
                {<br />
                    Console.WriteLine("iteration: " + i + ", " + ex.Message);<br />
                    nIndex = i;<br />
                    break;<br />
                }<br />
                finally<br />
                {<br />
                    <br />
                }<br />
            }<br />
<br />
            Console.WriteLine("max number connection established: " + nIndex + ", preparing to dispose connections openned");<br />
<br />
            foreach (IDbConnection oConn2 in oConnections)<br />
            {<br />
                if (oConn2 != null)<br />
                {<br />
                    try<br />
                    {<br />
                        oConn2.Close();<br />
                    }<br />
                    finally { }<br />
                }<br />
            }<br />
            oConnections.Clear();<br />
<br />
            return;<br />
        }<br />


However - one thing I am not sure is - I'm watching Perfmon \ SQL Server General Statistics \ User Connections. The counter is showing "3" before and after test. The fact that my test application fires up 10 new connections (min=5,max=10) does not seems to have anything to do with Perfmon counter.

Thanks

dev

AnswerRe: .NET Connection pooling max/min setting vs Perfmon Pin
Dave Kreskowiak23-Nov-08 5:13
mveDave Kreskowiak23-Nov-08 5:13 
GeneralRe: .NET Connection pooling max/min setting vs Perfmon Pin
devvvy23-Nov-08 15:22
devvvy23-Nov-08 15:22 
GeneralRe: .NET Connection pooling max/min setting vs Perfmon Pin
Dave Kreskowiak24-Nov-08 16:36
mveDave Kreskowiak24-Nov-08 16:36 
Questionsignature of _inp and _outp in msvcrt.dll Pin
asugix22-Nov-08 16:25
asugix22-Nov-08 16:25 
QuestionThread.Abort and IL Pin
devvvy22-Nov-08 13:27
devvvy22-Nov-08 13:27 
AnswerRe: Thread.Abort and IL Pin
Guffa22-Nov-08 14:16
Guffa22-Nov-08 14:16 
GeneralRe: Thread.Abort and IL Pin
devvvy22-Nov-08 14:34
devvvy22-Nov-08 14:34 
GeneralRe: Thread.Abort and IL Pin
Guffa22-Nov-08 17:01
Guffa22-Nov-08 17:01 
GeneralRe: Thread.Abort and IL Pin
devvvy22-Nov-08 17:03
devvvy22-Nov-08 17:03 
QuestionUSB + C# Pin
E_Gold22-Nov-08 8:34
E_Gold22-Nov-08 8:34 
AnswerRe: USB + C# Pin
Christian Graus22-Nov-08 8:52
protectorChristian Graus22-Nov-08 8:52 
GeneralRe: USB + C# Pin
E_Gold22-Nov-08 9:15
E_Gold22-Nov-08 9:15 
GeneralRe: USB + C# Pin
Christian Graus22-Nov-08 9:56
protectorChristian Graus22-Nov-08 9:56 
GeneralRe: USB + C# PinPopular
Luc Pattyn22-Nov-08 9:27
sitebuilderLuc Pattyn22-Nov-08 9:27 
GeneralRe: USB + C# Pin
Wendelius22-Nov-08 10:56
mentorWendelius22-Nov-08 10:56 
QuestionWM_NCCALCSIZE resizing form continuously Pin
Chris Copeland22-Nov-08 8:09
mveChris Copeland22-Nov-08 8:09 
Questionrichtextbox handle keyup and keydown events Pin
Stephen Po22-Nov-08 6:14
Stephen Po22-Nov-08 6:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.